DiagramChartConfig.js
1.54 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
const DiagramChartConfig = {
type: 'line',
data: {
labels: [],
datasets: [{
data: [],
backgroundColor: 'rgba(0,153,68,0.3)',
borderColor: 'rgba(0,153,68,0.8)',
borderWidth: 1,
pointBorderColor: 'rgba(0, 0, 0, 0)',
pointBackgroundColor: 'rgba(0, 0, 0, 0)',
pointHoverBackgroundColor: 'rgb(255, 99, 132)',
pointHoverBorderColor: 'rgb(255, 99, 132)'
}],
},
options: {
responsive: true,
pointDotRadius: 1,
pointDotStrokeWidth: 8,
legend: false,
scaleShowGridLines : false,
/*tooltips: {
intersect: false,
displayColors: false
},*/
scales: {
yAxes: [{
display: false,
/* gridLines: { //网格
color: "#fff",
lineWidth:0,
},*/
ticks: {
beginAtZero:true,
//stepSize: 1,
/*callback: function(value, index, values) {
if (Math.floor(value) === value) {
return value;
}
},
autoSkip: true,
maxRotation: 10,
maxTicksLimit: 10*/
}
}],
xAxes: [{
display: false,
/*gridLines: { //网格
color: "#fff",
zeroLineColor: '#666666',
pointDot: false
},*/
}]
}
}
}
export default DiagramChartConfig;