New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotated labels - bar chart #3140
Comments
Looks like we don't correctly compensate for the bounding box when it is rotated. A workaround is to set the |
Alternative workaround: |
http://jsfiddle.net/stephanevanraes/69QyK/4/ If you display the axis line and compare 3.x with 4.x you will see that the axis is drawn on exactly the same location. However, in the latest version the translation in the x-direction on the labels after rotation is different. A workaround is setting an x translation on the labels to bring it back to the position it used to have. (I think it's a translation with the fontHeight you would need). |
The breaking change from v3 to v4 is that the default |
I think that this piece of code in getOffset is incomplete: each(tickPositions, function (pos) {
// left side must be align: right and right side must have align: left for labels
if (side === 0 || side === 2 || { 1: 'left', 3: 'right'}[side] === axis.labelAlign) {
// get the highest offset
labelOffset = mathMax(
ticks[pos].getLabelSize(),
labelOffset
);
}
}); It doesn't take into account the label rotation: Rotated labels on the left axis that have align== right ARE rendered outside the plotArea I ran into the same problem here: http://forum.highcharts.com/post109130.html#p109130 |
Looks properly with 4.1.8: http://jsfiddle.net/SKRBW/7/ |
Looks broken in 4.1.9: http://jsfiddle.net/SKRBW/9/ |
Breaks since b2d4aed |
It looks like a rotation is buggy in HC 4.0.x and 3.0.10
HC: 3.0.10 - http://jsfiddle.net/SKRBW/1/
HC: 4.0.1 - http://jsfiddle.net/SKRBW/
The text was updated successfully, but these errors were encountered: