Skip to content

Commit 7f1d35c

Browse files
committed
Fix updatemenus descriptions and mocks
1 parent 65d71d3 commit 7f1d35c

File tree

4 files changed

+206
-2
lines changed

4 files changed

+206
-2
lines changed

src/components/updatemenus/attributes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = {
6363
dflt: false,
6464
description: [
6565
'For dropdown menus, opens the menu in the reverse direction'
66-
]
66+
].join(' ')
6767
},
6868

6969
type: {
@@ -85,7 +85,7 @@ module.exports = {
8585
description: [
8686
'Determines whether the menu and buttons are laid out vertically',
8787
'or horizontally'
88-
]
88+
].join(' ')
8989
},
9090

9191
active: {

test/image/baselines/updatemenus.png

1 Byte
Loading
36.6 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
{
2+
"data": [
3+
{
4+
"y": [
5+
0.8894873976401985,
6+
0.014899350293371638,
7+
0.6973412552835649,
8+
0.4322110719369108,
9+
0.6435204579331169,
10+
0.7913368293479852,
11+
0.45608188941724737,
12+
0.8773020090286707,
13+
0.7857950507320299,
14+
0.1565801184767599
15+
],
16+
"line": {
17+
"shape": "spline",
18+
"color": "blue"
19+
},
20+
"name": "Data set 0"
21+
}
22+
],
23+
"layout": {
24+
"updatemenus": [
25+
{
26+
"buttons": [
27+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
28+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]},
29+
{"label": "green", "method": "restyle", "args": ["marker.color", "green"]},
30+
{"label": "yellow", "method": "restyle", "args": ["marker.color", "yellow"]},
31+
{"label": "orange", "method": "restyle", "args": ["marker.color", "orange"]}
32+
],
33+
"x": 0.3,
34+
"y": 1.0,
35+
"yanchor": "top",
36+
"xanchor": "left"
37+
},
38+
{
39+
"buttons": [
40+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
41+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]},
42+
{"label": "green", "method": "restyle", "args": ["marker.color", "green"]},
43+
{"label": "yellow", "method": "restyle", "args": ["marker.color", "yellow"]},
44+
{"label": "orange", "method": "restyle", "args": ["marker.color", "orange"]}
45+
],
46+
"x": 0.3,
47+
"y": 0.66,
48+
"yanchor": "top",
49+
"xanchor": "left",
50+
"orientation": "h"
51+
},
52+
{
53+
"buttons": [
54+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
55+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]},
56+
{"label": "green", "method": "restyle", "args": ["marker.color", "green"]},
57+
{"label": "yellow", "method": "restyle", "args": ["marker.color", "yellow"]},
58+
{"label": "orange", "method": "restyle", "args": ["marker.color", "orange"]}
59+
],
60+
"x": 0.3,
61+
"y": 0.33,
62+
"yanchor": "top",
63+
"xanchor": "left",
64+
"orientation": "h",
65+
"openreverse": true
66+
},
67+
{
68+
"buttons": [
69+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
70+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]},
71+
{"label": "green", "method": "restyle", "args": ["marker.color", "green"]},
72+
{"label": "yellow", "method": "restyle", "args": ["marker.color", "yellow"]},
73+
{"label": "orange", "method": "restyle", "args": ["marker.color", "orange"]}
74+
],
75+
"x": 0.3,
76+
"y": 0.0,
77+
"yanchor": "top",
78+
"xanchor": "left",
79+
"orientation": "v",
80+
"openreverse": true
81+
},
82+
{
83+
"buttons": [
84+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
85+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]},
86+
{"label": "green", "method": "restyle", "args": ["marker.color", "green"]},
87+
{"label": "yellow", "method": "restyle", "args": ["marker.color", "yellow"]},
88+
{"label": "orange", "method": "restyle", "args": ["marker.color", "orange"]}
89+
],
90+
"type": "buttons",
91+
"x": -0.12,
92+
"y": 1.0,
93+
"yanchor": "top",
94+
"xanchor": "left",
95+
"showactive": false
96+
},
97+
{
98+
"buttons": [
99+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
100+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]},
101+
{"label": "green", "method": "restyle", "args": ["marker.color", "green"]},
102+
{"label": "yellow", "method": "restyle", "args": ["marker.color", "yellow"]},
103+
{"label": "orange", "method": "restyle", "args": ["marker.color", "orange"]}
104+
],
105+
"type": "buttons",
106+
"x": -0.12,
107+
"y": 1.01,
108+
"yanchor": "bottom",
109+
"xanchor": "left",
110+
"orientation": "h",
111+
"showactive": false
112+
},
113+
{
114+
"buttons": [
115+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
116+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]}
117+
],
118+
"type": "buttons",
119+
"x": 1,
120+
"y": 0.03,
121+
"yanchor": "bottom",
122+
"xanchor": "right"
123+
},
124+
{
125+
"buttons": [
126+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
127+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]}
128+
],
129+
"type": "buttons",
130+
"x": 1,
131+
"y": 0.02,
132+
"yanchor": "top",
133+
"xanchor": "right",
134+
"orientation": "h"
135+
},
136+
{
137+
"buttons": [
138+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
139+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]},
140+
{"label": "green", "method": "restyle", "args": ["marker.color", "green"]},
141+
{"label": "yellow", "method": "restyle", "args": ["marker.color", "yellow"]},
142+
{"label": "orange", "method": "restyle", "args": ["marker.color", "orange"]}
143+
],
144+
"x": 0.6,
145+
"y": 0.9,
146+
"yanchor": "top",
147+
"xanchor": "right"
148+
},
149+
{
150+
"buttons": [
151+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
152+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]},
153+
{"label": "green", "method": "restyle", "args": ["marker.color", "green"]},
154+
{"label": "yellow", "method": "restyle", "args": ["marker.color", "yellow"]},
155+
{"label": "orange", "method": "restyle", "args": ["marker.color", "orange"]}
156+
],
157+
"x": 0.6,
158+
"y": 0.9,
159+
"yanchor": "bottom",
160+
"xanchor": "left"
161+
},
162+
{
163+
"buttons": [
164+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
165+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]}
166+
],
167+
"x": 0.6,
168+
"y": 0.4,
169+
"type": "buttons",
170+
"yanchor": "top",
171+
"xanchor": "right"
172+
},
173+
{
174+
"buttons": [
175+
{"label": "red", "method": "restyle", "args": ["marker.color", "red"]},
176+
{"label": "blue", "method": "restyle", "args": ["marker.color", "blue"]}
177+
],
178+
"type": "buttons",
179+
"x": 0.6,
180+
"y": 0.4,
181+
"yanchor": "bottom",
182+
"xanchor": "left"
183+
}
184+
],
185+
"xaxis": {
186+
"range": [
187+
-0.5484683986041102,
188+
9.54846839860411
189+
],
190+
"autorange": true
191+
},
192+
"yaxis": {
193+
"type": "linear",
194+
"range": [
195+
0.14689768330153566,
196+
0.9369323077136202
197+
],
198+
"autorange": true
199+
},
200+
"height": 450,
201+
"width": 1100,
202+
"autosize": true
203+
}
204+
}

0 commit comments

Comments
 (0)