score:14

Accepted answer

After playing with an official example and the documentation, I found a way to get intervals every two hours but you can get easily intervals every hour.

Here are the options you have to define in your Highcharts creation:

$(function () {
    $('#container').highcharts({
        chart: { ... },
        title: { ... },
        subtitle: { ... },
        xAxis: {
            type: 'datetime',
            tickInterval: 3600 * 1000,
            ...
        },
        yAxis: { ... },
        tooltip: { ... },
        legend: { ... },
        plotOptions: { ... },
        series: [{
            ...
            pointInterval:  3600 * 1000,
            pointStart: Date.UTC(2006, 0, 01, 0, 0, 0, 0),
            data: [
                ...
            ]
        }]
    });
});

Playing with the tickInterval, pointInterval and pointStart options, you can obtain what you want.

Here is a live example of what I am talking about: http://jsfiddle.net/FxD58/1/

It works very well if you have 24 values in series (like the 24 hours in a day...)


Related Query

More Query from same tag