testing chart plain vanilla

This commit is contained in:
Beverly Nguyen
2024-05-15 11:39:03 -07:00
parent be177726ee
commit 5546de66c4
5 changed files with 55 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
(function (window) {
const ctx = document.getElementById('myChart');
new Chart(ctx, {
type: 'bar',
data: {
labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
datasets: [{
label: '# of Votes',
data: [12, 19, 3, 5, 2, 3],
borderWidth: 1
}]
},
options: {
scales: {
y: {
beginAtZero: true
}
}
}
});
})(window);