Fix chartjs deprecation warnings (#9261)

This commit is contained in:
Bram Kragten 2021-05-26 15:05:01 +02:00 committed by GitHub
parent 27845a7345
commit eaccd22267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,7 +194,10 @@ class StateHistoryChartTimeline extends LocalizeMixin(PolymerElement) {
invertOnOff,
]);
}
datasets.push({ data: dataRow, entity_id: stateInfo.entity_id });
datasets.push({
data: dataRow,
entity_id: stateInfo.entity_id,
});
labels.push(entityDisplay);
});
@ -234,6 +237,9 @@ class StateHistoryChartTimeline extends LocalizeMixin(PolymerElement) {
fontStyle: "bold",
},
},
categoryPercentage: undefined,
barPercentage: undefined,
time: { format: undefined },
},
],
yAxes: [
@ -242,10 +248,17 @@ class StateHistoryChartTimeline extends LocalizeMixin(PolymerElement) {
yaxe.maxWidth = yaxe.chart.width * 0.18;
},
position: this._computeRTL ? "right" : "left",
categoryPercentage: undefined,
barPercentage: undefined,
time: { format: undefined },
},
],
},
},
datasets: {
categoryPercentage: 0.8,
barPercentage: 0.9,
},
data: {
labels: labels,
datasets: datasets,