From dafb6e8472f13df7f547df156fb8b6353292c349 Mon Sep 17 00:00:00 2001 From: Mathis Neumann <mathis@simpletechs.net> Date: Thu, 14 Jul 2016 18:45:36 +0200 Subject: [PATCH] use correct timestamp format for time series plotting --- app/components/time-series-plot.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/components/time-series-plot.js b/app/components/time-series-plot.js index 7c63e4d..48b24fc 100644 --- a/app/components/time-series-plot.js +++ b/app/components/time-series-plot.js @@ -48,10 +48,9 @@ export default Component.extend({ } const $this = this.$(); // flot data points are tuples/arrays [x,y], graphs are arrays of these - // converts unix timestamps to javascript timestamps (*1000) // use Ember.get because it would work with Ember.Object and plain JS const plotData = this.get('timeSeries.series') - .map((valueObj) => [get(valueObj, 'timestamp')*1000, get(valueObj, 'value')]); + .map((valueObj) => [get(valueObj, 'timestamp'), get(valueObj, 'value')]); this.debug('plotData', plotData); // wrap in additional array since flot can handle multiple graphs at once, we only need one const plot = $this.plot([plotData], this.get('options')).data('plot'); -- GitLab