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 {
max-height: 60%;
overflow-y: auto;
margin: 12px 0 0;
padding: 12px 0 0;
font-size: 12px;
color: var(--primary-text-color);
}

View File

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