json - Highcharts showing points instead of lines -
*desired output**
actual output
the points don't become line.
question
how modify code achieve desired output?
this code:
function create() { var series = []; $.ajax({ type: "post", url: url, async: false, success: function (result) { var channels = object.keys(result.result.data); var size = channels.length; var name = result.result.labels[1]; (var = 0; < size; i++) { var data = result.result.data[i][1]; var time = result.result.data[i][0]; var test = []; test.push({ x:time, y:data }); series.push({ "name": name, "data": test }); } } }, false); return series; }
here data returned url
{ "api": 1, "id": "system.cpu", "name": "system.cpu", "view_update_every": 1, "update_every": 1, "first_entry": 1464153889, "last_entry": 1464154575, "before": 1464154575, "after": 1464154556, "dimension_names": ["iowait"], "dimension_ids": ["iowait"], "latest_values": [0], "view_latest_values": [0], "dimensions": 1, "points": 20, "format": "json", "result": { "labels": ["time", "iowait"], "data": [ [ 1464154556000, 0], [ 1464154557000, 0], [ 1464154558000, 0], [ 1464154559000, 0], [ 1464154560000, 0], [ 1464154561000, 0], [ 1464154562000, 0], [ 1464154563000, 0], [ 1464154564000, 0], [ 1464154565000, 0], [ 1464154566000, 0], [ 1464154567000, 0], [ 1464154568000, 0], [ 1464154569000, 0], [ 1464154570000, 0], [ 1464154571000, 0], [ 1464154572000, 0], [ 1464154573000, 0], [ 1464154574000, 0], [ 1464154575000, 0] ] }, "min": 0, "max": 96.9697 }
Comments
Post a Comment