Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Wrong vertical label position on rotation bar chart #4756
here is what I've found: file hightcharts.js function getLabelPosition:
yOffset = mathCos(label.rotation * deg2rad) * (rotCorr.y - label.getBBox().height / 2);
this offset moves the label to the top taking into account:
The problem what label.getBBox() returns "rotated height", while that line of code assumes what "label.getBBox().height" is the height of the not-rotated label (that's why it divides it by 2 --- to place it in center).
Here is my patch which fixed this case: