Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

柱状图是否支持从最小值开始画,现在柱状图都只能从0开始画 #15463

Closed
xzf123456 opened this issue Aug 3, 2021 · 7 comments · Fixed by #17078
Closed
Milestone

Comments

@xzf123456
Copy link

Version

5.1.2

Reproduction link

https://segmentfault.com/q/1010000015342610

Steps to reproduce

柱状图是否支持从最小值开始画,现在柱状图都只能从0开始画。

What is expected?

希望柱状图从最小值开始画,如值为-10,最小值为-20,则希望从-20画到-10,而不是现在的0到-10

What is actually happening?

希望柱状图从最小值开始画,如值为-10,最小值为-20,则希望从-20画到-10,而不是现在的0到-10

@echarts-bot
Copy link

echarts-bot bot commented Aug 3, 2021

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that it contains a minimum reproducible demo and necessary images to illustrate. Otherwise, our committers will ask you to do so.

A minimum reproducible demo should contain as little data and components as possible but can still illustrate your problem. This is the best way for us to reproduce it and solve the problem faster.

You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical question.

If you are interested in the project, you may also subscribe our mailing list.

Have a nice day! 🍵

@echarts-bot echarts-bot bot added bug pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Aug 3, 2021
@echarts-bot
Copy link

echarts-bot bot commented Aug 3, 2021

@xzf123456 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

Whether or not the bar chart supports painting from the minimum value, now the bar chart can only start from 0

BODY

Version

5.1.2

Reproduction link

https://segmentfault.com/q/1010000015342610

Steps to reproduce

Whether or not the bar chart supports painting from the minimum value, now the bar chart can only start from 0.

What is expected?

If you want the bar chart to start with the minimum value, such as -10 and the minimum value is -20, you want to draw from -20 to -10 instead of the current 0 to -10

What is actually happening?

If you want the bar chart to start with the minimum value, such as -10 and the minimum value is -20, you want to draw from -20 to -10 instead of the current 0 to -10

@pissang
Copy link
Contributor

pissang commented Aug 3, 2021

设置 yAxis.scale 为 true

@xzf123456
Copy link
Author

设置 yAxis.scale 为 true

已设置,并且设置了 xAxis的axisLine: {onZero: false}依旧无效,设置后效果是这样的
image

@pissang pissang added this to the 5.3 milestone Aug 3, 2021
@Ovilia Ovilia added topic: bar and removed pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Aug 10, 2021
@quillblue
Copy link
Contributor

设置yAxis.min'dataMin'
Example Option
option = { xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value', min:'dataMin' }, series: [ { data: [-120, 200, 150, 80, 70, 110, 130], type: 'bar' } ] };

Ref: https://echarts.apache.org/en/option.html#yAxis.min

@xzf123456
Copy link
Author

xzf123456 commented Oct 11, 2022 via email

@xzf123456
Copy link
Author

xzf123456 commented May 21, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants