-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add axis autoscaling #2158
Comments
You mean something similar to #387 ? |
See also #1876 for more possibly-related thoughts on the topic. |
Sorry, I missed the #1876 issue. As far as I understand, my issue is exactly like this comment. The main goal is dinamically (after interactions) autoranging one axis based on only the visible data. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be great if PlotlyJS could autoscale an axis depending on the current data on the screen.
The idea is as soon as you change visible data range, you don't care what is outside of it and just want to see the auto-scaled chart.
I've implemented auto-scaling for Y axis and here is the demo: https://codepen.io/plotly-demo/pen/JOERgj. Try to change visible range or zoom in/out using mouse/touchpad (the implementation based on
dragTail
function)Example of usage:
Plotly.newPlot('myDiv', data, layout, { autoscaleYAxis: true })
My branch & commit: apalchys@2afdb22
Could you please look into it and let me know what do you think? Would it be useful addition to the library?
The text was updated successfully, but these errors were encountered: