I’m trying to use the OnReset event to know when the user has pressed the reset button on the plot. If they do, I want to double-check that there isn’t new data in the database and possibly update the plot with that new data.
Unfortunately, OnReset only seems to arrive when the reset button also causes the plot contents to recenter itself.
Is that the expected behavior? Is there way to know when the reset button was pressed even if the bokeh library didn’t need to do anything with that button press?
But regardless, based on your description, I’ll also mention CustomAction will allow you to add a custom button to the the toolbar and trigger a CustomJS whenever it is clicked.
Datamodels are a quick easy way to define your own custom models (that can have all the same on_change events, etc) without writing any extension code: