S2 Legend: doesn't reflect highlightedItem when animations are off
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- data-visualization, frontend
Research direction
Start in legendUtils.ts at getOpacityEncoding and inspect how legend entry datums expose their series and how the interactive-mark hover rules are ordered. Done means the highlighted series stays undimmed with animations disabled, non-highlighted entries dim, and chart hover behavior still matches the animated behavior.
Written by the indexing model from the issue text.
Description
With animations={false}, an S2 legend doesn't reflect the chart's highlightedItem. Every legend entry dims, including the highlighted series, and stays dimmed when hovering the chart.
Repro
<Chart data={data} highlightedItem={idInSeriesA} animations={false}>
<Line color="series"><ChartTooltip /></Line>
<Legend highlight />
</Chart>
Expected
Only the non-highlighted series' entries dim, matching the line and the animated behavior.
Cause
In getOpacityEncoding (legendUtils.ts), the highlightedItem rule compares against datum.rscSeriesId, but legend entry datums carry the series in datum.value, so the lookup never matches. It's also ordered before the interactive-mark hover rules, so it overrides hover.
- Dominant language
- TypeScript
- Stars
- 131
- Forks
- 30
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 74
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from adobe/react-spectrum-charts
-
bug rsc:Legend rsc:Line rsc:TrendLine s2
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
adobe/react-spectrum-charts#1075 ·
Maintainers usually reply within 1 day
-
bug rsc:Bar s2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
adobe/react-spectrum-charts#1029 ·
Maintainers usually reply within 1 day
-
bug rsc:Legend rsc:Line s2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
adobe/react-spectrum-charts#962 ·
Maintainers usually reply within 1 day
-
S2 Line: static points don't dim for highlightedItem or popover selection when animations are offOpenbug rsc:Line s2
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
adobe/react-spectrum-charts#959 ·
Maintainers usually reply within 1 day
-
S2 Line: highlightedItem on a non-interactive line throws "Unrecognized signal name"Possibly taken @Hashim1999164 claimed this 33 days ago. Openbug rsc:Line s2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
adobe/react-spectrum-charts#958 ·
Maintainers usually reply within 1 day
All issues in adobe/react-spectrum-charts
Similar issues
-
bug module:nodes tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rocketride-org/rocketride-server#3020 ·
Maintainers usually reply within 2 days
-
area: dashboard area: tests good first issue size: XS tests
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Read canvas commentsOpenenhancement needs-community-review
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
shaharia-lab/slackcli#501 · 3 comments ·
Maintainers usually reply within 1 day
-
[Bug] Pod detail shows CPU usage ten times too high, and throws on decimal memory suffixesPossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 11 days
-
`package.json`: build tools listed as runtime dependencies, exact pins causing duplicate installsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
themesberg/flowbite-vue#471 ·