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

minPadding and maxPadding Ignored after Zoom/Pan #16915

Closed
jherns opened this issue Jan 24, 2022 · 7 comments · Fixed by #21153
Closed

minPadding and maxPadding Ignored after Zoom/Pan #16915

jherns opened this issue Jan 24, 2022 · 7 comments · Fixed by #21153

Comments

@jherns
Copy link

jherns commented Jan 24, 2022

Expected behaviour

After creating a graph with a min and max padding, zooming in and zooming back out with the navigator should maintain the min and max padding.

Actual behaviour

Any sort of zooming eliminates all the padding on the graph forever.

Additionally, grabbing the middle of the navigator and panning the mouse without actually changing the zoom extremes also removes the padding.

Live demo with steps to reproduce

https://jsfiddle.net/1qbzmjao/

  1. Grab the navigator thumbs and zoom in.
  2. Zoom back out completely
    The padding will be gone.

Additionally:

  1. Grab the navigator (when it is already at max zoom) and pan to the left or right
    The padding will be gone.

Product version

v9.2.1
latest.

Affected browser(s)

All

@highsoft-bot highsoft-bot added this to To do in Development-Flow via automation Jan 24, 2022
@raf18seb
Copy link
Contributor

Hi @jdhernley, thank you for creating a ticket with your issue!

I think there's no need to add this into a core because it can be easily achieved by synchronizing extremes with a main xAxis and navigator's xAxis. Works with basic features, like e.g. changing extremes, see a demo: https://jsfiddle.net/BlackLabel/8xu0jtpn/

Definitely, I wouldn't consider it as a bug.

Is the above solution OK for you? If yes, please let me know so we can close the ticket as resolved.

@jherns
Copy link
Author

jherns commented Jan 27, 2022

Thank you that solved my issue
Actually that causes all of my data to disappear when in boost mode.
False alarm. One problem with this solution is that if I zoom in (for your example a viewport width of 5 points suffices) and then scroll the graph seems to flash as I'm scrolling it. Also, the padding becomes very large relative to the viewport width when zoomed in. It would be nice if the padding was proportional to the view port width of the graph.
@raf18seb

@karolkolodziej
Copy link
Contributor

Closing due to inactivity.

Development-Flow automation moved this from To do to Done Nov 17, 2023
@Glopter
Copy link

Glopter commented Nov 17, 2023

@karolkolodziej Why is this closed "due to inactivity"? The problem obviously still exists and I am also waiting for a solution.

@karolkolodziej
Copy link
Contributor

You are right! The issue is still visible and I was misled by the labels!

@Glopter
Copy link

Glopter commented Nov 17, 2023

Thank you :-)

@pawelfus
Copy link
Contributor

A very simple workaround could be to update the navigator's xAxis with new min and max padding: https://jsfiddle.net/BlackLabel/f15uL7b4/ (at this moment we force max and min padding to be zeroed)

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

Successfully merging a pull request may close this issue.

8 participants