chartConfig.js
942 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
42
const chartConfig = {
type: 'line',
data: {
labels: [],
datasets: [{
data: [],
label: '设备激活数(个)',
borderDash: [1],
backgroundColor: 'rgba(0,153,68,0.3)',
borderColor: 'rgba(0,153,68,0.8)',
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
legend: false,
tooltips: {
intersect: false,
displayColors: false
},
scales: {
yAxes: [{
ticks: {
beginAtZero:true,
//stepSize: 1,
callback: function(value, index, values) {
if (Math.floor(value) === value) {
return value;
}
},
autoSkip: true,
maxRotation: 10,
maxTicksLimit: 10
}
}],
xAxes: []
}
}
}
export default chartConfig;