antvis / antvis/G2

双轴图 tooltip行为不一致

Open
#6,041 0 comments 0 reactions 0 assignees View on GitHub
v5
Dominant language
TypeScript
Stars
12.6k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### 问题描述

双轴图由分组柱状图和分组折线图两部分组成,当柱状图和折线图的分类数目一致时,tooltip的item会被覆盖/重复

### 重现链接

https://codesandbox.io/p/sandbox/frosty-fog-xsnnrf?file=%2Findex.ts%3A21%2C1

### 重现步骤

1. 观察tooltip
2. 将柱图数据注释部分取消后再次运行
3. 再次观察tooltip

### 预期行为

期望看到tooltip展示与数据无关的一致性行为

### 平台

- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]

### 屏幕截图或视频(可选)

分组数目相同时,如都为2种时
![image](https://github.com/antvis/G2/assets/35426360/29d5142f-c623-4896-94d6-87422ab2dd3c)
分组数目不相同时,如一个是2种,另一个是3种
![image](https://github.com/antvis/G2/assets/35426360/dcbf5316-8b2e-4b5f-84ef-3b5804ee24d5)

### 补充说明(可选)

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the reproduction in the CodeSandbox at index.ts:21 and compare the tooltip after restoring the commented bar-chart data. Investigate the grouped bar and line series when they have equal versus different category counts. Done means the tooltip items show consistent, non-overlapping behavior in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.