-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Make legend and hover information available outside dashboard.py #126
Comments
Making legends and hovers available in InteractiveImage is crucial for doing real work in datashader, but we still haven't been able to support that. Adding legends was previously on hold while waiting for Bokeh's new colorbar support to be merged, but that's now available in the latest Bokeh release, so it's ready to go at the plotting library end. At the datashader end, the reason it is tricky is that we allow arbitrary transforms of the data in the pipeline, and there is not currently any way for the pipeline to communicate what these transforms were to the plotting library. InteractiveImage currently requires a callback that supplies only a bare image in response to a zoom or pan event, whereas we'll need to return metadata about what's in that image so that we can provide a suitable legend for that zoom level or pan area. Proposed approach:
The plan is to implement whatever version of these options can be done quickly and easily, then expand to cover the more difficult cases gradually. |
We're gearing up to work on these issues again fairly soon, and hope to set up an interface to provide the data needed for hovers and legends in a general way, hopefully as something HoloViews can process automatically. Hopefully we can get to it without letting the year tick over again! |
We just merged a PR (holoviz/holoviews#1223) in holoviews, which will let you generate interactive hover information from datashader aggregates in the notebook. Here's a toy example, which overlays the plot with a coarser aggregate to provide the hover information: |
@philippjfr Does the hover tool also work with Bokeh? Thanks. |
The hover tool as shown above works only with HoloViews's bokeh backend. |
@philippjfr Is it possible to use your workaround to show just a tooltip for the nearest point? (Relevant when zooming in to a datashaded plot). |
Legend support is now in holoviz/holoviews#4806 |
Can this also be applied to get legend entries for |
I guess try it and see! :-) |
:))). Well, I did try and I couldn't get it to work. That's why I got here :) |
The new legend support in dashboard.py is great, and once version 0.2 has been released, we should quickly move to putting some of the new code into the datashader library itself, both to reduce the size of dashboard.py (which has now grown much larger than it was initially) and to make that functionality available elsewhere (such as InteractiveImage).
Tasks:
We should also probably move InteractiveImage into Bokeh itself, if possible (issue #97), once we've made a legend- and hover-capable version, at which point we can know what the interface should be.
The text was updated successfully, but these errors were encountered: