Tutorial example has bug: if a data point is removed, the tooltip color is off -- 缺少data point导致 tooltip颜色和折线颜色不符
- Dominant language
- TypeScript
- Stars
- 12.6k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### 问题描述
这个tutorial实例: 如果我去除一两个datapoint,那么tooltip颜色会和折线颜色不符。比如蓝线上的tooltip是绿色的。也就是说,除非data没有任何缺失,否则tooltip不靠谱。实际应用中,折线图的data大多都会有缺失。
### 重现链接
https://g2.antv.antgroup.com/examples/general/line/#curved
### 重现步骤
1.打到tutorial页面https://g2.antv.antgroup.com/examples/general/line/#curved
2. 在data中,去除第一行,London Jan; 然后再去除第四行,Tokyo Mar
3.移动鼠标到折线图上Mar处,观察tooltip即可
### 预期行为
期望相符,实际不符
### 平台
此bug与平台无关,因为这是官方tutorial实例。相关的平台是页面本身
### 屏幕截图或视频(可选)
### 补充说明(可选)
实际应用中,折线图的data大多都会有缺失
Contributor guide
Research direction
Start with the curved line tutorial at https://g2.antv.antgroup.com/examples/general/line/#curved and reproduce the issue by removing London Jan and Tokyo Mar from the data, then hovering at Mar. Trace how the tooltip associates data points with line colors; done means the tooltip color matches its corresponding line even when data points are missing.
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
- Mostly clear
- Newbie friendliness
- 45/100