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