Fix line_chart.js
This commit is contained in:
parent
123582b730
commit
90d9a80f4f
|
@ -44,8 +44,8 @@ class LineChart extends Stat {
|
|||
labels.push(date.format("MMMM YYYY"));
|
||||
});
|
||||
|
||||
while (chart.data.badges.length < data.results.length) {
|
||||
chart.data.badges.push("");
|
||||
while (chart.data.labels.length < data.results.length) {
|
||||
chart.data.labels.push("");
|
||||
}
|
||||
|
||||
chart.data.datasets.push({
|
||||
|
@ -100,11 +100,11 @@ class LineChart extends Stat {
|
|||
color = color.substr(0, 7);
|
||||
|
||||
chart.data.datasets.splice(dataset_index, 1);
|
||||
chart.data.badges.splice(dataset_index, 1);
|
||||
chart.data.labels.splice(dataset_index, 1);
|
||||
}
|
||||
|
||||
while (chart.data.badges.length > max_length) {
|
||||
chart.data.badges.pop("");
|
||||
while (chart.data.labels.length > max_length) {
|
||||
chart.data.labels.pop("");
|
||||
}
|
||||
|
||||
chart.update();
|
||||
|
|
Loading…
Reference in New Issue