antvis / antvis/G2Plot

🤔 [QUESTION]当折线数值较大时,在不配max值的情况下会出现超出坐标轴的问题

Open
#3,665 0 comments 0 reactions 0 assignees View on GitHub
Question
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Question description [Please make everyone to understand it]
https://g2plot.antv.antgroup.com/zh/examples/dual-axes/stacked-column-line/#stacked-column-line
将上面的例子中的 uvBillData[0].value = 3500 (扩大十倍)时,在不静态配置坐标轴max的情况下,会出现坐标轴的最大值只达到3000,无法包裹住里面的值。
### 💻 Link to minimal reproduction

Please provide a link by forking these links [g2plot](https://codesandbox.io/s/g2plot-reproduction-template-gyej1) or GitHub repo. What is a minimal reproduction, and why is it required?

### 🏞 Expected result
由于返回数据大小无法确定,所以不能静态配置max,如何能自适应调整坐标轴的范围,始终能包裹住图表数值
### 🚑 Any additional [like screenshots]

* **G2Plot Version**:
* **Platform**:

Contributor guide

Open the contributing guide

Research direction

Reproduce the stacked-column-line example from the linked G2Plot page after changing uvBillData[0].value to 3500. Start by tracing how the dual-axis scale range is calculated when max is not configured. Done means the automatically chosen axis maximum contains the plotted value without requiring a static max.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.