Highchart - change color of one x-axis label only

highcharts, javascript

Solution

You can also use the label-formatter to set the style. Full example on jsfiddle:

labels: {
    formatter: function () {
        if ('Jun' === this.value) {
            return '<span style="fill: red;">' + this.value + '</span>';
        } else {
            return this.value;
        }
    }
}

Problem

So I know how to change the color of x-axis labels in Highchart, which is described here. http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/xaxis/labels-style/ But what if I want to change the color of just ONE label, not all the labels? How do I apply style to individual labels?

Original source