Skip to content

Commit 3a87dd4

Browse files
Add test for tickmode sync xAxes
1 parent 0ff7ca5 commit 3a87dd4

File tree

1 file changed

+31
-21
lines changed

1 file changed

+31
-21
lines changed

test/image/mocks/z-new_tickmode_sync.json

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,17 @@
2222
"name": "Oranges",
2323
"type": "scatter",
2424
"x": [
25-
"Jan",
26-
"Feb",
27-
"Mar",
28-
"Apr",
29-
"May"
30-
],
31-
"y": [
32-
-0.8,
33-
0.09,
34-
0.01,
35-
0.13,
36-
0.42
37-
],
38-
"yaxis": "y2"
25+
"A",
26+
"B",
27+
"C"
28+
],
29+
"y": [
30+
0,
31+
0.5,
32+
1
33+
],
34+
"yaxis": "y2",
35+
"xaxis": "x2"
3936
}
4037
],
4138
"layout": {
@@ -46,10 +43,19 @@
4643
"l": 70
4744
},
4845
"width": 700,
49-
"legend": {
50-
"orientation": "h",
51-
"x": 0.6,
52-
"y": 1.1
46+
"showlegend": false,
47+
"xaxis": {
48+
"autorange": "true"
49+
},
50+
"xaxis2": {
51+
"anchor": "y2",
52+
"side": "top",
53+
"overlaying": "x",
54+
"tickmode": "sync",
55+
"domain": [
56+
0.52,
57+
1
58+
]
5359
},
5460
"yaxis": {
5561
"title": {
@@ -60,7 +66,9 @@
6066
0,
6167
2506
6268
],
63-
"minor": { "showgrid": true }
69+
"minor": {
70+
"showgrid": true
71+
}
6472
},
6573
"yaxis2": {
6674
"title": {
@@ -73,8 +81,10 @@
7381
],
7482
"overlaying": "y",
7583
"tickmode": "sync",
76-
"minor": { "showgrid": true },
84+
"minor": {
85+
"showgrid": true
86+
},
7787
"zeroline": false
7888
}
7989
}
80-
}
90+
}

0 commit comments

Comments
 (0)