Skip to content
Snippets Groups Projects
Commit 95ef608a authored by ale's avatar ale
Browse files

Fix bad uPlot parameters

parent 680cc43a
Branches
Tags
No related merge requests found
...@@ -21,10 +21,15 @@ $(function() { ...@@ -21,10 +21,15 @@ $(function() {
{}, {},
], ],
}; };
// Incoming timestamps are milliseconds.
for (var i = 0; i < data.data[0].length; i++) {
data.data[0][i] /= 1000;
}
for (var i = 0; i < data.labels.length; i++) { for (var i = 0; i < data.labels.length; i++) {
opts.series.push({ opts.series.push({
show: true, show: true,
label: data.labels[i], label: data.labels[i],
stroke: "blue",
}); });
} }
let uplot = new uPlot(opts, data.data, value); let uplot = new uPlot(opts, data.data, value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment