Skip to content

Commit 6f575a3

Browse files
committed
adjustment for vertical labels on the x axis and update baselines
1 parent a1d021b commit 6f575a3

File tree

6 files changed

+4
-2
lines changed

6 files changed

+4
-2
lines changed

src/plots/cartesian/axes.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -2637,6 +2637,7 @@ axes.makeLabelFns = function(ax, shift, angle) {
26372637
};
26382638

26392639
var x0, y0, ff, flipIt;
2640+
var xQ = 0;
26402641

26412642
var side = ax.side;
26422643
var axLetter = ax._id.charAt(0);
@@ -2666,9 +2667,11 @@ axes.makeLabelFns = function(ax, shift, angle) {
26662667
ff = 0.5;
26672668
}
26682669
}
2670+
2671+
xQ = (MID_SHIFT / 2) * (tickangle / 90);
26692672
}
26702673

2671-
out.xFn = function(d) { return d.dx + x0; };
2674+
out.xFn = function(d) { return d.dx + x0 + xQ * d.fontSize; };
26722675
out.yFn = function(d) { return d.dy + y0 + d.fontSize * ff; };
26732676
out.anchorFn = function(d, a) {
26742677
if(isAligned) {
@@ -2709,7 +2712,6 @@ axes.makeLabelFns = function(ax, shift, angle) {
27092712
}
27102713
}
27112714

2712-
var xQ = 0;
27132715
if(insideTickLabels) {
27142716
var ang = isNumeric(tickangle) ? +tickangle : 0;
27152717
if(ang !== 0) {

test/image/baselines/1.png

105 Bytes
Loading
-26 Bytes
Loading
Loading
115 Bytes
Loading
6 Bytes
Loading

0 commit comments

Comments
 (0)