Skip to content

Commit 8ec9a45

Browse files
committed
Add noAutotickangles option for handleTickLabelDefaults calls outside of cartesian.
1 parent be99b12 commit 8ec9a45

File tree

10 files changed

+20
-5
lines changed

10 files changed

+20
-5
lines changed

src/components/colorbar/defaults.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ module.exports = function colorbarDefaults(containerIn, containerOut, layout) {
109109
handleTickValueDefaults(colorbarIn, colorbarOut, coerce, 'linear');
110110

111111
var font = layout.font;
112-
var opts = {outerTicks: false, font: font};
112+
var opts = {
113+
noAutotickangles: true,
114+
outerTicks: false,
115+
font: font
116+
};
113117
if(ticklabelposition.indexOf('inside') !== -1) {
114118
opts.bgColor = 'black'; // could we instead use the average of colors in the scale?
115119
}

src/components/colorbar/draw.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,7 @@ function mockColorBarAxis(gd, opts, zrange) {
10011001
var axisOptions = {
10021002
letter: letter,
10031003
font: fullLayout.font,
1004+
noAutoTickangles: true,
10041005
noHover: true,
10051006
noTickson: true,
10061007
noTicklabelmode: true,

src/plots/cartesian/tick_label_defaults.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ module.exports = function handleTickLabelDefaults(containerIn, containerOut, coe
4242

4343
if(!options.noAng) {
4444
coerce('tickangle');
45-
coerce('autotickangles');
45+
if(!options.noAutotickangles) {
46+
coerce('autotickangles');
47+
}
4648
}
4749

4850
if(axType !== 'category') {

src/plots/gl3d/layout/axis_defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, options) {
4141
letter: axName[0],
4242
data: options.data,
4343
showGrid: true,
44+
noAutotickangles: true,
4445
noTickson: true,
4546
noTicklabelmode: true,
4647
noTicklabelstep: true,

src/plots/polar/layout_defaults.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ function handleDefaults(contIn, contOut, coerce, opts) {
167167
color: dfltFontColor,
168168
size: dfltFontSize,
169169
family: dfltFontFamily
170-
}
170+
},
171+
noAutotickangles: true
171172
});
172173

173174
handleTickMarkDefaults(axIn, axOut, coerceAxis, {outerTicks: true});

src/plots/smith/layout_defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ function handleDefaults(contIn, contOut, coerce, opts) {
8383
}
8484

8585
handleTickLabelDefaults(axIn, axOut, coerceAxis, axOut.type, {
86+
noAutotickangles: true,
8687
noTicklabelstep: true,
8788
noAng: !isRealAxis,
8889
noExp: true,

src/plots/ternary/layout_defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function handleAxisDefaults(containerIn, containerOut, options, ternaryLayoutOut
9292

9393
handleTickValueDefaults(containerIn, containerOut, coerce, 'linear');
9494
handlePrefixSuffixDefaults(containerIn, containerOut, coerce, 'linear');
95-
handleTickLabelDefaults(containerIn, containerOut, coerce, 'linear');
95+
handleTickLabelDefaults(containerIn, containerOut, coerce, 'linear', { noAutickangles: true });
9696
handleTickMarkDefaults(containerIn, containerOut, coerce,
9797
{ outerTicks: true });
9898

src/traces/carpet/ab_defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ function mimickAxisDefaults(traceIn, traceOut, fullLayout, dfltColor) {
3030
var axOut = Template.newContainer(traceOut, axName);
3131

3232
var defaultOptions = {
33+
noAutotickangles: true,
3334
noTicklabelstep: true,
3435
tickfont: 'x',
3536
id: axLetter + 'axis',

src/traces/indicator/defaults.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ function supplyDefaults(traceIn, traceOut, defaultColor, layout) {
129129
coerceGaugeAxis('visible');
130130
traceOut._range = coerceGaugeAxis('range', traceOut._range);
131131

132-
var opts = {outerTicks: true};
132+
var opts = {
133+
noAutotickangles: true,
134+
outerTicks: true
135+
};
133136
handleTickValueDefaults(axisIn, axisOut, coerceGaugeAxis, 'linear');
134137
handlePrefixSuffixDefaults(axisIn, axisOut, coerceGaugeAxis, 'linear', opts);
135138
handleTickLabelDefaults(axisIn, axisOut, coerceGaugeAxis, 'linear', opts);

src/traces/indicator/plot.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ function mockAxis(gd, opts, zrange) {
823823
var axisOptions = {
824824
letter: 'x',
825825
font: fullLayout.font,
826+
noAutotickangles: true,
826827
noHover: true,
827828
noTickson: true
828829
};

0 commit comments

Comments
 (0)