Repository navigation
Add a Trends line/bar chart toggle in Settings - #134
Merged
Merged
Conversation
Settings > Appearance gains a "Trend charts" control (Line / Bar) that
switches every card on the Trends tab between the gradient line+area and
value-ramp bars. Display-only: the plotted data is identical either way,
only the mark geometry changes, and nothing in storage is touched.
iOS: TrendChart gains a showsBars flag (BarMark in place of the
line/area/point marks); the "now" end-cap is a line idiom so it is gated
off for bars. Hover/read stays on -- TrendChart always min/max-buckets in
init, so even the multi-year window is ~400 marks.
Android: ChartWithAxes picks BarChart vs LineChart from the pref at the
single chart choke point. Bars run with selection off so BarChart mean-
bins a dense (multi-year "ALL") window down to the pixel width -- a clean
silhouette rather than a 1000-bar smear; the axis column + footer carry
the numbers. The GlowEndCap ("now" halo) is line-only.
New pref UnitPrefs.trendChartStyleKey / NoopPrefs("trend.chart.style"),
default line, mirrored on both platforms next to the Effort-scale toggle.
Re-review fix. The small-multiple metric cards (HRV, RHR, Effort) pass a data-fitted, non-zero value range (e.g. RHR ~48-61) so the LINE shows variation. In bar mode a BarMark anchors at 0, so reusing that fitted domain floated every bar near full height with the real differences squashed into the top -- bar length stopped being proportional to value. Drop the domain floor to 0 in bar mode (matching Android's zero-based BarChart); the line's fitted domain is untouched.
DX23876
pushed a commit
to DX23876/noop
that referenced
this pull request
Jul 22, 2026
Add a Trends line/bar chart toggle in Settings
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a Settings → Appearance → "Trend charts" toggle (Line / Bar) that switches every card on the Trends tab between the classic gradient line + area and value-ramp bars.
It's a purely cosmetic, display-only preference — the plotted data is identical on both settings, only the mark geometry changes, and nothing in storage is touched. Default is Line (the long-standing look), so existing users see no change until they flip it.
How
iOS
TrendChart(StrandDesign) gains ashowsBars: Boolflag: aBarMarkper sample replaces the line/area/point marks. The "now" end-cap halo is a line idiom, so it's gated off in bar mode.TrendChartalways min/max-buckets ininit, so even the multi-year window is ~400 marks.TrendsView.glowChartfrom a new@AppStorage(UnitPrefs.trendChartStyleKey).Android
ChartWithAxes(the single chart choke point every trend card routes through) picksBarChartvsLineChartfrom the pref.selectionEnabled = falsesoBarChartmean-bins a dense (multi-year "ALL") window down to the pixel width — a clean silhouette instead of a 1000-bar sub-pixel smear. The max/avg/min axis column + footer carry the numbers. TheGlowEndCap("now" halo) is line-only.Both
trend.chart.style(defaultline), added next to the Effort-scale toggle and mirrored acrossUnitPrefs(Swift) /UnitPrefs(Kotlin). A distinct type (TrendChartStyle) so it never collides with the existingChartStyle("Chart colours").Verification
:app:compileFullDebugKotlinpasses locally.TrendChart(callers use labelled args and are untouched by the defaultedshowsBars;BarMarkis within the package's iOS 16 / macOS 13 floor.