Skip to content

Add optional smooth glucose line to the chart#8531

Open
alanshurafa wants to merge 4 commits into
nightscout:devfrom
alanshurafa:feature/glucose-line-upstream
Open

Add optional smooth glucose line to the chart#8531
alanshurafa wants to merge 4 commits into
nightscout:devfrom
alanshurafa:feature/glucose-line-upstream

Conversation

@alanshurafa

Copy link
Copy Markdown

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

  • New SHOW_GLUCOSE_LINE setting and matching in-app Settings-drawer control toggles the feature.
  • When enabled, the chart adds a smooth path connecting consecutive SGV points, with gap segmentation so no line is drawn across long gaps in data.

Files changed

  • lib/settings.js - new setting + value mapper
  • lib/client/browser-settings.js - load/save in the Settings drawer
  • lib/client/chart.js - renders the line on the focus chart (with the gap-segmentation helper)
  • views/index.html - Settings-drawer control

Backward compatibility

Off by default. Existing installs behave identically.

alanshurafa and others added 4 commits May 23, 2026 23:08
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant