Legend hover to highlight or dim the matching series
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- data-visualization
Research direction
Start by reading the colorLegend and interactiveColorLegend entry points, then trace the existing states/focus machinery and controlled-focus path. Define how the proposed focus, group, and false hover modes should behave for a legend category, including clearing controlled focus on pointer leave; done means the legend owns this interaction without requiring an app-render workaround.
Written by the indexing model from the issue text.
Description
Version: @tanstack/charts 0.16.0.
colorLegend renders categories and interactiveColorLegend toggles visibility on click. Neither exposes hover: there is no way to focus or dim the series under the pointer from the legend, which is the default behaviour in Recharts, ECharts, Chart.js and Nivo.
The workaround today is to render the legend in app HTML and drive interaction.setControlledFocus from onRender, so the legend leaves the definition and the tooltip/focus pipeline has two owners.
Would it be possible to add a hover option to the legend extensions, e.g. hover: 'focus' | 'group' | false, that sets controlled focus for the hovered category (and clears it on leave), reusing the existing states / focus machinery? This is a natural sibling to #95 (legend item presentation).
- Dominant language
- TypeScript
- Stars
- 749
- Forks
- 45
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Contributor 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 TanStack/charts
-
A datum that renders as several leaves cannot be stated once: `states` on a group is never resolved Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·