score:4

Accepted answer

you can set the xaxis type as 'datetime' then set the pointinterval and pointstart in the plotoptions.

code example:

var chart;
$(document).ready(function () {
    chart = new highcharts.chart({
        "xaxis": {
            "type": "datetime"

        "plotoptions": {
            "line": {
                "pointinterval": 86400000,
                "pointstart": 1282408923000
            }
        },
    });
});

the figures you see for pointinterval and start are in millisecionds which you can generate using gettime() the interval in your case would be 86400000ms which is one day. the library displays appropriate intervals based on your data interval.

score:0

here is my ugly solution :)

i'm using array as queue. http://javascript.about.com/library/blqueue.htm if you fill point datas to the queue, you can to set datas for your chart series.

var myqueue = new array();
var mypoint = [x, y];                                       myqueue.push(mypoint);
chart.series[0].setdata(myqueue);

my x axis is not a datetime, it's an integer
first 
var x = 0;

x value should be always increment when you need a new point. http://dl.dropbox.com/u/3482121/picture/highcharts/pm/screenshot.png

score:5

    xaxis: {
        categories: categoriesname,
        labels: {
            style: {
                color: '#000',
                font: '9px trebuchet ms, verdana, sans-serif'
            }
        },
        **tickinterval: tickinterval,**// set this
        tickpixelinterval: 80,
        tickmarkplacement: 'on'
    },

score:45

it seems like the xaxis:labels:step value is what should be used to accomplish this:

        xaxis: {
            categories: ['jan', 'feb', 'mar', 'apr', 'may'],
            labels:{
                step: 2 // this will show every second label
            }
        },

step axis labels

super late, but i figure this can help someone out.


Related Query

More Query from same tag