mirror of
https://github.com/discourse/discourse.git
synced 2025-02-09 12:54:56 +00:00
FIX: do not use number helper for charts Y value
This commit is contained in:
parent
940c0f569f
commit
2b3faa8d0b
@ -100,7 +100,7 @@ export default Ember.Component.extend(AsyncReport, {
|
|||||||
labels,
|
labels,
|
||||||
datasets: reportsForPeriod.map(report => {
|
datasets: reportsForPeriod.map(report => {
|
||||||
return {
|
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)",
|
backgroundColor: "rgba(200,220,240,0.3)",
|
||||||
borderColor: report.color
|
borderColor: report.color
|
||||||
};
|
};
|
||||||
@ -116,6 +116,7 @@ export default Ember.Component.extend(AsyncReport, {
|
|||||||
if (this._chart) {
|
if (this._chart) {
|
||||||
this._chart.destroy();
|
this._chart.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
this._chart = new window.Chart(context, this._buildChartConfig(data));
|
this._chart = new window.Chart(context, this._buildChartConfig(data));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user