I'm using column, I need to reduce x axis characters to max 4-5 character which is dynamically coming from database.
xAxis: { categories: labesldata, crosshair: true }
I'm using column, I need to reduce x axis characters to max 4-5 character which is dynamically coming from database.
xAxis: { categories: labesldata, crosshair: true }
You can use the formatter
callback function and modify the default string:
xAxis: {
...,
labels: {
formatter: function() {
return this.value.slice(0, 5);
}
}
}
Live demo: http://jsfiddle.net/BlackLabel/6m4e8x0y/4931/
API Reference: https://api.highcharts.com/highcharts/xAxis.labels.formatter