mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 04:46:34 +00:00
Limit height of charts to 400px (#9487)
This commit is contained in:
parent
4466950bb8
commit
36c20e4348
@ -20,7 +20,7 @@ interface Tooltip extends TooltipModel<any> {
|
||||
export default class HaChartBase extends LitElement {
|
||||
public chart?: Chart;
|
||||
|
||||
@property()
|
||||
@property({ attribute: "chart-type", reflect: true })
|
||||
public chartType: ChartType = "line";
|
||||
|
||||
@property({ attribute: false })
|
||||
@ -228,6 +228,9 @@ export default class HaChartBase extends LitElement {
|
||||
height: 0;
|
||||
transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
:host(:not([chart-type="timeline"])) canvas {
|
||||
max-height: 400px;
|
||||
}
|
||||
.chartLegend {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class StateHistoryChartLine extends LitElement {
|
||||
<ha-chart-base
|
||||
.data=${this._chartData}
|
||||
.options=${this._chartOptions}
|
||||
chartType="line"
|
||||
chart-type="line"
|
||||
></ha-chart-base>
|
||||
`;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ export class StateHistoryChartTimeline extends LitElement {
|
||||
<ha-chart-base
|
||||
.data=${this._chartData}
|
||||
.options=${this._chartOptions}
|
||||
chartType="timeline"
|
||||
chart-type="timeline"
|
||||
></ha-chart-base>
|
||||
`;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user