Skip to content

Commit 5febbbb

Browse files
authored
Add fixtures for cornerRadius (#417)
1 parent 1302360 commit 5febbbb

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

test/fixtures/box/cornerRadius.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
module.exports = {
2+
config: {
3+
type: 'bar',
4+
options: {
5+
scales: {
6+
x: {
7+
display: false,
8+
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
9+
},
10+
y: {
11+
display: false,
12+
min: 0,
13+
max: 25
14+
}
15+
},
16+
plugins: {
17+
annotation: {
18+
annotations: {
19+
box1: {
20+
type: 'box',
21+
xScaleID: 'x',
22+
yScaleID: 'y',
23+
xMin: 1.5,
24+
xMax: 3.5,
25+
yMin: 5,
26+
yMax: 10,
27+
backgroundColor: 'rgba(33, 101, 171, 0.5)',
28+
borderColor: 'rgb(33, 101, 171)',
29+
cornerRadius: 8,
30+
borderWidth: 5,
31+
},
32+
box2: {
33+
type: 'box',
34+
xScaleID: 'x',
35+
yScaleID: 'y',
36+
xMin: 'July',
37+
xMax: 'May',
38+
yMin: 11,
39+
yMax: 15,
40+
backgroundColor: 'rgba(101, 33, 171, 0.5)',
41+
borderColor: 'rgb(101, 33, 171)',
42+
cornerRadius: Infinity,
43+
borderWidth: 5,
44+
},
45+
box3: {
46+
type: 'box',
47+
xScaleID: 'x',
48+
yScaleID: 'y',
49+
xMin: 0,
50+
xMax: 'May',
51+
yMin: 20,
52+
yMax: 16,
53+
backgroundColor: 'rgba(171, 101, 33, 0.5)',
54+
borderColor: 'rgb(171, 101, 33)',
55+
cornerRadius: 4,
56+
borderWidth: 5,
57+
}
58+
}
59+
}
60+
}
61+
}
62+
}
63+
};

test/fixtures/box/cornerRadius.png

12.7 KB
Loading

0 commit comments

Comments
 (0)