-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrawChart.js
More file actions
41 lines (40 loc) · 995 Bytes
/
drawChart.js
File metadata and controls
41 lines (40 loc) · 995 Bytes
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
class EvolutionChart{
constructor(can){
this.configInfo = {
type: "line",
data: {
labels: [],
datasets: [
{
label: "Fitness Avg",
data: [],
backgroundColor: ["rgba(255,0,0,0.2)"],
borderColor: ["rgba(255,0,0,0.75)"],
borderWidth: 1
},
{
label: "Success %",
data: [],
borderColor: ["rgba(0,0,0,0.75)"],
borderWidth: 1
}
]
},
options: {
responsive: false,
scales: {
yAxes: [
{
ticks: {
beginAtZero: true,
max: 100
}
}
]
}
}
};
this.can = can;
this.chart = new Chart(this.can, this.configInfo);
}
}