Fix solar order in compare stack for usage graph (#24360)

* Fix solar order in compare stack for usage graph

* remove accidental commit
This commit is contained in:
karwosts 2025-02-23 23:08:55 -08:00 committed by GitHub
parent 680d81001c
commit 783132ae46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -291,19 +291,18 @@ export class HuiEnergyUsageGraphCard
true true
) )
); );
} else { }
// add empty dataset so compare bars are first // add empty dataset so compare bars are first
// `stack: usage` so it doesn't take up space yet // `stack: usage` so it doesn't take up space yet
const firstId = statIds.from_grid?.[0] ?? "placeholder";
datasets.push({ datasets.push({
id: "compare-" + firstId, id: "compare-placeholder",
type: "bar", type: "bar",
stack: "usage", stack: energyData.statsCompare ? "compare" : "usage",
data: [], data: [],
// @ts-expect-error // @ts-expect-error
order: 0, order: 0,
}); });
}
datasets.push( datasets.push(
...this._processDataSet( ...this._processDataSet(