Repository navigation
fix(s2-line): prevent fixed metric axis hover collapse - #1014
Draft
madelineluke wants to merge 4 commits into
Draft
madelineluke wants to merge 4 commits into
madelineluke wants to merge 4 commits into
Conversation
Contain out-of-range line marks, exclude invisible hover candidates, and keep axis baselines within the plot. Add runtime regressions and sparse-data Storybook coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace baseline clamping with clipping and cover preserved scale positions, plot bounds, and negative fixed-range hover behavior. Rename the dashboard example to Fixed metric axis. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
madelineluke
marked this pull request as draft
October 16, 2026 20:31
Clip only line paths when a metric axis range is fixed, filter off-plot static points and direct labels, clip the baseline only when outside the axis domain, and rename FixedMetricRange to FixedMetricAxis. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Route main's draw-in Voronoi data through the fixed-axis visible hover data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Contributor
|
🎨 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-1014/ 🎨 S2 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-1014-s2/ 🎨 S2 Dev Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-1014-s2-dev/ 📚 Docs -> https://opensource.adobe.com/react-spectrum-charts/PR-1014-docs/ |
This branch has not been deployed
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.



When an
Axisrange puts line data mostly outside the plot (for example sparse data below the range), off-plot geometry changed the chart's measured size. The plot then flickered and collapsed to zero height on hover. Hover could also show crosshairs for points you can't see.Changes (S2 only, and only when a metric axis range is fixed):
• Line paths and their hover-overlay copies are clipped to the plot. Points and labels are not clipped.
• Off-plot static points, point annotations and direct labels are hidden.
• Off-plot points can't be hovered, so no crosshairs appear for invisible data.
• The axis baseline is clipped only when its value is outside the axis domain, for example a 0 baseline with a range of [400k, 550k].
Charts without a fixed metric axis range are unchanged.
Testing: runtime Vega tests check that the plot size stays stable through hover across these cases: data above or below the range, lines crossing it, points on the range edges, a range crossing zero, ranges excluding zero, static points and labels, and Combo. There are also unit tests for the clip and filter logic. Regression stories are under Line → Regressions → Fixed Metric Axis, and the dashboard has a variation for it.
Description
Related Issue
Motivation and Context
Fixes collapsing Line chart when the metric axis is fixed and the data is outside of that.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: