Skip to content

Commit

Permalink
adjustment for vertical labels on the x axis and update baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
archmoj committed Nov 26, 2020
1 parent a1d021b commit 6f575a3
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plots/cartesian/axes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2637,6 +2637,7 @@ axes.makeLabelFns = function(ax, shift, angle) {
};

var x0, y0, ff, flipIt;
var xQ = 0;

var side = ax.side;
var axLetter = ax._id.charAt(0);
Expand Down Expand Up @@ -2666,9 +2667,11 @@ axes.makeLabelFns = function(ax, shift, angle) {
ff = 0.5;
}
}

xQ = (MID_SHIFT / 2) * (tickangle / 90);
}

out.xFn = function(d) { return d.dx + x0; };
out.xFn = function(d) { return d.dx + x0 + xQ * d.fontSize; };
out.yFn = function(d) { return d.dy + y0 + d.fontSize * ff; };
out.anchorFn = function(d, a) {
if(isAligned) {
Expand Down Expand Up @@ -2709,7 +2712,6 @@ axes.makeLabelFns = function(ax, shift, angle) {
}
}

var xQ = 0;
if(insideTickLabels) {
var ang = isNumeric(tickangle) ? +tickangle : 0;
if(ang !== 0) {
Expand Down
Binary file modified test/image/baselines/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/bar_multiline_labels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/box_grouped-multicategory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.
Binary file modified test/image/baselines/vertical-tickangles.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 6f575a3

Please sign in to comment.