FIX: do not use number helper for charts Y value

This commit is contained in:
Joffrey JAFFEUX 2018-06-07 14:56:49 +02:00 committed by GitHub
parent 945cb90e7e
commit d556975cdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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));
});
});