mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Hide legend for stats chart in more info, only shade area for min and… (#14273)
This commit is contained in:
parent
c810c67a53
commit
6f07e7ca59
@ -61,6 +61,8 @@ class StatisticsChart extends LitElement {
|
||||
|
||||
@property() public chartType: ChartType = "line";
|
||||
|
||||
@property({ type: Boolean }) public hideLegend = false;
|
||||
|
||||
@property({ type: Boolean }) public isLoadingData = false;
|
||||
|
||||
@state() private _chartData: ChartData = { datasets: [] };
|
||||
@ -175,7 +177,7 @@ class StatisticsChart extends LitElement {
|
||||
propagate: true,
|
||||
},
|
||||
legend: {
|
||||
display: true,
|
||||
display: !this.hideLegend,
|
||||
labels: {
|
||||
usePointStyle: true,
|
||||
},
|
||||
@ -339,7 +341,7 @@ class StatisticsChart extends LitElement {
|
||||
? "-1"
|
||||
: false
|
||||
: false,
|
||||
borderColor: band ? color + "7F" : color,
|
||||
borderColor: band ? color + (this.hideLegend ? "00" : "7F") : color,
|
||||
backgroundColor: band ? color + "3F" : color + "7F",
|
||||
pointRadius: 0,
|
||||
data: [],
|
||||
|
@ -65,6 +65,7 @@ export class MoreInfoHistory extends LitElement {
|
||||
.statisticsData=${this._statistics}
|
||||
.statTypes=${statTypes}
|
||||
.names=${this._statNames}
|
||||
hideLegend
|
||||
></statistics-chart>`
|
||||
: html`<state-history-charts
|
||||
up-to-now
|
||||
|
Loading…
x
Reference in New Issue
Block a user