Dear Vishwas,
I’ve created a working example in jsfiddle as you suggested.
I need to pass via externa Json file the rows:
[ [‘ONLINE’,1,1610037371000,1610037372000,’rgba(83, 223, 128, .1)’],
[‘ONLINE’,1,1607452607000,1607672648000,’rgba(83, 223, 128, .8)’],
[‘ONLINE’,1,1607672660000,1607685057000,’rgba(83, 223, 128, .8)’],
[‘ONLINE’,1,1607685669000,1607685832000,’rgba(83, 223, 128, .8)’],
[‘ONLINE’,1,1607686070000,1607961179000,’rgba(83, 223, 128, .8)’] ]
I’m tring to use the code but doesn’t work:
$.getJSON(“datapoints.php”, function(data) {
$.each(data, function(key, value){
var range = new Array(2);
range.push([value[2],value[3]); // timestamp example: 1607686070000,1607961179000
dataPoints.push({label: value[0], x: value[1], y: range, color: value[4]});
});
chart.render();
});
Can you suggest me a solution?
Thanks, Marco