Skip to content

Commit

Permalink
adjustment for vertical tick labels inside
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Nov 26, 2020
1 parent 2108c8d commit a1d021b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2654,13 +2654,17 @@ axes.makeLabelFns = function(ax, shift, angle) {
y0 = shift + labelStandoff * flipIt;
ff = endSide ? 1 : -0.2;
if(Math.abs(tickangle) === 90) {
if(
(tickangle === -90 && side === 'bottom') ||
(tickangle === 90 && side === 'top')
) {
ff = CAP_SHIFT;
if(insideTickLabels) {
ff += MID_SHIFT;
} else {
ff = 0.5;
if(
(tickangle === -90 && side === 'bottom') ||
(tickangle === 90 && side === 'top')
) {
ff = CAP_SHIFT;
} else {
ff = 0.5;
}
}
}

Expand Down Expand Up @@ -2694,7 +2698,7 @@ axes.makeLabelFns = function(ax, shift, angle) {
x0 = labelStandoff;
y0 = labelShift * flipIt;
ff = 0;
if(Math.abs(tickangle) === 90) {
if(!insideTickLabels && Math.abs(tickangle) === 90) {
if(
(tickangle === -90 && side === 'left') ||
(tickangle === 90 && side === 'right')
Expand Down
Binary file modified test/image/baselines/ticklabelposition-d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a1d021b

Please sign in to comment.