antvis / antvis/G2Plot

子弹图changeData时,特殊情况下rangeField的label超出绘制区域导致看不见🐛 [BUG]

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

### 🐛 Bug description

> link: https://codesandbox.io/s/elastic-tereshkova-3cpwlw?file=/index.ts

### 📷 Step to reproduce and screenshots
前后两次changeData时,targetField的值一样,且前一次rangeField内的值为0,
后一次rangeField的值显示超出了绘制区域,需要更大的padding才能露出来。

![2951655192935_ pic](https://user-images.githubusercontent.com/11418729/173524958-022db893-d3b9-4c0d-b9d2-23b4445f9bc3.jpg)

![2961655193042_ pic](https://user-images.githubusercontent.com/11418729/173524967-451c38e7-2067-4305-8563-2d0a88f11b32.jpg)

### 🏞 Expected result

* **G2Plot Version**: 2.4.19
* **Platform**:

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction and inspect the bullet chart behavior when changeData is called with the same targetField and a previous rangeField value of 0. Trace how the rangeField label is positioned; done means the label remains visible within the drawing area without requiring extra padding.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.