Skip to content

Improve measurements chart #1265

Description

@rolandgeider

See parent issue wger-project/wger#2417 for context

What to do

We need to display charts depending on the m data type, e.g. the type (a histogram for steps/sleep, two series for blood pressure, etc.).

The server exposes metric_type + aggregation on the category API and the client picks the representation from those (with line being the default and the current implementation).

metric_type aggregation chart
blood_pressure paired (systolic/diastolic) two series / range band
heart_rate min/max/avg per day range
steps, distance, energy, water sum per day bar / histogram
sleep sum per day bar
custom (default), weight, body_fat, height, blood_glucose, … sample line (unchanged)
  • Cumulative metrics (aggregation=sum) are aggregated per day and shown as
    bars/histogram, not as raw sample points.
  • Grouped categories (e.g. blood pressure) render their series together in one chart.
  • Use the implementation in Added exponentially smoothed trendline for weight #1196 for the line char

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions