antvis / antvis/F2

雷达图使用<Tooltip /> defaultItem 线条指向错误

Open
#1,767 0 comments 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://stackblitz.com/edit/react-vmdpgh-5vyokg?file=index.js](https://stackblitz.com/edit/react-vmdpgh-5vyokg?file=index.js)

### Steps to reproduce
修改 中 defaultItem 值为 data 数据中 value 为 0 的时候,如 data[2] { time: '纠纷', value: 0, name: '本店' }, tooltip 线条指向了 data[0]。

| Environment | Info |
|---|---|
| f2 | 4.0.42 |
| System | - |
| Browser | - |

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction and inspect the radar chart Tooltip handling for defaultItem selection when the selected data point has value 0. Compare data[2] with data[0] and trace how the tooltip line target is chosen. Done means the line points to the requested zero-value item without changing the behavior of other radar data points.

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.