0👍
NOTE: The following code applies to highcharts only.
Instead of minRotation
– maxRotation
, by using "rotation", you could rotate the labels of the x-axis
– horizontal labels of the chart.
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas'],
labels: {
// Set rotation of thex-axis labels to 45°:
rotation: 45
}
},
This JS fiddle – which is based on this chart found in the documentation – contains the modification using rotation
property.
I’m not sure why in your sample code I couldn’t rotate the labels with rotation
property, but, you can modify the code provided here for your purposes.
Source:stackexchange.com