antvis / antvis/G2Plot

The hover prompt line of the broken line chart is in the wrong position 🐛 [BUG]

Open
#3,135 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

当x坐标是从1开始的连续整数时,折线图表的交互存在一定问题,鼠标的hover提示框提示的数据和提示线的位置不正确,具体请看bug示例。
When the X coordinate is a continuous integer starting from 1, there are some problems in the interaction of broken line chart. The data prompted by the hover prompt box of the mouse and the position of the prompt line are incorrect. Please see the bug example for details.

在下面的bug demo里面注意鼠标的位置和提示线和数据的展示。
In the following bug demo, pay attention to the position of the mouse and the display of prompt lines and data

### 🐛 Bug description [Please make everyone to understand it]

> Please provide a link by forking these links [G2Plot](https://codesandbox.io/s/g2plot-issue-template-gzfdq?file=/index.ts) or GitHub repo, a minimal reproduction.

* _Required_ **Link to minimal reproduction**:
bug demo:
https://codesandbox.io/s/compassionate-solomon-37tr99?file=/index.ts
no bug demo:
https://codesandbox.io/s/mutable-rgb-il80jr?file=/index.ts

### 📷 Step to reproduce

### 🏞 Expected result
bug demo:
截屏2022-03-04 10 27 09

no bug demo:
截屏2022-03-04 10 28 16

### 🚑 Any additional [like screenshots]

* **G2Plot Version**: latest
* **Platform**: macos 12.2.1 and chrome 98.0.4758.109

Contributor guide

Open the contributing guide

Research direction

Start by running the linked bug demo and the no-bug demo from each /index.ts file, using the stated browser and chart conditions: continuous integer X values starting at 1. Compare the mouse position, hover prompt line, and displayed data; done means the prompt line and hover data align correctly in the reproduced case.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.