Skip to content

WEB-4694 - Standardize Y-Axis on Stacked Daily Charts - #562

Open
henry-tp wants to merge 5 commits into
developfrom
WEB-4694-stacked-range
Open

WEB-4694 - Standardize Y-Axis on Stacked Daily Charts#562
henry-tp wants to merge 5 commits into
developfrom
WEB-4694-stacked-range

Conversation

@henry-tp

@henry-tp henry-tp commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

WEB-4694

Blip: tidepool-org/blip#2026

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 50e8ee0f-7466-4d77-90b6-f41e381b2b08

📥 Commits

Reviewing files that changed from the base of the PR and between 73a23b3 and bc5da8d.

📒 Files selected for processing (2)
  • package.json
  • plugins/blip/chartdailyfactory.js
💤 Files with no reviewable changes (1)
  • plugins/blip/chartdailyfactory.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features
    • Added an optional full-range blood glucose scale for daily charts.
    • When enabled, the chart’s y-axis covers the complete range of readings supported by the CGM and displays appropriate default tick marks.
    • The option is disabled by default, so existing charts continue fitting the scale to the displayed data.
    • This setting provides a consistent visual scale when comparing readings across daily charts.

Walkthrough

The chart factory now exposes an opt-in fullRangeBgScale option. When enabled, BG scaling uses fixed CBG bounds and returns ticks within those bounds. Default data-dependent behavior remains unchanged. The package version is updated.

Changes

Full-range BG scaling

Layer / File(s) Summary
Expose full-range option
plugins/blip/chartdailyfactory.js, package.json
The chart factory defaults fullRangeBgScale to false. The package version changes to 1.41.0-web-4694-stacked-range.2.
Apply fixed BG bounds
js/plot/util/scales.js
When enabled, the BG scale uses fixed minimum and maximum CBG values. BG ticks are filtered to those bounds without requiring input data. Existing data-dependent behavior remains unchanged when disabled.

Estimated code review effort: 3 (Moderate) | ~15–30 minutes

Merge Risk: ⚪ Minimal · up to bc5da

This change adds an opt-in fixed blood-glucose chart range while preserving the default data-dependent behavior. No concrete merge-blocking risk is identified in the supplied change context.

Sequence Diagram(s)

sequenceDiagram
  participant ChartFactory
  participant BGScale
  participant BGTicks
  participant BGChart
  ChartFactory->>BGScale: pass fullRangeBgScale option
  BGScale->>BGChart: return scale using fixed CBG bounds
  ChartFactory->>BGTicks: pass fullRangeBgScale option
  BGTicks->>BGChart: return ticks within CBG bounds
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the ticket and the main change: standardizing the Y-axis on stacked daily charts.
Description check ✅ Passed The description identifies ticket WEB-4694 and links to the related Blip pull request, which is relevant to the changeset.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch WEB-4694-stacked-range

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@clintonium-119 clintonium-119 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

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.

2 participants