Skip to content

Commit a1d021b

Browse files
committed
adjustment for vertical tick labels inside
1 parent 2108c8d commit a1d021b

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/plots/cartesian/axes.js

+11-7
Original file line numberDiff line numberDiff line change
@@ -2654,13 +2654,17 @@ axes.makeLabelFns = function(ax, shift, angle) {
26542654
y0 = shift + labelStandoff * flipIt;
26552655
ff = endSide ? 1 : -0.2;
26562656
if(Math.abs(tickangle) === 90) {
2657-
if(
2658-
(tickangle === -90 && side === 'bottom') ||
2659-
(tickangle === 90 && side === 'top')
2660-
) {
2661-
ff = CAP_SHIFT;
2657+
if(insideTickLabels) {
2658+
ff += MID_SHIFT;
26622659
} else {
2663-
ff = 0.5;
2660+
if(
2661+
(tickangle === -90 && side === 'bottom') ||
2662+
(tickangle === 90 && side === 'top')
2663+
) {
2664+
ff = CAP_SHIFT;
2665+
} else {
2666+
ff = 0.5;
2667+
}
26642668
}
26652669
}
26662670

@@ -2694,7 +2698,7 @@ axes.makeLabelFns = function(ax, shift, angle) {
26942698
x0 = labelStandoff;
26952699
y0 = labelShift * flipIt;
26962700
ff = 0;
2697-
if(Math.abs(tickangle) === 90) {
2701+
if(!insideTickLabels && Math.abs(tickangle) === 90) {
26982702
if(
26992703
(tickangle === -90 && side === 'left') ||
27002704
(tickangle === 90 && side === 'right')
-149 Bytes
Loading

0 commit comments

Comments
 (0)