From d556975cdc4562d8a69dbdbb3e844b341b65de27 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 7 Jun 2018 14:56:49 +0200 Subject: [PATCH] FIX: do not use number helper for charts Y value --- .../javascripts/admin/components/dashboard-mini-chart.js.es6 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/admin/components/dashboard-mini-chart.js.es6 b/app/assets/javascripts/admin/components/dashboard-mini-chart.js.es6 index e31ac3b5dff..36a95dc15cd 100644 --- a/app/assets/javascripts/admin/components/dashboard-mini-chart.js.es6 +++ b/app/assets/javascripts/admin/components/dashboard-mini-chart.js.es6 @@ -100,7 +100,7 @@ export default Ember.Component.extend(AsyncReport, { labels, datasets: reportsForPeriod.map(report => { return { - data: Ember.makeArray(report.data).map(d => number(d.y)), + data: Ember.makeArray(report.data).map(d => Math.round(parseFloat(d.y))), backgroundColor: "rgba(200,220,240,0.3)", borderColor: report.color }; @@ -116,6 +116,7 @@ export default Ember.Component.extend(AsyncReport, { if (this._chart) { this._chart.destroy(); } + this._chart = new window.Chart(context, this._buildChartConfig(data)); }); });