-1

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 }

1 Answers1

0

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

ppotaczek
  • 36,341
  • 2
  • 14
  • 24