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

[Question] - Automatically Align Multiple y-axes #1019

Open
diego-curti opened this issue Nov 7, 2024 · 0 comments
Open

[Question] - Automatically Align Multiple y-axes #1019

diego-curti opened this issue Nov 7, 2024 · 0 comments

Comments

@diego-curti
Copy link

diego-curti commented Nov 7, 2024

Hi,

Is there any way to automatically align all y-axes?

Here's a simplified example to illustrate the issue:

When there is only one y-axis where the zoom level on y is adjusted manually (by the user):

Screenshot from 2024-11-07 12-49-50

If I add more series which uses other y-axes, the zero points on the y-axes no longer align:

Screenshot from 2024-11-07 12-50-01

I suspect this misalignment may happen because I re-create the chart with all series (including new ones) and then apply the previous zoom level to the initial y-axis (the one I had at first)

For context, I set the zoom with:

 u.setScale("y1", { min: minValue, max: maxValue })

I don't know if this is the proper way to add more series with other y-axis while maintaining the current zoom level on the existing series.

Note: The chart may contain several series with substantial data, so performance is a critical factor.

This is an example of what I would expect:

Note: I manage to reproduce it by manually reseting all scales, adding new series and then putting the zoom on all y-axis also manually as a final user.

Screenshot from 2024-11-07 12-50-13

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

No branches or pull requests

1 participant