score:15

Accepted answer

it's been a while since you've posted so i hope you've found your answer by now but i wanted to give you a response anyway.

you need to use the min option inside the x-axis category. read more about this here: http://api.highcharts.com/highcharts#xaxis

 xaxis: {
     min: 1,
     categories: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11']
 },

these options include the '0' as a category but the chart is drawn starting at the '1' position.

i put together a simple jsfiddle showing what you wanted to accomplish here: http://jsfiddle.net/l35dp/

score:0

i'll do you one better. we can simply use the xaxis label formatter as a mapping function to map our index values from 0,1,...,n to 1,2,...,n+1 by defining the formatter as:

xaxis: {
    labels: {
        formatter: function() {
            return this.value + 1;
        }
    },  
}

indeed you could define this mapping function to be anything at all. for example:

formatter: function() {
    return this.value * this.value;
}

Related Query

More Query from same tag