feat(timeline): average value series per quarter, month or week with reading counts

The server picks the bucket per zoom and sends it as `bucket`: quarters
for an `all` window over two years, months for `year` and a shorter
`all`, weeks for `quarter`. Each point carries the readings behind its
mean as `count`; a bucket without a reading stays absent. Means remain
the mean of day values, so pulse-like types keep the hourly-mean day.
`values` accepts up to six series.
This commit is contained in:
Marc-André Bombeck committed 2026-10-09 09:03:42 +02:00
1 parent 88836452eb
commit af982e3812
9 files changed
+466 -105

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ export const GET = apiHandler(async (request: Request) => {
}
const seriesKeys = parseSeriesKeys(parsed.data.values);
if (seriesKeys === null) {
return apiError("Unknown value series", 422, {
return apiError("Unknown value series, or more than six", 422, {
errorCode: "timeline.invalid",
});
}