Fix chart height (#24028)

This commit is contained in:
Petar Petrov 2025-02-03 12:21:30 +02:00 committed by Bram Kragten
parent bd74d39dd8
commit 44dcca9923
2 changed files with 5 additions and 1 deletions

View File

@ -540,7 +540,7 @@ export class HaChartBase extends LitElement {
} }
.chart-container { .chart-container {
position: relative; position: relative;
max-height: var(--chart-max-height, 300px); max-height: var(--chart-max-height, 350px);
} }
.chart { .chart {
width: 100%; width: 100%;

View File

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