apache / apache/echarts

[Bug] legend的orient设置为一个错误属性导致的特性

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

Description

### Version

5.4.1

### Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?code=zZG_bsMgEMb3PAWiqwcMjhMsdWhVderWSh2iDARfY1TLRECUWJXfvQfGUv0GXe4P9_u-s872EowdyCP52RCibW9dQw70gTEh6poWJJZ1LWUqK61OGlIJW8EF0GOBslYF5SE0yYMQb69OA9qkjqBdGC9JxVnJcxY5Vzlvc65ny1n3ah34gBPBGQbBMbAyVhUGyf6g7wEuaQmPaLlHtJSI8ojyFfoCHlx0LbeI8uiKi2OLaLlCPyH0amiRlfuC7HY4j6SUBanYMWExTlHRwxmGdjlCB-bc4UkqNrvdTBu6Jq1MfTxJQ6jXzvY9nd-sMzCEhoJz1qW3ZHx_uhu_-GadVgHO1o1ZqZD4MPp7ofAndPbWkC_Ve0gv0-I2ZrfU4CEMYHdYmZ_UvH2Zv6nRXsPziCNnbzQ5rT_nnyiOm-kX&_source=echarts-doc-preview&enc=deflate

### Steps to Reproduce

设置orient='error'(非正常值)。

### Current Behavior

lengend的width和height都可以同时生效了。(如果设置为正常值就不能同时生效)
这样可以突破type=scroll,orient设置为vertical或者默认值的情况下,不能同时设置宽高的限制

### Expected Behavior

支持可以同时生效的特性,或者在文档里指明无法同时生效,不然让人产生疑惑

### Environment

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

### Any additional comments?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked minimal reproduction and inspect the legend configuration handling for orient, width, and height. No source file or test is named in the issue, so first locate the legend implementation and existing tests for invalid orient values. Done means either supporting the combined sizing behavior intentionally or documenting the restriction, with a regression test or documentation update.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.