Skip to content

Commit 0162170

Browse files
committed
add test hide period labels intersect inside labels - validate mocks
1 parent e182686 commit 0162170

File tree

4 files changed

+117
-4
lines changed

4 files changed

+117
-4
lines changed
37.6 KB
Loading

test/image/mocks/ticklabelposition-6.json

-4
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,21 @@
22
"data": [{
33
"xaxis": "x",
44
"yaxis": "y",
5-
"orientation": "h",
65
"x": [0.4, 0.5, 0.6, 0.7, 0.8],
76
"y": ["Oo", "Pp", "Qq", "Rr", "Ss"]
87
}, {
98
"xaxis": "x2",
109
"yaxis": "y2",
11-
"orientation": "h",
1210
"x": [0.4, 0.5, 0.6, 0.7, 0.8],
1311
"y": ["Oo", "Pp", "Qq", "Rr", "Ss"]
1412
}, {
1513
"xaxis": "x3",
1614
"yaxis": "y3",
17-
"orientation": "v",
1815
"y": [0.4, 0.5, 0.6, 0.7, 0.8],
1916
"x": ["Oo", "Pp", "Qq", "Rr", "Ss"]
2017
}, {
2118
"xaxis": "x4",
2219
"yaxis": "y4",
23-
"orientation": "v",
2420
"y": [0.4, 0.5, 0.6, 0.7, 0.8],
2521
"x": ["Oo", "Pp", "Qq", "Rr", "Ss"]
2622
}],
+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
{
2+
"data": [{
3+
"xaxis": "x",
4+
"yaxis": "y",
5+
"x": ["20-10", "21-03"],
6+
"y": [1e-1, 1e+6]
7+
}, {
8+
"xaxis": "x2",
9+
"yaxis": "y2",
10+
"x": ["21-03", "20-10"],
11+
"y": [1e+6, 1e-1]
12+
}, {
13+
"xaxis": "x3",
14+
"yaxis": "y3",
15+
"x": ["20", "23"],
16+
"y": [1e-1, 1e+6]
17+
}, {
18+
"xaxis": "x4",
19+
"yaxis": "y4",
20+
"x": ["23", "20"],
21+
"y": [1e+6, 1e-1]
22+
}],
23+
"layout": {
24+
"xaxis": {
25+
"anchor": "y",
26+
"domain": [0, 0.475],
27+
"type": "date",
28+
"ticks": "outside",
29+
"ticklabelmode": "period",
30+
"side": "bottom",
31+
"gridcolor": "white"
32+
},
33+
"yaxis": {
34+
"anchor": "x",
35+
"domain": [0, 0.475],
36+
"type": "log",
37+
"side": "left",
38+
"ticks": "inside",
39+
"ticklabelposition": "inside bottom",
40+
"gridcolor": "white"
41+
},
42+
"xaxis2": {
43+
"anchor": "y2",
44+
"domain": [0.525, 1],
45+
"autorange": "reversed",
46+
"type": "date",
47+
"ticks": "outside",
48+
"ticklabelmode": "period",
49+
"side": "bottom",
50+
"ticklabelposition": "inside left",
51+
"gridcolor": "white"
52+
},
53+
"yaxis2": {
54+
"anchor": "x2",
55+
"domain": [0, 0.475],
56+
"type": "log",
57+
"side": "right",
58+
"ticks": "inside",
59+
"ticklabelposition": "inside bottom",
60+
"gridcolor": "white"
61+
},
62+
"xaxis3": {
63+
"anchor": "y3",
64+
"domain": [0.525, 1],
65+
"type": "date",
66+
"ticks": "outside",
67+
"ticklabelmode": "period",
68+
"side": "top",
69+
"ticklabelposition": "inside right",
70+
"gridcolor": "white"
71+
},
72+
"yaxis3": {
73+
"anchor": "x3",
74+
"domain": [0.525, 1],
75+
"type": "log",
76+
"side": "right",
77+
"ticks": "inside",
78+
"ticklabelposition": "inside bottom",
79+
"gridcolor": "white"
80+
},
81+
"xaxis4": {
82+
"anchor": "y4",
83+
"domain": [0, 0.475],
84+
"autorange": "reversed",
85+
"type": "date",
86+
"ticks": "outside",
87+
"ticklabelmode": "period",
88+
"side": "top",
89+
"gridcolor": "white"
90+
},
91+
"yaxis4": {
92+
"anchor": "x4",
93+
"domain": [0.525, 1],
94+
"type": "log",
95+
"side": "left",
96+
"ticks": "inside",
97+
"ticklabelposition": "inside bottom",
98+
"gridcolor": "white"
99+
},
100+
"plot_bgcolor": "lightblue",
101+
"showlegend": false,
102+
"width": 500,
103+
"height": 500,
104+
"margin": {
105+
"t": 50,
106+
"b": 50,
107+
"l": 50,
108+
"r": 50
109+
}
110+
}
111+
}

test/jasmine/tests/mock_test.js

+6
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,9 @@ var list = [
969969
'ticklabelposition-2',
970970
'ticklabelposition-3',
971971
'ticklabelposition-4',
972+
'ticklabelposition-5',
973+
'ticklabelposition-6',
974+
'ticklabelposition-7',
972975
'ticklabelposition-a',
973976
'ticklabelposition-b',
974977
'ticklabelposition-c',
@@ -2058,6 +2061,9 @@ figs['ticklabelposition-1'] = require('@mocks/ticklabelposition-1');
20582061
figs['ticklabelposition-2'] = require('@mocks/ticklabelposition-2');
20592062
figs['ticklabelposition-3'] = require('@mocks/ticklabelposition-3');
20602063
figs['ticklabelposition-4'] = require('@mocks/ticklabelposition-4');
2064+
figs['ticklabelposition-5'] = require('@mocks/ticklabelposition-5');
2065+
figs['ticklabelposition-6'] = require('@mocks/ticklabelposition-6');
2066+
figs['ticklabelposition-7'] = require('@mocks/ticklabelposition-7');
20612067
figs['ticklabelposition-a'] = require('@mocks/ticklabelposition-a');
20622068
figs['ticklabelposition-b'] = require('@mocks/ticklabelposition-b');
20632069
figs['ticklabelposition-c'] = require('@mocks/ticklabelposition-c');

0 commit comments

Comments
 (0)