antvis / antvis/G2

双y轴图表,在点击legend进行交互时会导致渲染异常

Open
#6,279 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
12.6k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### 问题描述

双y轴图表,在点击legend隐藏或显示某些图像元素时候,会导致渲染异常

### 重现链接

https://codesandbox.io/p/sandbox/sparkling-haze-hrph9k?file=%2Findex.ts

### 重现步骤

1.点击sandbox链接,等待图表渲染完成
2.点击legend第一个色块,隐藏柱子,在点击显示柱子
3.渲染出现问题,折线图x轴范围收窄

### 预期行为

正常渲染

### 平台

- 操作系统: [macOS]
- 网页浏览器: [Google Chrome]

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

![2024-06-07 17 51 39](https://github.com/antvis/G2/assets/76272017/0d9aeada-edc0-4c4e-8c82-14422b37756f)

### 补充说明(可选)

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox and its index.ts, reproduce the issue by hiding and showing the first legend item in the dual-y-axis chart, and inspect the rendering behavior. Done means the chart renders normally and the line chart's x-axis range does not shrink after the legend interaction.

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
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.