Skip to content

Commit 5eac0fc

Browse files
committed
Add more cases to scatter fill mock
1 parent 3c34014 commit 5eac0fc

File tree

2 files changed

+118
-20
lines changed

2 files changed

+118
-20
lines changed
Loading

test/image/mocks/scatter_fill_corner_cases.json

Lines changed: 118 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,27 @@
77
"showlegend": false
88
},
99
{
10-
"x": [0, 1, 2, 3],
11-
"y": [1, null, 1, 1],
10+
"x": [0, 0.5, 1, 2, 3],
11+
"y": [1, null, 1, 1.1, 1],
1212
"fill": "tozeroy",
1313
"showlegend": false
1414
},
1515
{
16-
"x": [0, 1, 1.5, 2, 2.5, 3],
17-
"y": [0.75, 0.75, null, 0.85, null, 0.75, 0.75],
16+
"x": [0, 0.5, 1, 1.25, 1.5, 1.75, 2, 2.5, 3],
17+
"y": [0.75, 0.85, 0.75, null, 0.85, null, 0.75, 0.85, 0.75],
1818
"fill": "tozeroy",
1919
"showlegend": false
2020
},
2121
{
22-
"x": [0, 1, 2, 3],
23-
"y": [0.5, 0.6, null, 0.5],
22+
"x": [0, 1, 2, 2.5, 3],
23+
"y": [0.5, 0.6, 0.5, null, 0.5],
24+
"line": {"shape": "vh", "color": "black", "dash": "dot"},
2425
"fill": "tozeroy",
2526
"showlegend": false
2627
},
2728
{
28-
"x": [0, 1.5, 3],
29-
"y": [0.25, null, 0.25],
29+
"x": [0, 0.5, 1, 1.5, 2, 2.5, 3],
30+
"y": [0.25, null, 0.35, null, 0.15, null, 0.25],
3031
"fill": "tozeroy",
3132
"showlegend": false
3233
},
@@ -39,44 +40,141 @@
3940
"showlegend": false
4041
},
4142
{
42-
"x": [0, 1, 2, 3],
43-
"y": [1, null, 1, 1],
43+
"x": [0, 0.5, 1, 2, 3],
44+
"y": [1, null, 1, 1.1, 1],
4445
"fill": "tozeroy",
4546
"line": {"shape": "spline"},
4647
"xaxis": "x2",
4748
"showlegend": false
4849
},
4950
{
50-
"x": [0, 1, 1.5, 2, 2.5, 3],
51-
"y": [0.75, 0.75, null, 0.85, null, 0.75, 0.75],
51+
"x": [0, 0.5, 1, 1.25, 1.5, 1.75, 2, 2.5, 3],
52+
"y": [0.75, 0.85, 0.75, null, 0.85, null, 0.75, 0.85, 0.75],
5253
"fill": "tozeroy",
5354
"line": {"shape": "spline"},
5455
"xaxis": "x2",
5556
"showlegend": false
5657
},
5758
{
58-
"x": [0, 1, 2, 3],
59-
"y": [0.5, 0.6, null, 0.5],
59+
"x": [0, 1, 2, 2.5, 3],
60+
"y": [0.5, 0.6, 0.5, null, 0.5],
6061
"fill": "tozeroy",
61-
"line": {"shape": "spline"},
62+
"line": {"shape": "vh", "color": "black", "dash": "dot"},
6263
"xaxis": "x2",
6364
"showlegend": false
6465
},
6566
{
66-
"x": [0, 1.5, 3],
67-
"y": [0.25, null, 0.25],
67+
"x": [0, 0.5, 1, 1.5, 2, 2.5, 3],
68+
"y": [0.25, null, 0.35, null, 0.15, null, 0.25],
6869
"fill": "tozeroy",
6970
"line": {"shape": "spline"},
7071
"xaxis": "x2",
7172
"showlegend": false
73+
},
74+
75+
{
76+
"x": [1.5],
77+
"y": [1.25],
78+
"fill": "tonexty",
79+
"showlegend": false,
80+
"yaxis": "y2"
81+
},
82+
{
83+
"x": [0, 0.5, 1, 2, 3],
84+
"y": [1, null, 1, 1.1, 1],
85+
"fill": "tonexty",
86+
"showlegend": false,
87+
"yaxis": "y2"
88+
},
89+
{
90+
"x": [0, 0.5, 1, 1.25, 1.5, 1.75, 2, 2.5, 3],
91+
"y": [0.75, 0.85, 0.75, null, 0.85, null, 0.75, 0.85, 0.75],
92+
"fill": "tonexty",
93+
"showlegend": false,
94+
"yaxis": "y2"
95+
},
96+
{
97+
"x": [0, 1, 2, 2.5, 3],
98+
"y": [0.5, 0.6, 0.5, null, 0.5],
99+
"line": {"shape": "vh", "color": "black", "dash": "dot"},
100+
"fill": "tonexty",
101+
"showlegend": false,
102+
"yaxis": "y2"
103+
},
104+
{
105+
"x": [0, 0.5, 1, 1.5, 2, 2.5, 3],
106+
"y": [0.25, null, 0.35, null, 0.15, null, 0.25],
107+
"fill": "tonexty",
108+
"showlegend": false,
109+
"yaxis": "y2"
110+
},
111+
{
112+
"x": [1.5],
113+
"y": [1.25],
114+
"fill": "tonexty",
115+
"line": {"shape": "spline"},
116+
"xaxis": "x2",
117+
"showlegend": false,
118+
"yaxis": "y2"
119+
},
120+
{
121+
"x": [0, 0.5, 1, 2, 3],
122+
"y": [1, null, 1, 1.1, 1],
123+
"fill": "tonexty",
124+
"line": {"shape": "spline"},
125+
"xaxis": "x2",
126+
"showlegend": false,
127+
"yaxis": "y2"
128+
},
129+
{
130+
"x": [0, 0.5, 1, 1.25, 1.5, 1.75, 2, 2.5, 3],
131+
"y": [0.75, 0.85, 0.75, null, 0.85, null, 0.75, 0.85, 0.75],
132+
"fill": "tonexty",
133+
"line": {"shape": "spline"},
134+
"xaxis": "x2",
135+
"showlegend": false,
136+
"yaxis": "y2"
137+
},
138+
{
139+
"name": "vh shape",
140+
"x": [0, 1, 2, 2.5, 3],
141+
"y": [0.5, 0.6, 0.5, null, 0.5],
142+
"fill": "tonexty",
143+
"line": {"shape": "vh", "color": "black", "dash": "dot"},
144+
"xaxis": "x2",
145+
"yaxis": "y2"
146+
},
147+
{
148+
"x": [0, 0.5, 1, 1.5, 2, 2.5, 3],
149+
"y": [0.25, null, 0.35, null, 0.15, null, 0.25],
150+
"fill": "tonexty",
151+
"line": {"shape": "spline"},
152+
"xaxis": "x2",
153+
"showlegend": false,
154+
"yaxis": "y2"
72155
}
73156
],
74157
"layout": {
75158
"xaxis": {
76-
"domain": [0, 0.45]
159+
"domain": [0, 0.45],
160+
"title": "linear"
77161
},
78162
"xaxis2": {
79-
"domain": [0.55, 1]
80-
}
163+
"domain": [0.55, 1],
164+
"title": "spline"
165+
},
166+
"yaxis": {
167+
"domain": [0.05, 0.475],
168+
"title": "tozeroy"
169+
},
170+
"yaxis2": {
171+
"domain": [0.525, 1],
172+
"title": "tonexty"
173+
},
174+
"legend": {
175+
"orientation": "h"
176+
},
177+
"width": 600,
178+
"height": 600
81179
}
82180
}

0 commit comments

Comments
 (0)