Skip to content

Commit d89f23e

Browse files
moving coercion around
1 parent 25a36db commit d89f23e

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/plots/cartesian/axis_defaults.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,7 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce,
7575

7676
handleTickValueDefaults(containerIn, containerOut, coerce, axType);
7777
handleTickLabelDefaults(containerIn, containerOut, coerce, axType, options);
78-
handleTickMarkDefaults(containerIn, containerOut, coerce, {
79-
automargin: true,
80-
tickSuffixDflt: options.tickSuffixDflt,
81-
font: options.font,
82-
noHover: options.noHover
83-
});
78+
handleTickMarkDefaults(containerIn, containerOut, coerce, options);
8479
handleLineGridDefaults(containerIn, containerOut, coerce, {
8580
dfltColor: dfltColor,
8681
bgColor: options.bgColor,
@@ -90,5 +85,7 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce,
9085

9186
if(containerOut.showline || containerOut.ticks) coerce('mirror');
9287

88+
if(options.automargin) coerce('ticklabelsautomargin');
89+
9390
return containerOut;
9491
};

src/plots/cartesian/layout_defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
138138
data: fullData,
139139
bgColor: bgColor,
140140
calendar: layoutOut.calendar,
141+
automargin: true,
141142
cheateronly: axLetter === 'x' && xaCheater[axName] && !xaNonCheater[axName]
142143
};
143144

src/plots/cartesian/tick_label_defaults.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ module.exports = function handleTickLabelDefaults(containerIn, containerOut, coe
5050
}
5151

5252
if(axType !== 'category' && !options.noHover) coerce('hoverformat');
53-
54-
55-
if(options.automargin) coerce('ticklabelsautomargin');
5653
};
5754

5855
/*

0 commit comments

Comments
 (0)