Make sure data are in order before displaying them
If we don't do this, the plotting library draws "backwards" lines which looks ugly. Closes #16
This commit is contained in:
parent
da6143339e
commit
3db6cacf80
1 changed files with 3 additions and 0 deletions
|
@ -158,6 +158,9 @@ $(document).ready(function () {
|
||||||
|
|
||||||
data[i].push([time, series[i].fn(stats, time,
|
data[i].push([time, series[i].fn(stats, time,
|
||||||
prev_stats, prev_time)]);
|
prev_stats, prev_time)]);
|
||||||
|
|
||||||
|
// the data may arrive out-of-order, so sort by time stamp first
|
||||||
|
data[i].sort(function (a, b) { return a[0] - b[0]; });
|
||||||
}
|
}
|
||||||
|
|
||||||
// zip legends with data
|
// zip legends with data
|
||||||
|
|
Loading…
Reference in a new issue