Add optional smooth glucose line to the chart#8531
Open
alanshurafa wants to merge 4 commits into
Open
Conversation
Splits SGV readings into time-contiguous runs so a connecting line can break across sensor gaps instead of bridging missing data. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Off by default; settable via the SHOW_GLUCOSE_LINE environment variable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
When showGlucoseLine is enabled, a soft monotone-curve line connects the SGV readings beneath the dots, breaking across data gaps. Gives a continuous trace like xDrip+ without the overshoot of a Catmull-Rom spline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 this adds
An opt-in setting to draw a smooth line connecting the SGV points on the focus chart. Off by default; users enable it via the existing Settings drawer.
Motivation
The chart currently shows SGV readings as discrete dots. For users who prefer a continuous trend visualization, drawing a connecting line makes patterns easier to read at a glance.
How it works
SHOW_GLUCOSE_LINEsetting and matching in-app Settings-drawer control toggles the feature.Files changed
lib/settings.js- new setting + value mapperlib/client/browser-settings.js- load/save in the Settings drawerlib/client/chart.js- renders the line on the focus chart (with the gap-segmentation helper)views/index.html- Settings-drawer controlBackward compatibility
Off by default. Existing installs behave identically.