sort data by timestamp

This commit is contained in:
Skip R. 2018-07-13 19:53:53 -07:00
parent 37dd98026d
commit b525404d9b
No known key found for this signature in database
GPG key ID: 1508C19D7436A26D

View file

@ -35,7 +35,7 @@ export default class Graph extends Component {
const data = unprocessedData.map(([timestamp, latency]) => ({ const data = unprocessedData.map(([timestamp, latency]) => ({
x: timestamp, x: timestamp,
y: latency, y: latency,
})).reverse(); })).sort(({ x: a }, { x: b }) => a - b);
return [ return [
{ {