apache / apache/echarts

[Bug] 漏斗图使用labelLayout后图例交互时标签位置异常

Open
#17,594 5 comments 0 reactions 0 assignees View on GitHub
bug topic: funnel
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
15h 17m
Merged PRs (30d)
5

Description

### Version

5.3.3

### Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=funnel&version=5.3.2&code=PYBwLglsB2AEC8sDeAoWtJgDYFMBcya6GOAHmAQOQBiArtNDlpUQL4A0RYwwWkIBVMQwAnCAHNxOEVQhgcAW0qdhAM2AiFAQzDyZsSki2tYAHgBGIgPQA-JOZOCAxqwCkLdBy48s54KUEidFUcHVoRfEJhdAATHS0ANQgcAHdBWAitGIB5aCwATwJVLSwAZxxYL2iMnFLuCMEq6NKtADccAEFSgEltKUagyrYVWFwpaBjA4TiwLQIAbUoAZQALYBTlAwBhLAgnAGtNyiTSuSPu6ABHWggRfKPskRjpSgBdYaJysVqFwaFo6BaBSRGj0RjMEbCMD5EAg1RgpjKQboXCqCgGACMAAZ3JDiNwBLAAGxYvHoPy6YAKAgksmwFIQGJgFZUAAcOKR1QUEGgBFJyNg2gCsGx_K5PKWEAAXiCOXShZKZVRRbiBaUNOjKM9Sk4cBMeeJOdFxFpCQAmOlYLTmJhTaqwUprNKiWg4OnoEDAU6QGCyaCnZ4eaJNYRWm1YAAyPMi_2quGg4mZBGx7tG0aW0Nwdvt9MZSZFqfQ0NhVHVuxiQeqrAFIeIYaYEa0-WAtHRseiwsoAFZ3DW6XJFBn8lmova_E9pFteBoqABiVQLo3VcfPEQAdTzLJFfYFihAKy0p1K2ei9awJ-q6mgYEVkTNWIFnh31Rmc1g80fyFgrRKrpppNgQFgSoE4zkqVMkG_X9IgAFgAoCQQua5bnucDP0gn8sD_WB73YQCgRBR5V0oNCcww6CCHZPCEKoHY9kOUj7XIrDIlFaiCKoVZ1hI6tqneYReNgd5WAAbiAA

### Steps to Reproduce

1. 使用示例图中第一个漏斗图。
2. 增加labelLayout配置,将标签水平放置于左侧统一的 `x` 处。
3. 运行后漏斗图展示正常,标签位置正常。
4. 点击任意图例,隐藏某一列后,图形重绘,此时发现标签的位置错乱。

### Current Behavior

- 错误的情况
![funnel (1)](https://user-images.githubusercontent.com/26702624/187364638-c3283d73-3796-4d8e-97d7-21245b03ff69.png)

以下是期望的情况(操作图例后仍然期望标签位置正常)
![funnel](https://user-images.githubusercontent.com/26702624/187364702-af5fcaaf-e2e2-4134-9ae6-7e67a31f9f09.png)

### Expected Behavior

期望在正常展示漏斗图后,操作图例等其他操作时,标签的位置仍然能够正确。

### Environment

```markdown
- OS: Mac
- Browser: 104.0.5112.101
- Framework: -
```

### Any additional comments?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked minimal reproduction and inspect the funnel chart's labelLayout behavior before and after hiding a series through the legend. Trace the relayout path triggered by legend interaction and verify that labels remain at the configured horizontal x position after redraw; use the reproduction to confirm the fix.

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.