score:8

Accepted answer

you can do this on a chart.events.load call and looping through the series[0].data values. since you say you only have one series per chart i am also assuming you only have one xaxis as well. you would loop through your data like so:

var seriesdata = this.series[0].data;
var tcategories = [];
for (i = 0; i < seriesdata.length; i++) {
    tcategories.push(seriesdata[i].name);
}
this.xaxis[0].setcategories(tcategories);

live demo.

less complex method is to define your xaxis.type as 'category':

"xaxis": {
    "type": "category"
},

live demo.


Related Query

More Query from same tag