Let me describe my use case before i ask my question: i have a page with many charts on it. I want my users to be able to use the mouse wheel to scroll and that is no problem. i just set scrollzoom: true. However, this leads to each plot ācatchingā the mouse wheel event when the user is scrolling through the document itself. Iād like to have it so that the plot only catches the zoom events if the user has indicated that they interacting with the given plot. I can hook this up without issue using click events. The problem comes in how do i update scroll zoom when the user is done interacting with the document via clicking somewhere else in the document (indicating that i should set scrollzoom: false on that plot). If I do Plotly.newPlot to update the config, it indeed does set the scrollzoom correcty but it also resets the zoom to default when I want it to retain the zoom which the user had manually set it to.
None of the other exported plotly functions which I see allow me to set configuration without replotting. So my question is, is that right or is there some way to do this which Iām missing? Is there some other pattern to follow here?
I can work around this by detecting the zoom, doing newplot and then explicitly setting the zoom back to what it was but that is pretty lame.
Any protips would be most appreciated.
MFed