Skip to content

Commit 6e80dc9

Browse files
committed
fix issue 5301
1 parent b5f09fb commit 6e80dc9

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/plots/cartesian/axes.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -2682,7 +2682,17 @@ axes.makeLabelFns = function(ax, shift, angle) {
26822682

26832683
x0 = labelStandoff;
26842684
y0 = labelShift * flipIt;
2685-
ff = Math.abs(ax.tickangle) === 90 ? 0.5 : 0;
2685+
ff = 0;
2686+
if(Math.abs(ax.tickangle) === 90) {
2687+
if(
2688+
(ax.tickangle === -90 && side === 'left') ||
2689+
(ax.tickangle === 90 && side === 'right')
2690+
) {
2691+
ff = CAP_SHIFT;
2692+
} else {
2693+
ff = 0.5;
2694+
}
2695+
}
26862696

26872697
out.xFn = function(d) { return d.dx + shift - (x0 + d.fontSize * ff) * flipIt; };
26882698
out.yFn = function(d) { return d.dy + y0 + d.fontSize * MID_SHIFT; };
866 Bytes
Loading

0 commit comments

Comments
 (0)