mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +00:00
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:
1 parent
88836452eb
commit
af982e3812
9 files changed
+466
-105
No files matched your search
+23
-10
@@ -23467,9 +23467,11 @@ paths:
|
||||
- in: query
|
||||
name: values
|
||||
schema:
|
||||
description: Comma-separated value series to include, as `MeasurementType` names or `MOOD`.
|
||||
description: Comma-separated value series to include, as `MeasurementType` names or `MOOD`, at most 6. More, or an
|
||||
unknown name, answers 422.
|
||||
type: string
|
||||
description: Comma-separated value series to include, as `MeasurementType` names or `MOOD`.
|
||||
description: Comma-separated value series to include, as `MeasurementType` names or `MOOD`, at most 6. More, or an
|
||||
unknown name, answers 422.
|
||||
responses:
|
||||
"200":
|
||||
description: The timeline for the requested zoom and window.
|
||||
@@ -81541,6 +81543,14 @@ components:
|
||||
items:
|
||||
$ref: "#/components/schemas/TimelineStandingItem"
|
||||
description: "Things without a start: shown once as standing."
|
||||
bucket:
|
||||
type: string
|
||||
enum:
|
||||
- quarter
|
||||
- month
|
||||
- week
|
||||
description: "The span every series point averages: `quarter` for a multi-year `all`, `month` for `year` and an `all`
|
||||
under two years, `week` for `quarter`."
|
||||
series:
|
||||
type: array
|
||||
items:
|
||||
@@ -81569,6 +81579,7 @@ components:
|
||||
- range
|
||||
- lanes
|
||||
- standing
|
||||
- bucket
|
||||
- series
|
||||
- notable
|
||||
additionalProperties: false
|
||||
@@ -81683,12 +81694,6 @@ components:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: "null"
|
||||
granularity:
|
||||
type: string
|
||||
enum:
|
||||
- month
|
||||
- week
|
||||
- day
|
||||
points:
|
||||
type: array
|
||||
items:
|
||||
@@ -81696,17 +81701,25 @@ components:
|
||||
properties:
|
||||
t:
|
||||
type: string
|
||||
description: A local calendar date, `YYYY-MM-DD`.
|
||||
description: The bucket's first day.
|
||||
mean:
|
||||
type: number
|
||||
description: The mean of the bucket's day values, each day weighing one (a cumulative type's days are its day totals, a
|
||||
pulse-like type's its hourly-mean day value).
|
||||
count:
|
||||
type: integer
|
||||
minimum: 1
|
||||
maximum: 9007199254740991
|
||||
description: Readings behind the mean. Clients draw a point from fewer than three as thin.
|
||||
required:
|
||||
- t
|
||||
- mean
|
||||
- count
|
||||
additionalProperties: false
|
||||
description: Buckets with at least one reading, oldest first. A bucket without one is absent, never interpolated.
|
||||
required:
|
||||
- key
|
||||
- unit
|
||||
- granularity
|
||||
- points
|
||||
additionalProperties: false
|
||||
TimelineReadinessEnvelope:
|
||||
|
||||
Reference in new issue
Block a user