Repository navigation
fix(web): gaps render BLANK, not as straight connectors - #36
Merged
Merged
Conversation
The gap policy from #28/#33 turned unmeasurable rate stretches into nulls — correct data, but the renderer lied: spark() and LineChart filtered the nulls and drew the kept samples as ONE polyline, stitching long straight diagonals across every invisible stretch (owner screenshot: prefill curve full of 'perfectly straight line segments'). Filtering + connecting = bridging terrain that was never measured. Both renderers now BREAK the path on nulls: one subpath per finite run, area fill per run, last-point dot from the last NON-NULL sample. CAP thinning skips indices too — those stays are finite and must not read as gaps (regression test). autoY min/max loops skip nulls explicitly: 'null < mn' coerces to 0 and would silently pin the floor. No revert: the #28/#33 anti-dance data policy is exactly what the owner wants ('interrupted where it did not generate is the most realistic'). This is the half both PRs left unshipped — the render layer honoring the gaps.
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.
Follow-up to #28/#33. The data layer now emits nulls for unmeasurable stretches, but spark()/LineChart filtered nulls and drew kept samples as ONE polyline — bridging every gap with a straight connector (owner screenshot: 'perfectly straight line segments'). Both renderers now break the path per finite run; thinning skips stay connected; autoY guards null coercion; last-point dot uses last non-null. Tests: 4 new spark gap-break checks; node suites green; 333 pytest green.