Skip to content

Commit 3d2049c

Browse files
committed
🔒 down [un]selected styles in mocks
1 parent 9ccccd3 commit 3d2049c

10 files changed

+218
-0
lines changed
58.8 KB
Loading
1.07 KB
Loading
23.7 KB
Loading
409 Bytes
Loading
2.12 KB
Loading
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"data": [{
3+
"selectedpoints": [1, 2, 4],
4+
"type": "choropleth",
5+
"locations": ["CAN", "USA", "RUS", "AUS", "FRA"],
6+
"z": [0, 1, 1, 0, 1],
7+
"colorscale": [[0, "blue"], [1, "orange"]],
8+
"showscale": false,
9+
"selected": {
10+
"marker": {
11+
"opacity": 0.8
12+
}
13+
},
14+
"unselected": {
15+
"marker": {
16+
"opacity": 0.5
17+
}
18+
}
19+
}, {
20+
"selectedpoints": [0, 2],
21+
"type": "scattergeo",
22+
"mode": "markers+text",
23+
"lon": [0, -75, 100],
24+
"lat": [0, 45, -30],
25+
"selected": {
26+
"marker": {
27+
"color": "green",
28+
"opacity": 1,
29+
"size": 20
30+
}
31+
},
32+
"unselected": {
33+
"marker": {
34+
"color": "red",
35+
"opacity": 0.5,
36+
"size": 10
37+
}
38+
}
39+
}],
40+
"layout": {
41+
"dragmode": "lasso",
42+
"showlegend": false,
43+
"width": 700,
44+
"height": 500,
45+
"geo": {
46+
"projection": {
47+
"type": "miller"
48+
}
49+
}
50+
}
51+
}

test/image/mocks/mapbox_bubbles.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,24 @@
2828
[1, "rgb(178,10,28)"]
2929
]
3030
}
31+
},
32+
{
33+
"type": "scattermapbox",
34+
"selectedpoints": [1],
35+
"mode": "markers",
36+
"lon": [-10, -20, -30],
37+
"lat": [10, 20, 30],
38+
"marker": {"size": 20},
39+
"selected": {
40+
"marker": {
41+
"opacity": 0.8
42+
}
43+
},
44+
"unselected": {
45+
"marker": {
46+
"opacity": 0.5
47+
}
48+
}
3149
}
3250
],
3351
"layout": {
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"data": [{
3+
"selectedpoints": [1, 2, 3],
4+
"type": "bar",
5+
"y": [1, 3, 2, 4, 5, 7],
6+
"selected": {
7+
"marker": {
8+
"opacity": 1,
9+
"color": "green"
10+
}
11+
},
12+
"unselected": {
13+
"marker": {
14+
"opacity": 0.5,
15+
"color": "red"
16+
}
17+
}
18+
}, {
19+
"selectedpoints": [1, 2],
20+
"type": "histogram",
21+
"xaxis": "x2",
22+
"yaxis": "y2",
23+
"x": [0.2, 0.2, 0.6, 1, 0.5, 0.4, 0.2, 0.7, 0.9, 0.1, 0.5, 0.3],
24+
"selected": {
25+
"marker": {
26+
"opacity": 1,
27+
"color": "green"
28+
}
29+
},
30+
"unselected": {
31+
"marker": {
32+
"opacity": 0.5,
33+
"color": "red"
34+
}
35+
}
36+
}, {
37+
"selectedpoints": [1, 2, 3],
38+
"type": "box",
39+
"y": [0.2, 0.2, 0.6, 1, 0.5, 0.4, 0.2, 0.7, 0.9, 0.1, 0.5, 0.3],
40+
"boxpoints": "all",
41+
"xaxis": "x3",
42+
"yaxis": "y3",
43+
"selected": {
44+
"marker": {
45+
"opacity": 1,
46+
"color": "green"
47+
}
48+
},
49+
"unselected": {
50+
"marker": {
51+
"opacity": 0.5,
52+
"color": "red"
53+
}
54+
}
55+
}, {
56+
"selectedpoints": [1, 2, 3],
57+
"type": "violin",
58+
"y": [0.2, 0.2, 0.6, 1, 0.5, 0.4, 0.2, 0.7, 0.9, 0.1, 0.5, 0.3],
59+
"points": "all",
60+
"xaxis": "x4",
61+
"yaxis": "y4",
62+
"selected": {
63+
"marker": {
64+
"opacity": 1,
65+
"color": "green"
66+
}
67+
},
68+
"unselected": {
69+
"marker": {
70+
"opacity": 0.5,
71+
"color": "red"
72+
}
73+
}
74+
}],
75+
"layout": {
76+
"dragmode": "select",
77+
"showlegend": false,
78+
"width": 500,
79+
"height": 500,
80+
"margin": {"l": 20, "b": 0, "t": 0, "r": 20},
81+
"xaxis": {
82+
"domain": [0, 0.48]
83+
},
84+
"yaxis": {
85+
"domain": [0, 0.48]
86+
},
87+
"xaxis2": {
88+
"domain": [0.52, 1],
89+
"anchor": "y2"
90+
},
91+
"yaxis2": {
92+
"domain": [0, 0.48],
93+
"anchor": "x2"
94+
},
95+
"xaxis3": {
96+
"domain": [0, 0.48],
97+
"anchor": "y3"
98+
},
99+
"yaxis3": {
100+
"domain": [0.52, 1],
101+
"anchor": "x3"
102+
},
103+
"xaxis4": {
104+
"domain": [0.52, 1],
105+
"anchor": "y4"
106+
},
107+
"yaxis4": {
108+
"domain": [0.52, 1],
109+
"anchor": "x4"
110+
}
111+
}
112+
}

test/image/mocks/scattercarpet.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,21 @@
7575
"line": {
7676
"smoothing": 1,
7777
"shape": "spline"
78+
},
79+
"selectedpoints": [1],
80+
"selected": {
81+
"marker": {
82+
"size": 20,
83+
"color": "green",
84+
"opacity": 1
85+
}
86+
},
87+
"unselected": {
88+
"marker": {
89+
"size": 20,
90+
"color": "red",
91+
"opacity": 0.5
92+
}
7893
}
7994
}
8095
],

test/image/mocks/ternary_array_styles.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,28 @@
8484
"width": 3
8585
},
8686
"connectgaps": true
87+
},
88+
{
89+
"type": "scatterternary",
90+
"mode": "markers",
91+
"a": [0.1, 0.3, 0.2],
92+
"b": [0.1, 0.9, 0.4],
93+
"c": [0.1, 0.2, 0.1],
94+
"selectedpoints": [0, 2],
95+
"selected": {
96+
"marker": {
97+
"color": "green",
98+
"opacity": 1,
99+
"size": 20
100+
}
101+
},
102+
"unselected": {
103+
"marker": {
104+
"color": "red",
105+
"opacity": 0.5,
106+
"size": 10
107+
}
108+
}
87109
}
88110
],
89111
"layout": {

0 commit comments

Comments
 (0)