Skip to content

Commit 3833064

Browse files
committed
add image test for array tickmode on log & date axes
1 parent e8d081e commit 3833064

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed
Loading
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"data": [{
3+
"type": "scatter",
4+
"x": [
5+
"2010-01-01",
6+
"2010-02-01",
7+
"2010-03-01"
8+
],
9+
"y": [
10+
1,
11+
100,
12+
10
13+
]
14+
}],
15+
"layout": {
16+
"width": 500,
17+
"height": 300,
18+
"title": {
19+
"text": "custom ticks on date & log axes"
20+
},
21+
"paper_bgcolor": "lightblue",
22+
"plot_bgcolor": "#ddd",
23+
"yaxis": {
24+
"type": "log",
25+
"tickmode": "array",
26+
"tickvals": [
27+
1,
28+
10,
29+
100
30+
],
31+
"ticktext": [
32+
"one",
33+
"ten",
34+
"one<br>hundred"
35+
],
36+
"gridwidth": 2,
37+
"tickwidth": 15,
38+
"tickcolor": "green",
39+
"gridcolor": "green"
40+
},
41+
"xaxis": {
42+
"type": "date",
43+
"tickmode": "array",
44+
"tickvals": [
45+
"2010-01-16",
46+
"2010-02-14"
47+
],
48+
"ticktext": [
49+
"Jan 16",
50+
"Feb 14"
51+
],
52+
"gridwidth": 10,
53+
"tickwidth": 50,
54+
"tickcolor": "rgba(255,0,0,0.75)",
55+
"gridcolor": "rgba(255,0,0,0.25)"
56+
}
57+
}
58+
}

test/jasmine/tests/mock_test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ var list = [
7373
'axes_category_descending',
7474
'axes_category_descending_with_gaps',
7575
'axes_category_null',
76+
'axes_custom-ticks_log-date',
7677
'axes_enumerated_ticks',
7778
'axes_free_default',
7879
'axes_labels',
@@ -1108,6 +1109,7 @@ figs['axes_category_categoryarray_truncated_tails'] = require('@mocks/axes_categ
11081109
// figs['axes_category_descending'] = require('@mocks/axes_category_descending');
11091110
// figs['axes_category_descending_with_gaps'] = require('@mocks/axes_category_descending_with_gaps');
11101111
figs['axes_category_null'] = require('@mocks/axes_category_null');
1112+
figs['axes_custom-ticks_log-date'] = require('@mocks/axes_custom-ticks_log-date');
11111113
figs['axes_enumerated_ticks'] = require('@mocks/axes_enumerated_ticks');
11121114
figs['axes_free_default'] = require('@mocks/axes_free_default');
11131115
// figs['axes_labels'] = require('@mocks/axes_labels');

0 commit comments

Comments
 (0)