initial commit
This commit is contained in:
28
public/javascripts/main2.js
Normal file
28
public/javascripts/main2.js
Normal file
@ -0,0 +1,28 @@
|
||||
const options = {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
|
||||
datasets: [{
|
||||
label: '# of Votes',
|
||||
data: [12, 19, 3, 5, 2, 3],
|
||||
borderWidth: 1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
plugins: {
|
||||
annotation: {
|
||||
annotations: {
|
||||
box1: {
|
||||
type: "box",
|
||||
yMin: 5,
|
||||
yMax: 10,
|
||||
backgroundColor: "rgba(255, 99, 132, 0.25)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const ctx = document.getElementById('chart').getContext('2d');
|
||||
const chart = new Chart(ctx, options);
|
Reference in New Issue
Block a user