Fix height of chart legend (#24519)

This commit is contained in:
Petar Petrov 2025-03-05 15:05:01 +02:00 committed by Bram Kragten
parent 690cd47945
commit 782df0473c
2 changed files with 5 additions and 2 deletions

View File

@ -701,7 +701,7 @@ export class HaChartBase extends LitElement {
.chart-legend { .chart-legend {
max-height: 60%; max-height: 60%;
overflow-y: auto; overflow-y: auto;
margin: 12px 0 0; padding: 12px 0 0;
font-size: 12px; font-size: 12px;
color: var(--primary-text-color); color: var(--primary-text-color);
} }

View File

@ -261,6 +261,7 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
class="content ${classMap({ class="content ${classMap({
"has-header": !!this._config.title, "has-header": !!this._config.title,
"has-rows": !!this._config.grid_options?.rows, "has-rows": !!this._config.grid_options?.rows,
"has-height": hasFixedHeight,
})}" })}"
> >
${this._error ${this._error
@ -320,9 +321,11 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
padding-top: 0; padding-top: 0;
} }
state-history-charts { state-history-charts {
height: 100%;
--timeline-top-margin: 16px; --timeline-top-margin: 16px;
} }
.has-height state-history-charts {
height: 100%;
}
.has-rows { .has-rows {
--chart-max-height: 100%; --chart-max-height: 100%;
} }