Tweak legend expand/collapse button (#24484)

* Tweak legend expand/collapse button

* Revert "Tweak legend expand/collapse button"

This reverts commit 5eafdad781c8d9fb9800ae433cc622001c46338d.

* update UX
This commit is contained in:
Petar Petrov 2025-03-04 15:51:54 +02:00 committed by Bram Kragten
parent b26bc1dcf0
commit e2ff8ce302

View File

@ -252,9 +252,11 @@ export class HaChartBase extends LitElement {
<ha-assist-chip <ha-assist-chip
@click=${this._toggleExpandedLegend} @click=${this._toggleExpandedLegend}
filled filled
label=${`${this.hass.localize( label=${this.expandLegend
`ui.components.history_charts.${this.expandLegend ? "collapse_legend" : "expand_legend"}` ? this.hass.localize(
)} (${items.length})`} "ui.components.history_charts.collapse_legend"
)
: `${this.hass.localize("ui.components.history_charts.expand_legend")} (${items.length - overflowLimit})`}
> >
<ha-svg-icon <ha-svg-icon
slot="trailing-icon" slot="trailing-icon"