X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=share%2Fcollection.js;h=20af9cb1033ecaa358f0f9d535ad2f6523b1df36;hb=13e2e7eee1e7f605a291c74294766de464a86dd9;hp=e352d51ec0457ae8e87286154f39775a0b345104;hpb=cd3725afcf08cac0c7413adc6f9a0f17d9d8e91f;p=collection4.git diff --git a/share/collection.js b/share/collection.js index e352d51..20af9cb 100644 --- a/share/collection.js +++ b/share/collection.js @@ -140,15 +140,18 @@ function instance_draw (inst, def, data) var j; var x = []; var y = []; + var x_val; + + x_val = ds.first_value_time; for (j = 0; j < ds.data.length; j++) { - var dp = ds.data[j]; - var t = dp[0]; - var v = dp[1]; + var y_val = ds.data[j]; + + x.push (x_val); + y.push (y_val); - x.push (t); - y.push (v); + x_val += ds.interval; } x_data.push (x); @@ -181,7 +184,7 @@ function json_graph_update (index) inst.raphael = Raphael ("c4-graph" + index); params = instance_get_params (inst); - params.action = "graph_data_json"; + params.action = "instance_data_json"; params.begin = inst.begin; params.end = inst.end;