DEV: apply new coding standards (#10592)

This commit is contained in:
Joffrey JAFFEUX
2020-09-04 13:42:47 +02:00
committed by GitHub
parent 80dfaeb0d2
commit 52672b9eab
1473 changed files with 9386 additions and 9958 deletions
@@ -11,15 +11,15 @@ export default Component.extend({
const rawData = this.get("model.data");
var data = {
labels: rawData.map(r => r.x),
labels: rawData.map((r) => r.x),
datasets: [
{
data: rawData.map(r => r.y),
data: rawData.map((r) => r.y),
label: model.get("title"),
backgroundColor: `rgba(200,220,240,${this.type === "bar" ? 1 : 0.3})`,
borderColor: "#08C"
}
]
borderColor: "#08C",
},
],
};
const config = {
@@ -29,21 +29,21 @@ export default Component.extend({
responsive: true,
tooltips: {
callbacks: {
title: context =>
moment(context[0].xLabel, "YYYY-MM-DD").format("LL")
}
title: (context) =>
moment(context[0].xLabel, "YYYY-MM-DD").format("LL"),
},
},
scales: {
yAxes: [
{
display: true,
ticks: {
stepSize: 1
}
}
]
}
}
stepSize: 1,
},
},
],
},
},
};
this._chart = new window.Chart(ctx, config);
@@ -53,5 +53,5 @@ export default Component.extend({
loadScript("/javascripts/Chart.min.js").then(() =>
this.refreshChart.apply(this)
);
}
},
});