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

Y-axis ranges assigned to incorrect axes when using xy zoom selection #4561

Closed
alankalb opened this issue Jul 9, 2024 · 1 comment · Fixed by #4575
Closed

Y-axis ranges assigned to incorrect axes when using xy zoom selection #4561

alankalb opened this issue Jul 9, 2024 · 1 comment · Fixed by #4575
Labels
bug Something isn't working

Comments

@alankalb
Copy link

alankalb commented Jul 9, 2024

Description

When plotting multiple y-axes each with multiple series assigned, using xy zoom selection results in the range for all y-axes other than the first in the list of the y-axes being incorrect.

Steps to Reproduce

See details in reproduction link section.

Expected Behavior

When zooming with xy selection, visible y-axes min and max ranges are set using the user's selection.

Actual Behavior

When zooming with xy selection axis ranges are assigned in order of the yaxes list regardless of whether they are visible or not.

Screenshots

Screen.Recording.2024-07-09.at.2.21.40.PM.mov

Reproduction Link

https://codepen.io/Alan-Kalbfleisch/pen/WNqbQRg

Using the chart in the link above, open the console and make a zoom selection. In the console, note the ranges that have been attributed to each axis. Axes with ids 0 and 1 are for Series 1 data. Axes with ids 2 and 3 are for Series 2 data. The range for the second visible axis is assigned to the second axis (id 1) instead of the correct axis (id 2). This results in the range of any y axes other than the first visible axes to be incorrect.

@alankalb alankalb added the bug Something isn't working label Jul 9, 2024
@rosco54
Copy link
Contributor

rosco54 commented Jul 18, 2024

I confirm this as an issue and note that this appears to have been working in revision 3.45.2.

In the current version, if I change from old-style yaxis.seriesName to the newer style as follows (added in 3.46.0 or 3.47.0), it appears to behave as expected.

 yaxis: [
    {show: true, seriesName: ["Series 1a","Series 1b"], title: { text: 'Series 1' }, id:0},
    {opposite: true, show: true, seriesName: ["Series 2a","Series 2b"], title: { text: 'Series 2' }, id:1},
  ]

There is supposed to be full compatibility between the old and new configuration styles but it appears that the mapping of y-axis indices was missed in some or all of the zoom selection code.

Looking into this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants