S2 Legend: doesn't dim on line popover selection when animations are off

Open Beginner friendly
#962 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript

Research direction

Start in legendUtils.ts at getOpacityEncoding and trace how selection rules are added for legend-level versus mark-level ChartPopover components. Reproduce the provided chart with animations disabled, then verify that non-selected legend entries dim while a mark popover is open and that existing animated behavior remains unchanged.

Written by the indexing model from the issue text.

Description

bug rsc:Legend rsc:Line s2

With animations={false}, selecting a line point (opening a ChartPopover) doesn't dim the other series' legend entries. With animations on, the legend dims to match the line.

Repro
<Chart data={data} animations={false}>
  <Line color="series"><ChartPopover /></Line>
  <Legend />
</Chart>

Click a point in series A: series B's line dims, its legend entry doesn't.

Expected

Legend entries for non-selected series dim while the popover is open.

Cause

getOpacityEncoding (legendUtils.ts) only adds the selection rule when the legend itself has chartPopovers. Mark-level popovers aren't considered.

Dominant language
TypeScript
Stars
130
Forks
30
Avg merge
2d 4h
Merged PRs (30d)
91

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from adobe/react-spectrum-charts

All issues in adobe/react-spectrum-charts

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.