antvis / antvis/G2

Rangex 的 Legend 点击交互会导致原本其他内容不渲染

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

Description

### 问题描述

[官网上的例子中](https://g2.antv.antgroup.com/manual/core/data#%E6%A0%87%E8%AE%B0%E7%9A%84%E6%95%B0%E6%8D%AE)

在一个图例中可以同时画 line 和 rangex ,需要用同一个维护的 X通道数据来关联起两个图形,但是在 rangex 的legend 交互时会直接将 Line 的X通道数据也过滤掉,导致原本的图形渲染异常,正常交互应该是点击 range 的legend 只对自己部分有影响
。并且如果对同一个legend点击两次使其回归选中状态,图形依旧无法回到最初渲染的样子

### 重现链接

https://g2.antv.antgroup.com/manual/core/data#%E6%A0%87%E8%AE%B0%E7%9A%84%E6%95%B0%E6%8D%AE

### 重现步骤

1. 进入页面
2. 点击 rangex 的 legend
3. 重复点击进行切换

### 预期行为

期望:rangex 的交互 不影响line 渲染,正常点击 rangex legend 只会显示/隐藏自己
实际:line 数据遭到影响

### 平台

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

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

![image](https://github.com/user-attachments/assets/35c7e42a-e69d-4d4a-9dda-0b560ef5e4cb)

![image](https://github.com/user-attachments/assets/21c83692-eb92-4788-a94d-eae267fcca81)

![image](https://github.com/user-attachments/assets/2d1e44d3-3a98-4da0-9682-2423d5c7e4cc)

### 补充说明(可选)

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the G2 manual data example linked in the issue and reproduce the rangex legend toggle twice. Trace how legend filtering affects the shared X-channel data for line and rangex. Done means toggling rangex changes only rangex and restores the original rendering when selected again; the issue names no source file or test.

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.