antvis / antvis/G2Plot

🐛 [BUG] Legend focus not working correct on DualAxis charts

Open
#3,347 0 comments 0 reactions 0 assignees View on GitHub
Bug
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.