balaji palamadai
balaji palamadai

Reputation: 629

Dynamically setting xAxis rotation in high charts API

Using the below option in Chart I am able to set label rotation angle for Xaxis,

xAxis: {
    labels: {
        rotation: 90
    }
},

I would like to change the xAxis rotation dynamically(say on a button click for a particular chart type). Is there any option to do that?

Upvotes: 2

Views: 5208

Answers (2)

Youssef
Youssef

Reputation: 41

This is working for me :

chart.xAxis[0].update({labels:{rotation:rotationValue}});

Upvotes: 4

Elzo Valugi
Elzo Valugi

Reputation: 27886

Try something like this, I am not sure that it will work.

chart.xAxis[0].options.labels.rotation = 0;
chart.redraw();

Upvotes: 3

Related Questions