-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchart.js
101 lines (91 loc) · 2.07 KB
/
chart.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
var ctx = document.getElementById('myChart').getContext('2d');
var options = {
responsive:false, // do not resize
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
}
}],
/*
xAxes: [{
ticks: {
beginAtZero: true,
min:0,
max:10,
}
}]*/
}
}
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: [],
datasets: [{
label: 'red population',
data: [],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
],
borderColor: [
'rgba(255, 99, 132, 1)',
],
borderWidth: 2
},
// Green graph
{
label:"Green population",
data:[],
backgroundColor:[
'rgba(99,255,132,0.2)'
],
borderColor:[
'rgba(99,255,132,1)'
],
borderWidth:2
},
// Blue graph
{
label:"Blue population",
data:[],
backgroundColor:[
'rgba(132,99,255,0.2)'
],
borderColor:[
'rgba(132,99,255,1)'
],
borderWidth:2
},
// population graph
{
label:"Blobs total population",
data:[],
backgroundColor:[
'rgba(257,254,27,0.2)'
],
borderColor:[
'rgba(255,254,27,1)'
],
borderWidth:2
},
]
},
options: {
responsive:false, // do not resize
scales: {
yAxes: [{
ticks: {
beginAtZero: true,
}
}],
/*
xAxes: [{
ticks: {
beginAtZero: true,
min:0,
max:10,
}
}]*/
}
}
});