Tighten glucose chart vertical padding (especially the bottom) - #72
Open
Sjoerd-Bo3 wants to merge 3 commits into
Open
Tighten glucose chart vertical padding (especially the bottom)#72Sjoerd-Bo3 wants to merge 3 commits into
Sjoerd-Bo3 wants to merge 3 commits into
Conversation
The plot left a heavy empty band beneath the data, most visible when glucose sits well above the low threshold: - Asymmetric y-domain padding (top 15 / bottom 8 mg/dL) instead of a symmetric 25, so the floor sits closer to the data. Bottom stays > 0 for the FPU dots pinned to minYAxisValue. - Reduce the low-threshold floor margin from 20 to 10 mg/dL — enough to keep the low/target rule marks off the plot edge without the big gap below. Layout-only; verify on-device.
FPU dots pin to minYAxisValue, but this build doesn't use carbs/FPUs, so the bottom no longer needs room for them. Drop bottom padding 8 -> 3 mg/dL; the low-threshold floor margin (10) still keeps the low/target lines off the plot edge.
…t-padding-tighter # Conflicts: # .github/workflows/compile_check.yml
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.
Summary
The main glucose plot left a heavy empty band beneath the data — most noticeable when glucose runs well above the low threshold (the gap you marked in the screenshots). Two coupled sources:
minYAxisValue = min(minOverall, lowGlucose - 20)— the floor was pulled 20 mg/dL below the low line, and then the −25 padding stacked on top.Changes
MainChartView.paddedGlucoseYDomain: asymmetric padding — top 15 / bottom 8 mg/dL instead of 25/25. Bottom stays above 0 because FPU dots pin tominYAxisValueand need a little room.ChartAxisSetup: low-threshold floor margin 20 → 10 mg/dL — still keeps the low/target rule marks off the plot edge, without the large empty band below.Net effect: the plot floor sits much closer to the data / low line, and there's a bit less headroom up top too.
Verification
🤖 Generated with Claude Code
Generated by Claude Code