Commit b92a163
authored
fix(dashboard): glucose in-range coloring, treatment markers, loop pill units (#422)
Glucose chart "In Range" coloring used the personal target range (Low/High)
for both point colors and the dashed reference lines. A narrow target (e.g.
95-95) collapsed the In Range band onto a single value. Color by a fixed
clinical band (54/70/180/250) instead, independent of the target, and carry
the personal target separately (ChartThresholdsDto.TargetLow/TargetHigh) as
its own reference line.
Carb and bolus markers were positioned at magnitude-dependent heights, so the
two half-circles only combined into a single circle by coincidence. Anchor
both to a shared baseline (IOB/COB track center) so a same-time carb+bolus
always forms one circle; magnitude stays in the labels.
Treatment hemisphere SVGs had their arc sweep flags reversed, so the arcs
bulged outside the icon viewBox: the bolus legend symbol showed as a flat line
and the carbs symbol was clipped away entirely; the chart markers bulged
opposite to their labels. Correct the sweep flag in BolusIcon, CarbsIcon,
BolusMarker and CarbMarker so bolus is a dome (above baseline) and carbs a
bowl (below baseline), consistent across legend and chart.
The Loop pill formatted eventual BG with a local helper defaulting to mmol/L
and was never passed the user's unit preference. Use the shared bg() helper so
it follows the global glucose-unit preference like every other BG display.
Regenerated NSwag client/schemas for the new threshold fields.1 parent 5fe56a6 commit b92a163
19 files changed
Lines changed: 4818 additions & 4717 deletions
File tree
- src
- API/Nocturne.API/Services/ChartData/Stages
- Core/Nocturne.Core.Models
- Web/packages/app/src/lib
- api/generated
- components
- dashboard/glucose-chart
- engine
- markers
- tracks
- icons
- status-pills
- utils
- tests/Unit/Nocturne.API.Tests/Services/ChartData/Stages
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
45 | | - | |
46 | | - | |
| 50 | + | |
| 51 | + | |
47 | 52 | | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
58 | | - | |
59 | | - | |
| 65 | + | |
| 66 | + | |
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
117 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
118 | 131 | | |
119 | 132 | | |
120 | 133 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments