Skip to content

Commit 7587333

Browse files
committed
revise dflt
1 parent e973258 commit 7587333

File tree

8 files changed

+28
-28
lines changed

8 files changed

+28
-28
lines changed

src/plots/cartesian/axes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ axes.calcTicks = function calcTicks(ax, opts) {
887887
value: x
888888
};
889889

890-
if(ticklabelstep && (id % (ticklabelstep + 1))) {
890+
if(ticklabelstep > 1 && (id % ticklabelstep)) {
891891
obj.skipLabel = true;
892892
}
893893

@@ -3007,7 +3007,7 @@ axes.drawLabels = function(gd, ax, opts) {
30073007
var axLetter = axId.charAt(0);
30083008
var cls = opts.cls || axId + 'tick';
30093009

3010-
var vals = ax.ticklabelstep ?
3010+
var vals = ax.ticklabelstep > 1 ?
30113011
opts.vals.filter(function(d) { return !d.skipLabel; }) :
30123012
opts.vals;
30133013

src/plots/cartesian/layout_attributes.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -414,14 +414,14 @@ module.exports = {
414414
},
415415
ticklabelstep: {
416416
valType: 'integer',
417-
min: 0,
418-
dflt: 0,
417+
min: 1,
418+
dflt: 1,
419419
editType: 'ticks',
420420
description: [
421421
'Sets the spacing between tick labels as compared to the spacing between ticks.',
422-
'A value of 0 (default) means each tick gets a label.',
423-
'A value of 1 means shows every 2nd level.',
424-
'A larger value n means only every (n+1)th tick is labeled.',
422+
'A value of 1 (default) means each tick gets a label.',
423+
'A value of 2 means shows every 2nd level.',
424+
'A larger value n means only every nth tick is labeled.',
425425
'`tick0` determines which labels are shown.'
426426
].join(' ')
427427
},

test/image/mocks/h-colorbar05.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"len": 0.5,
2020
"ticks": "inside",
2121
"dtick": 20,
22-
"ticklabelstep": 1,
22+
"ticklabelstep": 2,
2323
"ticklabelposition": "inside right",
2424
"ticklen": 5,
2525
"bgcolor": "rgba(255,255,0,0.5)",
@@ -47,7 +47,7 @@
4747
}
4848
},
4949
"xaxis": {
50-
"ticklabelstep": 1,
50+
"ticklabelstep": 2,
5151
"side": "top"
5252
}
5353
}

test/image/mocks/indicator_attrs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"tickwidth": 5,
109109
"tickcolor": "blue",
110110
"showticklabels": true,
111-
"ticklabelstep": 1,
111+
"ticklabelstep": 2,
112112
"tickfont": {
113113
"family": "Arial",
114114
"size": 16,

test/image/mocks/period_positioning7.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@
381381
"dtick": 604800000,
382382
"tickformat": "%W",
383383
"ticklabelmode": "period",
384-
"ticklabelstep": 3,
384+
"ticklabelstep": 4,
385385
"tickcolor": "black"
386386
}
387387
}

test/image/mocks/polar_ticks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,7 @@
18541854
},
18551855
"radialaxis": {},
18561856
"angularaxis": {
1857-
"ticklabelstep": 2,
1857+
"ticklabelstep": 3,
18581858
"dtick": 10,
18591859
"tickfont": {
18601860
"size": 10,

test/image/mocks/ternary_array_styles.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@
111111
"layout": {
112112
"ternary": {
113113
"aaxis": {
114-
"ticklabelstep": 3,
114+
"ticklabelstep": 4,
115115
"dtick": 0.05,
116116
"showline": true,
117117
"ticks": "inside",
118118
"showgrid": true,
119119
"color": "#ccc"
120120
},
121121
"baxis": {
122-
"ticklabelstep": 1,
122+
"ticklabelstep": 2,
123123
"dtick": 0.1,
124124
"showline": true,
125125
"ticks": "inside",

test/image/mocks/z-date_axes-ticklabelstep.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,19 @@
7373
"showlegend": false,
7474
"width": 600,
7575
"height": 500,
76-
"yaxis": {"ticklabelstep": 1, "domain": [0, 0.04]},
77-
"yaxis2": {"ticklabelstep": 1, "domain": [0.16, 0.2]},
78-
"yaxis3": {"ticklabelstep": 1, "domain": [0.32, 0.36]},
79-
"yaxis4": {"ticklabelstep": 1, "domain": [0.48, 0.52]},
80-
"yaxis5": {"ticklabelstep": 1, "domain": [0.64, 0.68]},
81-
"yaxis6": {"ticklabelstep": 1, "domain": [0.80, 0.84]},
82-
"yaxis7": {"ticklabelstep": 1, "domain": [0.96, 1]},
83-
"xaxis": {"ticklabelstep": 1, "tickcolor": "black", "anchor": "y"},
84-
"xaxis2": {"ticklabelstep": 1, "tickcolor": "black", "anchor": "y2"},
85-
"xaxis3": {"ticklabelstep": 1, "tickcolor": "black", "anchor": "y3"},
86-
"xaxis4": {"ticklabelstep": 1, "tickcolor": "black", "anchor": "y4"},
87-
"xaxis5": {"ticklabelstep": 1, "tickcolor": "black", "anchor": "y5"},
88-
"xaxis6": {"ticklabelstep": 1, "tickcolor": "black", "anchor": "y6"},
89-
"xaxis7": {"ticklabelstep": 1, "tickcolor": "black", "anchor": "y7"}
76+
"yaxis": {"ticklabelstep": 2, "domain": [0, 0.04]},
77+
"yaxis2": {"ticklabelstep": 2, "domain": [0.16, 0.2]},
78+
"yaxis3": {"ticklabelstep": 2, "domain": [0.32, 0.36]},
79+
"yaxis4": {"ticklabelstep": 2, "domain": [0.48, 0.52]},
80+
"yaxis5": {"ticklabelstep": 2, "domain": [0.64, 0.68]},
81+
"yaxis6": {"ticklabelstep": 2, "domain": [0.80, 0.84]},
82+
"yaxis7": {"ticklabelstep": 2, "domain": [0.96, 1]},
83+
"xaxis": {"ticklabelstep": 2, "tickcolor": "black", "anchor": "y"},
84+
"xaxis2": {"ticklabelstep": 2, "tickcolor": "black", "anchor": "y2"},
85+
"xaxis3": {"ticklabelstep": 2, "tickcolor": "black", "anchor": "y3"},
86+
"xaxis4": {"ticklabelstep": 2, "tickcolor": "black", "anchor": "y4"},
87+
"xaxis5": {"ticklabelstep": 2, "tickcolor": "black", "anchor": "y5"},
88+
"xaxis6": {"ticklabelstep": 2, "tickcolor": "black", "anchor": "y6"},
89+
"xaxis7": {"ticklabelstep": 2, "tickcolor": "black", "anchor": "y7"}
9090
}
9191
}

0 commit comments

Comments
 (0)