antvis / antvis/F2

f2 Legend click bug, click legend render position can't trigger click event

Open
#1,772 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

- [ ] I have searched the [issues](https://github.com/antvis/f2/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[https://github.com/CAI-JIEMING/f2-bug-demo](https://github.com/CAI-JIEMING/f2-bug-demo)

### Steps to reproduce
When there is content above the chart, it will cause the position where the legend triggers the click event to deviate from the rendered legend position

Details can be found in the repository: https://github.com/CAI-JIEMING/f2-bug-demo

| Environment | Info |
|---|---|
| f2 | 4.0.43 |
| System | - |
| Browser | - |

Contributor guide

Open the contributing guide

Research direction

Start with the reproduction link and compare the rendered legend position with the position used for click handling when content appears above the chart. Trace the F2 legend interaction and coordinate-handling entry points, then verify that clicks on the displayed legend trigger the expected event in the reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.