mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Remember hidden energy devices from storage (#24470)
* Remember hidden devices from storage * remove accidental * typing fix
This commit is contained in:
parent
b7be74e722
commit
d899711a48
@ -318,6 +318,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