Skip to content

Commit cb43197

Browse files
committed
add test for stack bars
1 parent ce2d66c commit cb43197

File tree

2 files changed

+259
-0
lines changed

2 files changed

+259
-0
lines changed
20.5 KB
Loading
Lines changed: 259 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
{
2+
"data": [
3+
{
4+
"xaxis": "x",
5+
"yaxis": "y",
6+
"type": "bar",
7+
"orientation": "h",
8+
"y": [
9+
"A",
10+
"B",
11+
"C"
12+
],
13+
"x": [
14+
2,
15+
-2,
16+
2
17+
],
18+
"text": [
19+
"+2",
20+
"-2",
21+
"+2"
22+
],
23+
"textposition": "inside",
24+
"textangle": 0,
25+
"base": 10
26+
},
27+
{
28+
"xaxis": "x2",
29+
"yaxis": "y2",
30+
"type": "bar",
31+
"x": [
32+
"E",
33+
"F",
34+
"G"
35+
],
36+
"y": [
37+
2,
38+
-2,
39+
2
40+
],
41+
"text": [
42+
"+2",
43+
"-2",
44+
"+2"
45+
],
46+
"textposition": "inside",
47+
"textangle": 0,
48+
"base": -10
49+
},
50+
{
51+
"xaxis": "x3",
52+
"yaxis": "y3",
53+
"type": "bar",
54+
"x": [
55+
"E",
56+
"F",
57+
"G"
58+
],
59+
"y": [
60+
2,
61+
-2,
62+
2
63+
],
64+
"text": [
65+
"+2",
66+
"-2",
67+
"+2"
68+
],
69+
"textposition": "inside",
70+
"textangle": 0,
71+
"base": 10
72+
},
73+
{
74+
"xaxis": "x4",
75+
"yaxis": "y4",
76+
"type": "bar",
77+
"orientation": "h",
78+
"y": [
79+
"A",
80+
"B",
81+
"C"
82+
],
83+
"x": [
84+
2,
85+
-2,
86+
2
87+
],
88+
"text": [
89+
"+2",
90+
"-2",
91+
"+2"
92+
],
93+
"textposition": "inside",
94+
"textangle": 0,
95+
"base": -10
96+
},
97+
{
98+
"xaxis": "x",
99+
"yaxis": "y",
100+
"type": "bar",
101+
"orientation": "h",
102+
"y": [
103+
"A",
104+
"B",
105+
"C"
106+
],
107+
"x": [
108+
1,
109+
-1,
110+
1
111+
],
112+
"text": [
113+
"+1",
114+
"-1",
115+
"+1"
116+
],
117+
"textposition": "inside",
118+
"textangle": 0,
119+
"base": 10
120+
},
121+
{
122+
"xaxis": "x2",
123+
"yaxis": "y2",
124+
"type": "bar",
125+
"x": [
126+
"E",
127+
"F",
128+
"G"
129+
],
130+
"y": [
131+
1,
132+
-1,
133+
1
134+
],
135+
"text": [
136+
"+1",
137+
"-1",
138+
"+1"
139+
],
140+
"textposition": "inside",
141+
"textangle": 0,
142+
"base": -10
143+
},
144+
{
145+
"xaxis": "x3",
146+
"yaxis": "y3",
147+
"type": "bar",
148+
"x": [
149+
"E",
150+
"F",
151+
"G"
152+
],
153+
"y": [
154+
1,
155+
-1,
156+
1
157+
],
158+
"text": [
159+
"+1",
160+
"-1",
161+
"+1"
162+
],
163+
"textposition": "inside",
164+
"textangle": 0,
165+
"base": 10
166+
},
167+
{
168+
"xaxis": "x4",
169+
"yaxis": "y4",
170+
"type": "bar",
171+
"orientation": "h",
172+
"y": [
173+
"A",
174+
"B",
175+
"C"
176+
],
177+
"x": [
178+
1,
179+
-1,
180+
1
181+
],
182+
"text": [
183+
"+1",
184+
"-1",
185+
"+1"
186+
],
187+
"textposition": "inside",
188+
"textangle": 0,
189+
"base": -10
190+
}
191+
],
192+
"layout": {
193+
"width": 400,
194+
"height": 400,
195+
"template": {
196+
"layout": {
197+
"barmode": "stack",
198+
"showlegend": false,
199+
"title": {
200+
"text": "non-zero autorange with<br>base and negative size"
201+
},
202+
"xaxis": {
203+
"domain": [
204+
0,
205+
0.45
206+
]
207+
},
208+
"yaxis": {
209+
"domain": [
210+
0,
211+
0.45
212+
]
213+
},
214+
"xaxis2": {
215+
"anchor": "y2",
216+
"domain": [
217+
0.55,
218+
1
219+
]
220+
},
221+
"yaxis2": {
222+
"anchor": "x2",
223+
"domain": [
224+
0.55,
225+
1
226+
]
227+
},
228+
"xaxis3": {
229+
"anchor": "y3",
230+
"domain": [
231+
0,
232+
0.45
233+
]
234+
},
235+
"yaxis3": {
236+
"anchor": "x3",
237+
"domain": [
238+
0.55,
239+
1
240+
]
241+
},
242+
"xaxis4": {
243+
"anchor": "y4",
244+
"domain": [
245+
0.55,
246+
1
247+
]
248+
},
249+
"yaxis4": {
250+
"anchor": "x4",
251+
"domain": [
252+
0,
253+
0.45
254+
]
255+
}
256+
}
257+
}
258+
}
259+
}

0 commit comments

Comments
 (0)