Skip to content

Commit 874b1ba

Browse files
committed
split cases of early returns in drawLabels
- when label position is undefined, don't (re)-calc its bounding box as that could override previous 'correct' calculations (e.g. when overlaying axes are present) - add dummy bounding box value whenever showticklabels is false
1 parent b36392e commit 874b1ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/plots/cartesian/axes.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1825,7 +1825,13 @@ axes.doTicks = function(gd, axid, skipTitle) {
18251825
// tick labels - for now just the main labels.
18261826
// TODO: mirror labels, esp for subplots
18271827
var tickLabels = container.selectAll('g.' + tcls).data(vals, datafn);
1828-
if(!ax.showticklabels || !isNumeric(position)) {
1828+
1829+
if(!isNumeric(position)) {
1830+
tickLabels.remove();
1831+
drawAxTitle();
1832+
return;
1833+
}
1834+
if(!ax.showticklabels) {
18291835
tickLabels.remove();
18301836
drawAxTitle();
18311837
calcBoundingBox();

0 commit comments

Comments
 (0)