Highstock - irregular time interval

Highcharts has an example of using irregular time intervals, I want to do the same on highstock, however there are no parameters for the xAxis type.

JSFiddle Code

My parameters

$(function() { $.getJSON('http://184.173.195.228/~ktwsn/temp2.php?action=get_sensor&sensor_serial%5B%5D=3B74F41400000069&sensor_serial%5B%5D=3BB2FA14000000E6&sensor_serial%5B%5D=3B91F11400000079&sensor_serial%5B%5D=3BC7F114000000E5&sensor_serial%5B%5D=3BC0F314000000E3&callback=?', {action: "get_sensor"}, function(data) { var seriesOptions = []; $.each(data, function(key, val) { seriesOptions.push({ name: val.name, data: val.samples, marker : { enabled : true, radius : 3 } }); }); // create the chart chart = new Highcharts.StockChart({ chart: { renderTo: 'container', }, xAxis: { type: 'datetime' }, rangeSelector: { selected: 4 }, series: seriesOptions }); }); }); 
+6
source share
2 answers

Found. The nomenclature between highcharts and highstock is different.

For highstock this

 xAxis: { ordinal: false } 

Companies really need to combine highcharts and highstock. One could simplify a single API documentation.

+19
source

I would make sure the output actually uses the same timestamp.

Many cases, for example, include timestamps for the same date, but different times that will always result in x-axis placement.

(I know this may be an obvious check, but I have seen it many times ...)

0
source

All Articles