Forecast chart: fix solar area glitch (#24408)

This commit is contained in:
Michael Geers 2025-10-14 11:58:35 +02:00 • committed by GitHub
parent 981aa22ec4
commit 454395eb0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -433,14 +433,9 @@ export default defineComponent({
);
},
filterEntries(entries: TimeseriesEntry[] = []) {
// include 1 hour before and after
const start = new Date(this.startDate);
start.setHours(start.getHours() - 1);
const end = new Date(this.endDate);
end.setHours(end.getHours() + 1);
return entries.filter(
(entry) => new Date(entry.ts) >= start && new Date(entry.ts) <= end
(entry) =>
new Date(entry.ts) >= this.startDate && new Date(entry.ts) <= this.endDate
);
},
onMouseLeave() {