Skip to content

Commit ce9691c

Browse files
committed
Add an image test for fixed size shapes #2193
- Note: not an exhaustive mock with all variations but rather a set of shapes covering the newly introduced capabilities, also useful for manually testing and debugging things.
1 parent c2203fa commit ce9691c

File tree

2 files changed

+255
-0
lines changed

2 files changed

+255
-0
lines changed
79.6 KB
Loading
Lines changed: 255 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
{
2+
"data": [
3+
{
4+
"x": [1,4],
5+
"y": [1,4]
6+
}, {
7+
"x": [1,4],
8+
"y": [1,5],
9+
"xaxis": "x2",
10+
"yaxis": "y2"
11+
}, {
12+
"x": [1,4],
13+
"y": [1,5],
14+
"xaxis": "x3",
15+
"yaxis": "y3"
16+
}, {
17+
"x": [1,4],
18+
"y": [1,5],
19+
"xaxis": "x4",
20+
"yaxis": "y4"
21+
}
22+
],
23+
"layout": {
24+
"title": "Fixed size shapes",
25+
"autosize": false,
26+
"width": 1000,
27+
"height": 800,
28+
"xaxis": {
29+
"domain": [0,0.30],
30+
"anchor": "y",
31+
"title": "rect, circle, line"
32+
},
33+
"yaxis": {
34+
"domain": [0.55,1],
35+
"type": "linear",
36+
"anchor": "x"
37+
},
38+
"xaxis2": {
39+
"domain":[0.33,0.66],
40+
"anchor": "y2",
41+
"title": "triangle as path"
42+
},
43+
"yaxis2": {
44+
"domain": [0.55,1],
45+
"type": "linear",
46+
"anchor": "x2"
47+
},
48+
"xaxis3": {
49+
"domain":[0.70,1],
50+
"anchor": "y3",
51+
"title": "drag / resize for auto-range"
52+
},
53+
"yaxis3": {
54+
"domain": [0.55,1],
55+
"type": "linear",
56+
"anchor": "x3"
57+
},
58+
"xaxis4": {
59+
"domain": [0,0.30],
60+
"anchor": "y4",
61+
"title": "xy pos & x size paper, y size pixel"
62+
},
63+
"yaxis4": {
64+
"domain": [0,0.45],
65+
"type": "linear",
66+
"anchor": "x4"
67+
},
68+
"xaxis5": {
69+
"domain":[0.33,0.66],
70+
"anchor": "y5",
71+
"title": "rects w/ mixed size modes"
72+
},
73+
"yaxis5": {
74+
"domain": [0,0.45],
75+
"type": "linear",
76+
"anchor": "x5"
77+
},
78+
"xaxis6": {
79+
"domain":[0.70,1],
80+
"anchor": "y6",
81+
"title": "paths w/ mixed size modes"
82+
},
83+
"yaxis6": {
84+
"domain": [0,0.45],
85+
"type": "linear",
86+
"anchor": "x6"
87+
},
88+
"shapes": [
89+
{
90+
"type": "circle",
91+
"xref": "x",
92+
"xsizemode": "pixel",
93+
"yref": "y",
94+
"ysizemode": "pixel",
95+
"fillcolor": "rgba(96, 171, 50,0.7)",
96+
"xanchor": 8,
97+
"yanchor": 8,
98+
"x0": -20,
99+
"x1": 20,
100+
"y0": 20,
101+
"y1": -20,
102+
"line": {
103+
"color": "rgba(96, 171, 50, 1)"
104+
}
105+
},
106+
{
107+
"type": "rect",
108+
"xref": "x",
109+
"xsizemode": "pixel",
110+
"yref": "y",
111+
"ysizemode": "pixel",
112+
"fillcolor": "rgba(96, 171, 50,0.7)",
113+
"xanchor": 7,
114+
"yanchor": 8,
115+
"x0": -20,
116+
"x1": 20,
117+
"y0": 20,
118+
"y1": -20,
119+
"line": {
120+
"color": "rgba(96, 171, 50, 1)"
121+
}
122+
},
123+
{
124+
"type": "line",
125+
"xref": "x",
126+
"xsizemode": "pixel",
127+
"yref": "y",
128+
"ysizemode": "pixel",
129+
"fillcolor": "rgba(96, 171, 50,0.7)",
130+
"xanchor": 6,
131+
"yanchor": -3,
132+
"x0": -20,
133+
"x1": 60,
134+
"y0": 0,
135+
"y1": 40,
136+
"line": {
137+
"color": "rgba(96, 171, 50, 1)"
138+
}
139+
},
140+
{
141+
"type": "path",
142+
"xref": "x2",
143+
"xsizemode": "pixel",
144+
"yref": "y2",
145+
"ysizemode": "pixel",
146+
"fillcolor": "rgba(96, 171, 50,0.7)",
147+
"xanchor": -1,
148+
"yanchor": 10,
149+
"path": "M0,0 L30,0 L15,15 Z",
150+
"line": {
151+
"color": "rgba(96, 171, 50, 1)"
152+
}
153+
},
154+
{
155+
"type": "rect",
156+
"xref": "x3",
157+
"xsizemode": "pixel",
158+
"yref": "y3",
159+
"ysizemode": "pixel",
160+
"fillcolor": "rgba(96, 171, 50,0.7)",
161+
"xanchor": 2,
162+
"yanchor": 2,
163+
"x0": 3,
164+
"x1": 53,
165+
"y0": 20,
166+
"y1": -20,
167+
"line": {
168+
"color": "rgba(96, 171, 50, 1)"
169+
}
170+
},
171+
{
172+
"type": "rect",
173+
"xref": "paper",
174+
"xsizemode": "scaled",
175+
"yref": "paper",
176+
"ysizemode": "pixel",
177+
"fillcolor": "rgba(96, 171, 50,0.7)",
178+
"xanchor": 0,
179+
"yanchor": 0,
180+
"x0": 0,
181+
"x1": 0.3,
182+
"y0": 10,
183+
"y1": -10,
184+
"line": {
185+
"color": "rgba(96, 171, 50, 1)"
186+
}
187+
},
188+
{
189+
"type": "rect",
190+
"xref": "x5",
191+
"xsizemode": "scaled",
192+
"yref": "y5",
193+
"ysizemode": "pixel",
194+
"fillcolor": "rgba(96, 171, 50,0.7)",
195+
"xanchor": 0,
196+
"yanchor": 10,
197+
"x0": 0,
198+
"x1": 10,
199+
"y0": 0,
200+
"y1": -30,
201+
"line": {
202+
"color": "rgba(96, 171, 50, 1)"
203+
}
204+
},
205+
{
206+
"type": "rect",
207+
"xref": "x5",
208+
"xsizemode": "pixel",
209+
"yref": "y5",
210+
"ysizemode": "scaled",
211+
"fillcolor": "rgba(96, 171, 50,0.7)",
212+
"xanchor": 3,
213+
"yanchor": 3,
214+
"x0": 0,
215+
"x1": 30,
216+
"y0": 0,
217+
"y1": 10,
218+
"line": {
219+
"color": "rgba(96, 171, 50, 1)"
220+
}
221+
},
222+
{
223+
"type": "path",
224+
"xref": "x6",
225+
"xsizemode": "pixel",
226+
"yref": "y6",
227+
"ysizemode": "scaled",
228+
"fillcolor": "rgba(96, 171, 50,0.7)",
229+
"xanchor": 10,
230+
"yanchor": 10,
231+
"path": "M0,0 L30,0 L15,4 Z",
232+
"line": {
233+
"color": "rgba(96, 171, 50, 1)"
234+
}
235+
},
236+
{
237+
"type": "path",
238+
"xref": "x6",
239+
"xsizemode": "scaled",
240+
"yref": "y6",
241+
"ysizemode": "pixel",
242+
"fillcolor": "rgba(96, 171, 50,0.7)",
243+
"xanchor": 10,
244+
"yanchor": 10,
245+
"path": "M0,0 L10,0 L5,25 Z",
246+
"line": {
247+
"color": "rgba(96, 171, 50, 1)"
248+
}
249+
}
250+
]
251+
},
252+
"config": {
253+
"editable": "true"
254+
}
255+
}

0 commit comments

Comments
 (0)