Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 47e46cc

Browse files
authored
Merge pull request plotly#5134 from plotly/fix5132-automargin-periodlabels
Fix automargin when ticklabelmode is set to period
2 parents 72c7f31 + 969c9c8 commit 47e46cc

File tree

5 files changed

+1141
-64
lines changed

5 files changed

+1141
-64
lines changed

src/plots/cartesian/axes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ axes.calcTicks = function calcTicks(ax, opts) {
858858
ticksOut[i].periodX = v;
859859

860860
if(v > maxRange || v < minRange) { // hide label if outside the range
861-
ticksOut[i].text = '';
861+
ticksOut[i].text = ' '; // don't use an empty string here which can confuse automargin (issue 5132)
862862
removedPreTick0Label = true;
863863
}
864864
}

0 commit comments

Comments
 (0)