堆叠图缺失数据,切换图例,导致柱状图显示错误
- Dominant language
- TypeScript
- Stars
- 12.6k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### 问题描述
删除一、二月数据后,点击图例展示单项值后再堆叠展示,会出现数据往前移的效果。
刚发现如果过很久不操作以后,又会正常显示了。
### 重现链接
https://g2.antv.antgroup.com/examples/general/interval/#bar-basic-stacked
### 重现步骤
_No response_
### 预期行为
_No response_
### 平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox]
### 屏幕截图或视频(可选)

### 补充说明(可选)
我在本地项目中绘制了堆叠图+折线图,当堆叠图只有一个月份(十二月)数据时,x轴月份轴会从十二月开始,导致折线图错乱。
参考以前issue,加了.scale("y", { 'type': 'linear' })并未解决问题。
Contributor guide
Research direction
Start with the linked bar-basic-stacked example and reproduce the sequence: remove January and February data, show one legend item, then restore the stacked view. Trace how legend filtering and the single-month x-axis affect the stacked bars and any line overlay; done means the data no longer shifts forward and the chart remains correct after switching views.
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
- 25/100