-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Closed
Closed
Copy link
Labels
bugdifficulty: easyIssues that can be fixed more easily than the average.Issues that can be fixed more easily than the average.enThis issue is in EnglishThis issue is in Englishtypescript
Description
Version
master c9e9a02
Link to Minimal Reproduction
Just a documentation error.
Steps to Reproduce
-
Open https://echarts.apache.org/en/api.html#echarts.init which states that both
widthandheightare of typenumber|string. We should therefore expect https://github.com/apache/echarts/blob/master/src/core/echarts.ts or https://github.com/apache/echarts/blob/5.3.3/src/core/echarts.ts to be consistent with this documentation.
Current Behavior
- For https://github.com/apache/echarts/blob/master/src/core/echarts.ts and https://github.com/apache/echarts/blob/5.3.3/src/core/echarts.ts ,
widthandheightare bothnumber, which means the following paragraph of the document is not reasonable enough.
width Specify width explicitly, in pixel. If setting to null/undefined/'auto', width of dom (instance container) will be used.
height Specify height explicitly, in pixel. If setting to null/undefined/'auto', height of dom (instance container) will be used.
- Refer to
- https://github.com/apache/echarts/blob/5.3.3/src/core/echarts.ts#L322
- https://github.com/apache/echarts/blob/master/src/core/echarts.ts#L323
Expected Behavior
- Updating documentation is expected behavior.
Environment
- OS: Windows 11
- Browser: 105.0.1343.42
- Framework: Vue@2Any additional comments?
- I believe most of the people in "Can't get dom width or height" incorrectly fires for width/height values of 0. #10478 get that kind of error simply because they misunderstood the documentation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugdifficulty: easyIssues that can be fixed more easily than the average.Issues that can be fixed more easily than the average.enThis issue is in EnglishThis issue is in Englishtypescript

