fix: TimeSeries disappearing series lines on zoom#9690
Open
raworks-software wants to merge 1 commit intoHumanSignal:developfrom
Open
fix: TimeSeries disappearing series lines on zoom#9690raworks-software wants to merge 1 commit intoHumanSignal:developfrom
raworks-software wants to merge 1 commit intoHumanSignal:developfrom
Conversation
Build zoomed paths from the full channel series to avoid empty SVG d attributes.
👷 Deploy request for label-studio-docs-new-theme pending review.Visit the deploys page to approve it
|
👷 Deploy request for heartex-docs pending review.Visit the deploys page to approve it
|
✅ Deploy Preview for label-studio-playground ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Reason for change
This PR fixes a TimeSeries rendering issue where some channels disappear while zooming, and the rendered SVG
<path>ends up with an emptyd=""attribute.Observed behavior:
<path ... d=""></path>This appears related to:
Root cause:
Solution:
What changed
In
TimeSeriesVisualizer.jsx:channel.fullSeriesfor each channelchannel.getVisibleSegment(...)to derive the visible segment from the full series using a bisectorchannel.fullSeriesinstead ofthis.slices[left/right]In
Channel.jsx:multiaxishandling changes so the visualizer receives the expected set of channels when rendering shared chartsScreenshots / Representation
before.mp4
after.mp4
Rollout strategy
No feature flag.
This is a direct bug fix to TimeSeries rendering behavior.
Testing
Manual verification performed locally:
d=""in the tested casesAdditional validation performed:
Risks
Low to moderate.
Potential risks:
Risk mitigations:
Reviewer notes
The most important logic is in:
initializeChannel(...)setChannelRangeWithScaling(...)Please review:
channel.fullSeriesis constructedchannel.getVisibleSegment(...)selects boundary pointsthis.slices[left/right]General notes
This fix targets the specific failure mode where D3 receives too few valid points for the current visible range and emits an empty SVG path.
The intended behavior after this change is:
Overall fixes performed by ChatGPT, I barely did any review of source code.