Reputation: 521
I'm using Plotly.js to plot some data that I already know cannot be negative. I need to keep the zoom and other plot "navigation" features of Plotly, yet I would disallow the user to go below the zero on the y-axis, as it does not make sense for the type of data being plotted.
Ideally, I would like to allow the zoom only in the range [0, 100]
, if possible.
I went through the documentation and github issues to find some ideas, so I'm not sure what I need is possible with the current release of Plotly.
Any ideas?
Thanks
Upvotes: 3
Views: 4277
Reputation: 820
You may do this to set yaxis
range
var layout = {
yaxis:{
range:[0,100]
}
}
Upvotes: 1