On Mon, Jun 18, 2018 at 4:18 PM, Sébastien Roche [email protected] wrote:
Is there a way to access the active attribute of a hovertool from a python callback? Just like what that JS callback does:
Tool.active is an internal property (to bokehjs), so no. However, I’m not sure exactly why it is this way. I don’t see any reason for not allowing users to configure active tools programmatically. Perhaps this has something to do with initialization of toolbars, which is pretty complicated. Maybe Bryan will have some more concrete feedback. Otherwise this seems something that could be improved.
Mateusz
from bokeh.models import CustomJS, Button
from bokeh.plotting import figure
from bokeh.layouts import gridplot
from bokeh.io import show
I don't recall offhand, I'd chalk it up to history at this point. As Mateusz said, toolbar interaction handling is one of the more gorpy and complicated parts to the code base. Lots of surprising side cases, even before you get to things like coalescing toolbars on grid plots. My guess is at the time I just didn't have the bandwidth to figure out how to make all that work, and make things user configurable in a consistent, working way at the same time. It's possibly something we could revisit. The next appropriate step would be a GH issue for the feature request.
Thanks,
Bryan
···
On Jun 18, 2018, at 09:16, Mateusz Paprocki <[email protected]> wrote:
Hi,
On Mon, Jun 18, 2018 at 4:18 PM, Sébastien Roche <[email protected]> wrote:
Is there a way to access the active attribute of a hovertool from a python callback? Just like what that JS callback does:
Tool.active is an internal property (to bokehjs), so no. However, I'm not sure exactly why it is this way. I don't see any reason for not allowing users to configure active tools programmatically. Perhaps this has something to do with initialization of toolbars, which is pretty complicated. Maybe Bryan will have some more concrete feedback. Otherwise this seems something that could be improved.
Mateusz
from bokeh.models import CustomJS, Button
from bokeh.plotting import figure
from bokeh.layouts import gridplot
from bokeh.io import show