apache / apache/echarts

[Bug] 图例显示溢出

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

Description

### Version

5.3.0

### Link to Minimal Reproduction

https://codesandbox.io/s/sharp-orla-8qs2u?file=/src/index.js

### Steps to Reproduce

开启全选 ![image](https://user-images.githubusercontent.com/31062861/151651325-c8e9dc19-ffc5-41fc-93b3-19d44dfbaa68.png)
关闭全选
![image](https://user-images.githubusercontent.com/31062861/151651336-0a551750-b259-4f23-9d47-9ea5ccceb87c.png)

### Current Behavior

legend 开启后,将全选/和反选 状态开启,图例的宽度不能自适应,溢出

### Expected Behavior

legend 开启后,将全选/和反选 状态开启,图例的宽度自适应,不溢出

### Environment

```markdown
- OS:
- Browser:
- Framework:
```

### Any additional comments?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the minimal reproduction at CodeSandbox's src/index.js and reproduce the legend overflow when select-all and inverse-selection states are enabled. Trace the legend layout behavior from that entry point, then verify that the legend width adapts without overflow in both states.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.