Commit f088cdb
Fix ramp chart preview rendering as a vertical spike instead of a slope
Chart.js's `stepped: true` was hardcoded for every dataset in the
chart renderer (pre-existing, unrelated to this PR). That's correct
for series like resistance/cadence, whose points already encode
sharp transitions via duplicate x values at interval boundaries, but
it forces a step interpolation between a ramp's two distinct-x
points too, turning the intended diagonal (fromW at start, toW at
end) into a flat segment followed by a vertical jump at the very end
- which is what showed up as a stray vertical line in the preview.
Added a per-series `stepped` flag (default true, unchanged for
resistance/cadence/etc.), set to false for the power series (bike
and rower) since it's the only one that can carry a ramp. Flat
(non-ramp) power segments look identical whether stepped or not, so
this doesn't affect the non-ramp case.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent bff3827 commit f088cdb
2 files changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
1445 | 1445 | | |
1446 | 1446 | | |
1447 | 1447 | | |
| 1448 | + | |
1448 | 1449 | | |
1449 | 1450 | | |
1450 | 1451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
0 commit comments