s2 line hover labels#828
Conversation
…(primary series) Resolved conflicts by keeping both feature sets: dimensionHover/showHoverLabel/hoverLabelKey from AN-450446 and primarySeries/otherSeriesColor from this branch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ing right most label, adding a planning issue for future fix
…s into feat/s2-line-hover-labels
|
|
🎨 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-828 🎨 S2 Storybook -> https://opensource.adobe.com/react-spectrum-charts/PR-828-s2 📚 Docs -> https://opensource.adobe.com/react-spectrum-charts/PR-828-docs/ |
|
|
||
| /** Minimum vertical gap (px) between co-located labels per chart size tier. Base M = 12px. */ | ||
| const BASE_LABEL_GAP = 12; | ||
| export const CHART_SIZE_LABEL_GAPS = { |
There was a problem hiding this comment.
Did we make a prior decision to make label gaps scale with chart size?
There was a problem hiding this comment.
yeah I decided to scale it because with the large size they were overlapping a little too much, I think I showed you when we had that call a few weeks ago. If it looks off though let me know
There was a problem hiding this comment.
It looks good. I just forgot over the break. We set the constants up so it's easy to tweak later. Good stuff!



Description
Add hover labels to s2 line chart points, including dimension hover. The hover labels also have a cascading formula in place that offset the labels to avoid collision.
Related Issue
Motivation and Context
Provide point data info on line charts.
How Has This Been Tested?
Unit tests and storybook
Screenshots (if appropriate):
Types of changes
Checklist: