-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript.js
More file actions
95 lines (93 loc) · 2.14 KB
/
script.js
File metadata and controls
95 lines (93 loc) · 2.14 KB
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
const ctx = document.querySelector('.activity-chart');
const ctx2 = document.querySelector('.prog-chart');
new Chart(ctx, {
type: 'bar',
data: {
labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
datasets: [{
label: 'Time',
data: [8, 6, 7, 6, 10, 8, 4],
backgroundColor: '#1e293b',
borderWidth: 3,
borderRadius: 6,
hoverBackgroundColor: '#60a5fa'
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
x: {
border: {
display: true
},
grid: {
display: true,
color: '#1e293b'
}
},
y: {
ticks: {
display: false
}
}
},
plugins: {
legend: {
display: false
}
},
animation: {
duration: 1000,
easing: 'easeInOutQuad',
}
}
});
new Chart(ctx2, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
datasets: [{
label: 'Class GPA',
data: [6, 10, 8, 14, 6, 7, 4],
borderColor: '#0891b2',
tension: 0.4
},
{
label: 'Aver GPA',
data: [8, 6, 7, 6, 11, 8, 10],
borderColor: '#ca8a04',
tension: 0.4
}
]
},
options: {
responsive: true,
maintainAspectRatio: true,
scales: {
x: {
grid: {
display: false,
}
},
y: {
ticks: {
display: false
},
border: {
display: false,
dash: [5, 5]
}
}
},
plugins: {
legend: {
display: false
}
},
animation: {
duration: 1000,
easing: 'easeInOutQuad',
}
}
});