Skip to content

Commit

Permalink
don't standoff ax labels under tickons:'boundaries'
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Nov 22, 2018
1 parent 78ef22c commit 78ff4d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1946,8 +1946,9 @@ axes.makeTickPath = function(ax, shift, sgn) {
axes.makeLabelFns = function(ax, shift, angle) {
var axLetter = ax._id.charAt(0);
var pad = (ax.linewidth || 1) / 2;
var ticksOnOutsideLabels = ax.tickson !== 'boundaries' && ax.ticks === 'outside';

var labelStandoff = ax.ticks === 'outside' ? ax.ticklen : 0;
var labelStandoff = ticksOnOutsideLabels ? ax.ticklen : 0;
var labelShift = 0;

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

if(ax.showticklabels && (ax.ticks === 'outside' || ax.showline)) {
if(ax.showticklabels && (ticksOnOutsideLabels || ax.showline)) {
labelStandoff += 0.2 * ax.tickfont.size;
}

Expand Down

0 comments on commit 78ff4d5

Please sign in to comment.