mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 19:56:42 +00:00
Remember hidden energy devices from storage (#24470)
* Remember hidden devices from storage * remove accidental * typing fix
This commit is contained in:
parent
76b03d3a40
commit
b26bc1dcf0
@ -316,6 +316,16 @@ export class HaChartBase extends LitElement {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const legend = ensureArray(this.options?.legend || [])[0] as
|
||||
| LegendComponentOption
|
||||
| undefined;
|
||||
Object.entries(legend?.selected || {}).forEach(([stat, selected]) => {
|
||||
if (selected === false) {
|
||||
this._hiddenDatasets.add(stat);
|
||||
}
|
||||
});
|
||||
|
||||
this.chart.setOption({
|
||||
...this._createOptions(),
|
||||
series: this._getSeries(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user