🐛 [BUG] Legend focus not working correct on DualAxis charts
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 591
- PR merge metrics
- No merged PRs in 30d
Description
Legend focus not working correct on DualAxis charts initially.
Reproduce:
1. Copy "Dual multi line-Example" and add `legend : { radio : true }`
2. Click on a focus button (radio) in the legend
3. Result: Only graphs of the current axis are deselected.
Expected Result: All other graphs will be deselected.
4. Remark: After clicking on different focus buttons on graphs of both axis, all works correct
[Bug-Demo](https://codesandbox.io/s/dualaxis-legend-focus-bug-fevkjw?file=/src/index.js)
* **G2Plot Version**: 2.4.20
* **Platform**: All, including example page
Contributor guide
Research direction
Start with the linked CodeSandbox at src/index.js and reproduce the issue using the “Dual multi line-Example” with legend { radio: true }. Trace the DualAxis legend focus behavior, then verify that selecting a focus button initially deselects graphs on both axes, as shown in the expected result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100