Skip to content

Commit

Permalink
Merge pull request #59 from williaster/chris--label-transform
Browse files Browse the repository at this point in the history
[axis] fix label transform
  • Loading branch information
hshoff authored Jun 11, 2017
2 parents eba25a6 + e8148b7 commit 080274c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vx-axis/src/utils/labelTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export default function labelTransform({

let x, y, transform = null;
if (orientation === ORIENT.top || orientation === ORIENT.bottom) {
x = range[1] / 2;
x = Math.max(...range) / 2;
y = sign * (tickLength + labelOffset + tickLabelFontSize +
(orientation === ORIENT.bottom ? fontSize : 0));
} else {
x = sign * (range[0] / 2);
x = sign * (Math.max(...range) / 2);
y = -(tickLength + labelOffset);
transform = `rotate(${sign * 90})`;
}
Expand Down

0 comments on commit 080274c

Please sign in to comment.