mirror of
https://github.com/home-assistant/frontend.git
synced 2026-04-17 23:54:28 +01:00
Fix energy pie chart legend showing raw data instead of formatted values (#30339)
This commit is contained in:
committed by
Bram Kragten
parent
640558ad35
commit
be1921229c
@@ -542,6 +542,7 @@ export class HuiEnergyDevicesGraphCard
|
|||||||
this._legendData = chartData.map((d) => ({
|
this._legendData = chartData.map((d) => ({
|
||||||
...d,
|
...d,
|
||||||
name: this._getDeviceName(d.name),
|
name: this._getDeviceName(d.name),
|
||||||
|
value: `${formatNumber(d.value[0], this.hass.locale)} kWh`,
|
||||||
}));
|
}));
|
||||||
// filter out hidden stats in place
|
// filter out hidden stats in place
|
||||||
for (let i = chartData.length - 1; i >= 0; i--) {
|
for (let i = chartData.length - 1; i >= 0; i--) {
|
||||||
|
|||||||
Reference in New Issue
Block a user