mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Fix endTime of statistics-chart (#24233)
This commit is contained in:
parent
043e8d6e2e
commit
920ec035c5
@ -273,11 +273,13 @@ export class StatisticsChart extends LitElement {
|
||||
this._chartOptions = {
|
||||
xAxis: [
|
||||
{
|
||||
id: "xAxis",
|
||||
type: "time",
|
||||
min: startTime,
|
||||
max: endTime,
|
||||
max: this.endTime,
|
||||
},
|
||||
{
|
||||
id: "hiddenAxis",
|
||||
type: "time",
|
||||
show: false,
|
||||
},
|
||||
@ -368,7 +370,6 @@ export class StatisticsChart extends LitElement {
|
||||
if (endTime > new Date()) {
|
||||
endTime = new Date();
|
||||
}
|
||||
this.endTime = endTime;
|
||||
|
||||
let unit: string | undefined | null;
|
||||
|
||||
|
@ -327,7 +327,7 @@ export class HuiStatisticsGraphCard extends LitElement implements LovelaceCard {
|
||||
);
|
||||
const endDate = this._energyEnd;
|
||||
try {
|
||||
let unitClass;
|
||||
let unitClass: string | undefined | null;
|
||||
if (this._config!.unit && this._metadata) {
|
||||
const metadata = Object.values(this._metadata).find(
|
||||
(metaData) =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user