mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +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() {
|
private _getDefaultHeight() {
|
||||||
return Math.max(this.clientWidth / 2, 300);
|
return this.clientWidth / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _handleZoomReset() {
|
private _handleZoomReset() {
|
||||||
@ -469,7 +469,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%;
|
||||||
|
@ -259,6 +259,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
|
||||||
@ -319,6 +320,9 @@ export class HuiHistoryGraphCard extends LitElement implements LovelaceCard {
|
|||||||
state-history-charts {
|
state-history-charts {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.has-rows {
|
||||||
|
--chart-max-height: 100%;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user