highslide-software/highcharts.com — Issue #579: Dynamic labels rotation on drill down.
Author: Netrumble
Created: 2011-11-18 09:46:50+00:00
State: open

I have a problem

I want that when the chart go in drilldown,
if the number of xAxis labels is greater than 3,
the labels must be rotated of -45° to avoid overlap in the little space where is hosted the chart.
I have tried:
if(chart.series[0].xAxis.categories.length > 3)
{
chart.xAxis[0].options.labels = {
rotation: -45,
align: 'right'};
}
But this way the labels disappear.
Can anyone help me?

p.s.
the starter chart labels have not rotation.