mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix chart height (#24028)
This commit is contained in:
parent
8c3fdfb6fb
commit
ac3796ec31
@ -439,7 +439,7 @@ export class HaChartBase extends LitElement {
|
||||
}
|
||||
|
||||
private _getDefaultHeight() {
|
||||
return Math.max(this.clientWidth / 2, 300);
|
||||
return this.clientWidth / 2;
|
||||
}
|
||||
|
||||
private _handleZoomReset() {
|
||||
@ -469,7 +469,7 @@ export class HaChartBase extends LitElement {
|
||||
}
|
||||
.chart-container {
|
||||
position: relative;
|
||||
max-height: var(--chart-max-height, 300px);
|
||||
max-height: var(--chart-max-height, 350px);
|
||||
}
|
||||
.chart {
|
||||
width: 100%;
|
||||
|
@ -259,6 +259,7 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
||||
<div
|
||||
class="content ${classMap({
|
||||
"has-header": !!this._config.title,
|
||||
"has-rows": !!this._config.grid_options?.rows,
|
||||
})}"
|
||||
>
|
||||
${this._error
|
||||
@ -319,6 +320,9 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
||||
state-history-charts {
|
||||
height: 100%;
|
||||
}
|
||||
.has-rows {
|
||||
--chart-max-height: 100%;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user