Skip to content

Commit 78ff4d5

Browse files
committed
don't standoff ax labels under tickons:'boundaries'
1 parent 78ef22c commit 78ff4d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plots/cartesian/axes.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1946,8 +1946,9 @@ axes.makeTickPath = function(ax, shift, sgn) {
19461946
axes.makeLabelFns = function(ax, shift, angle) {
19471947
var axLetter = ax._id.charAt(0);
19481948
var pad = (ax.linewidth || 1) / 2;
1949+
var ticksOnOutsideLabels = ax.tickson !== 'boundaries' && ax.ticks === 'outside';
19491950

1950-
var labelStandoff = ax.ticks === 'outside' ? ax.ticklen : 0;
1951+
var labelStandoff = ticksOnOutsideLabels ? ax.ticklen : 0;
19511952
var labelShift = 0;
19521953

19531954
if(angle && ax.ticks === 'outside') {
@@ -1956,7 +1957,7 @@ axes.makeLabelFns = function(ax, shift, angle) {
19561957
labelShift = ax.ticklen * Math.sin(rad);
19571958
}
19581959

1959-
if(ax.showticklabels && (ax.ticks === 'outside' || ax.showline)) {
1960+
if(ax.showticklabels && (ticksOnOutsideLabels || ax.showline)) {
19601961
labelStandoff += 0.2 * ax.tickfont.size;
19611962
}
19621963

0 commit comments

Comments
 (0)