Skip to content

Commit e62be46

Browse files
Remove unused tickmode sync mode to some plot types
1 parent 6446faf commit e62be46

File tree

7 files changed

+302
-10
lines changed

7 files changed

+302
-10
lines changed

src/components/colorbar/attributes.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,19 @@ module.exports = overrideAll({
129129
description: 'Sets the color of padded area.'
130130
},
131131
// tick and title properties named and function exactly as in axes
132-
tickmode: axesAttrs.tickmode,
132+
tickmode: extendFlat({}, axesAttrs.tickmode, {
133+
dflt: ['auto', 'linear', 'array'],
134+
description: [
135+
'Sets the tick mode for this axis.',
136+
'If *auto*, the number of ticks is set via `nticks`.',
137+
'If *linear*, the placement of the ticks is determined by',
138+
'a starting position `tick0` and a tick step `dtick`',
139+
'(*linear* is the default value if `tick0` and `dtick` are provided).',
140+
'If *array*, the placement of the ticks is set via `tickvals`',
141+
'and the tick text is `ticktext`.',
142+
'(*array* is the default value if `tickvals` is provided).'
143+
].join(' ')
144+
}),
133145
nticks: axesAttrs.nticks,
134146
tick0: axesAttrs.tick0,
135147
dtick: axesAttrs.dtick,

src/plots/cartesian/layout_attributes.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ var tickmode = {
2525
'(*linear* is the default value if `tick0` and `dtick` are provided).',
2626
'If *array*, the placement of the ticks is set via `tickvals`',
2727
'and the tick text is `ticktext`.',
28-
'(*array* is the default value if `tickvals` is provided).'
28+
'(*array* is the default value if `tickvals` is provided).',
29+
'If *sync*, the number of ticks will sync with the overlayed axis',
30+
'set by `overlaying` property.'
2931
].join(' ')
3032
};
3133

src/plots/gl3d/layout/axis_attributes.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,19 @@ module.exports = overrideAll({
7474
anim: false
7575
}),
7676
// ticks
77-
tickmode: axesAttrs.tickmode,
77+
tickmode: extendFlat({}, axesAttrs.tickmode, {
78+
dflt: ['auto', 'linear', 'array'],
79+
description: [
80+
'Sets the tick mode for this axis.',
81+
'If *auto*, the number of ticks is set via `nticks`.',
82+
'If *linear*, the placement of the ticks is determined by',
83+
'a starting position `tick0` and a tick step `dtick`',
84+
'(*linear* is the default value if `tick0` and `dtick` are provided).',
85+
'If *array*, the placement of the ticks is set via `tickvals`',
86+
'and the tick text is `ticktext`.',
87+
'(*array* is the default value if `tickvals` is provided).'
88+
].join(' ')
89+
}),
7890
nticks: axesAttrs.nticks,
7991
tick0: axesAttrs.tick0,
8092
dtick: axesAttrs.dtick,

src/plots/polar/layout_attributes.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,19 @@ var axisLineGridAttr = overrideAll({
2323
}, 'plot', 'from-root');
2424

2525
var axisTickAttrs = overrideAll({
26-
tickmode: axesAttrs.tickmode,
26+
tickmode: extendFlat({}, axesAttrs.tickmode, {
27+
dflt: ['auto', 'linear', 'array'],
28+
description: [
29+
'Sets the tick mode for this axis.',
30+
'If *auto*, the number of ticks is set via `nticks`.',
31+
'If *linear*, the placement of the ticks is determined by',
32+
'a starting position `tick0` and a tick step `dtick`',
33+
'(*linear* is the default value if `tick0` and `dtick` are provided).',
34+
'If *array*, the placement of the ticks is set via `tickvals`',
35+
'and the tick text is `ticktext`.',
36+
'(*array* is the default value if `tickvals` is provided).'
37+
].join(' ')
38+
}),
2739
nticks: axesAttrs.nticks,
2840
tick0: axesAttrs.tick0,
2941
dtick: axesAttrs.dtick,

src/plots/ternary/layout_attributes.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,19 @@ var ternaryAxesAttrs = {
1515
},
1616
color: axesAttrs.color,
1717
// ticks
18-
tickmode: axesAttrs.tickmode,
18+
tickmode: extendFlat({}, axesAttrs.tickmode, {
19+
dflt: ['auto', 'linear', 'array'],
20+
description: [
21+
'Sets the tick mode for this axis.',
22+
'If *auto*, the number of ticks is set via `nticks`.',
23+
'If *linear*, the placement of the ticks is determined by',
24+
'a starting position `tick0` and a tick step `dtick`',
25+
'(*linear* is the default value if `tick0` and `dtick` are provided).',
26+
'If *array*, the placement of the ticks is set via `tickvals`',
27+
'and the tick text is `ticktext`.',
28+
'(*array* is the default value if `tickvals` is provided).'
29+
].join(' ')
30+
}),
1931
nticks: extendFlat({}, axesAttrs.nticks, {dflt: 6, min: 1}),
2032
tick0: axesAttrs.tick0,
2133
dtick: axesAttrs.dtick,

src/traces/indicator/attributes.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,19 @@ module.exports = {
307307
dflt: true
308308
}),
309309
// tick and title properties named and function exactly as in axes
310-
tickmode: axesAttrs.tickmode,
310+
tickmode: extendFlat({}, axesAttrs.tickmode, {
311+
dflt: ['auto', 'linear', 'array'],
312+
description: [
313+
'Sets the tick mode for this axis.',
314+
'If *auto*, the number of ticks is set via `nticks`.',
315+
'If *linear*, the placement of the ticks is determined by',
316+
'a starting position `tick0` and a tick step `dtick`',
317+
'(*linear* is the default value if `tick0` and `dtick` are provided).',
318+
'If *array*, the placement of the ticks is set via `tickvals`',
319+
'and the tick text is `ticktext`.',
320+
'(*array* is the default value if `tickvals` is provided).'
321+
].join(' ')
322+
}),
311323
nticks: axesAttrs.nticks,
312324
tick0: axesAttrs.tick0,
313325
dtick: axesAttrs.dtick,

0 commit comments

Comments
 (0)