From b525404d9b24731756a8660189314d1c73ad8559 Mon Sep 17 00:00:00 2001 From: slice Date: Fri, 13 Jul 2018 19:53:53 -0700 Subject: [PATCH] sort data by timestamp --- priv/frontend/src/components/Graph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/frontend/src/components/Graph.js b/priv/frontend/src/components/Graph.js index a22efae..c50167b 100644 --- a/priv/frontend/src/components/Graph.js +++ b/priv/frontend/src/components/Graph.js @@ -35,7 +35,7 @@ export default class Graph extends Component { const data = unprocessedData.map(([timestamp, latency]) => ({ x: timestamp, y: latency, - })).reverse(); + })).sort(({ x: a }, { x: b }) => a - b); return [ {