Skip to content

Commit e37ac10

Browse files
committed
fixed doFill; added tests
1 parent c971c8d commit e37ac10

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
module.exports = {
2+
config: {
3+
type: 'line',
4+
data: {
5+
labels: [1, 2, 3, 4],
6+
datasets: [
7+
{
8+
data: [200, 400, 200, 400],
9+
cubicInterpolationMode: 'monotone',
10+
tension: 0.4,
11+
spanGaps: true,
12+
borderColor: 'blue',
13+
pointRadius: 0,
14+
fill: {
15+
target: 1,
16+
below: 'rgba(255, 0, 0, 0.4)',
17+
above: 'rgba(53, 221, 53, 0.4)',
18+
}
19+
},
20+
{
21+
data: [400, 200, 400, 200],
22+
cubicInterpolationMode: 'monotone',
23+
tension: 0.4,
24+
spanGaps: true,
25+
borderColor: 'orange',
26+
pointRadius: 0,
27+
},
28+
]
29+
},
30+
options: {
31+
indexAxis: 'y',
32+
// maintainAspectRatio: false,
33+
plugins: {
34+
filler: {
35+
propagate: false
36+
},
37+
datalabels: {
38+
display: false
39+
},
40+
legend: {
41+
display: false
42+
},
43+
}
44+
}
45+
}
46+
};
50.8 KB
Loading

0 commit comments

Comments
 (0)