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

[Feature] Align multiple Y Axis 0 line #16154

Open
jack-chui opened this issue Dec 1, 2021 · 12 comments
Open

[Feature] Align multiple Y Axis 0 line #16154

jack-chui opened this issue Dec 1, 2021 · 12 comments
Labels
en This issue is in English new-feature

Comments

@jack-chui
Copy link

What problem does this feature solve?

I read the API document but I cannot see a method to align 0 line for different Y Axis
Capture
.

What does the proposed API look like?

Any method can help me to align different 0 line in Y axis?

@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Dec 1, 2021
@pissang pissang removed pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Dec 1, 2021
@mdhxolta
Copy link

mdhxolta commented Dec 2, 2021

I would like to know this as well

@ThomasKientz
Copy link

@pissang Shouldn't the new option alignTicks address this ?

@Daraan
Copy link

Daraan commented Apr 30, 2022

alignTicks aligns the ticks that they are on top of each other but it is not value specific.
That the 0 is aligned to the other 0 is not given if there are negative numbers.

A second option to manually align values to values wood be good.
Or is there a point I'm missing?

In my example the 0s can't be aligned via alignTicks if the sides have not the same proportions.
Imgur

@Superkarl
Copy link

If you set the min and max values, the 0 line will be displayed correctly. I have calculated the min and max values of all Y axes on the basis of the data and passed them in the options.

I hope that helps a little bit.

@Geloosa
Copy link

Geloosa commented Jul 19, 2023

Hey! Any updates on this one?

API proposal

yAxis.alignValues: number - Aligns ticks with the passed value on multiple numeric y axes. Only available for axes of type 'value' or log.

Or, as this probably is only needed to align 0 values,
yAxis.alignZero: boolean - Aligns ticks with the 0 value on multiple numeric y axes. Only available for axes of type 'value' or log.

@snibbo
Copy link

snibbo commented Aug 4, 2023

@Superkarl

Unfortunately, this does not solve my issue. My values on the first axis have amounts of millions and my second axis' values have cents. Setting a Min value leads to unseeable/unnoticeable chart elements (e.g. super small bars) for elements on my second axis.

Would be a really cool feature to align both axis on the 0-line, because the rest just looks odd to me (and my executives) :)

@Pk13055
Copy link

Pk13055 commented Nov 9, 2023

After almost 3 years, this issue is still open. If someone from the team can address at least whether this will be addressed or not will help guide decisions as to charting library adoption. For reference, this is a highcharts implementation with 4 y axes all with different range(s)/min/max

@agusdutra
Copy link

Hi, any updates on this issue?

@oneart-dev
Copy link

Hey team, please have a look, It should be possible to do

@agusdutra
Copy link

I think the problem is on the alignScaleTicks function added in this PR #16300

@pissang since you implemented, would you have some light on how to fix this? I've tried to get around it but I'm not familiar with the implementation of the library.

Thanks

@Rookior
Copy link

Rookior commented Jun 19, 2024

Any updates on this one? just like alignZero: boolean

@bertrandgorge
Copy link

This would definitely be useful...!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
en This issue is in English new-feature
Projects
None yet
Development

No branches or pull requests