Zoomcharts with preloaded data -
i trying use timechart preloaded data, can't find example.
data = {'preloaded':{ 'unit':'s', 'values':{'id':3,'name':'slice1','value':20} }}
however i'm getting error: "required field 'unit' not set in data"
can please recommend how specify data properly?
this should work:
var dataobj = { "datalimitfrom":1279408157, "datalimitto":1384253671, "unit":"s", "data":[ [1280062860,"8.221"], [1282209412,"4.2",], [1284577510,"5.9"], [1286988866,"1.52"], ] }; var t = new timechart({ container: document.getelementbyid("demo"), data: { units:["s"], timestampinseconds: true, preloaded: dataobj } });
for timechart in data array first 1 timestamp [1280062860,"8.221"].
can change "unit" of ["s","m","h","d","m","y"]
more timechart: https://zoomcharts.com/developers/en/time-chart/api-reference/settings.html
Comments
Post a Comment