Repository navigation
TIR band fixes - #57
Merged
kristinkand merged 1 commit intoOct 10, 2026
Merged
Conversation
The band now uses TIRCalculator, so each reading is counted once with the same 54 and 250 mg/dL cutoffs as the TIR chart in Stats. It also has a very high segment and uses the same colors as that chart. Every non-empty segment gets a minimum width so a single low reading stays visible, and the bar fills the full width of the band. The Stats Style setting is only in General.
kristinkand
added a commit
that referenced
this pull request
Oct 10, 2026
TIR band: custom range bounds, threshold refresh, shared title Great catch! #57 fixed the double counting: since then, every reading lands in exactly one segment. #58 fixes which segment it lands in. With a custom low limit below 3.0 mmol/L, a reading between that limit and 3.0 is in your range, so it shouldn’t count as “very low”. Before #58, the band and the statistics box could therefore show different in-range percentages for such custom ranges. Now they match. This only matters with a custom range that reaches below 3.0 or above 13.9 mmol/L. With TIR, TITR or TING nothing changes, because those ranges never go past those limits.
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.
These are fixes for the TIR band PR. The band now uses TIRCalculator, the same code as the TIR chart in Stats, so each reading is counted once. Before, a custom low limit below 54 could count a reading as both very low and in range. It now has a very high segment above 250 and uses the LoopFollow colors from the Stats TIR chart. Small segments always get a minimum width, so a single very low reading is visible even late in the day. The bar now fills the full width of the band. The Stats Style setting is only in General and has been removed from Units and Metrics.