-
Notifications
You must be signed in to change notification settings - Fork 0
/
general-line.js
61 lines (59 loc) · 1.12 KB
/
general-line.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
import data from './data.json'
const config = {
type: 'line',
data: {
labels: data.data.map(d => d.date),
datasets: [
{
label: 'Vaka',
data: data.data.map(d => d.case),
fill: false,
borderColor: 'rgba(100, 180, 255, 1)'
},
{
label: 'Test',
data: data.data.map(d => d.test),
borderColor: 'rgba(255, 200, 100, 1)',
fill: false
},
{
label: 'Ölüm',
data: data.data.map(d => d.death),
borderColor: 'rgba(255, 0, 0, 1)',
fill: false
}
]
},
options: {
responsive: true,
title: {
display: true,
text: 'Türkiye - Covid 19'
},
tooltips: {
mode: 'index',
intersect: false
},
hover: {
mode: 'nearest',
intersect: true
},
scales: {
xAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'Gün'
}
}],
yAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'Vaka'
}
}]
}
}
}
export default config