examples icon indicating copy to clipboard operation
examples copied to clipboard

WIP: Widget-based Datashader dashboard

Open jbednar opened this issue 5 years ago • 7 comments

This PR adds a version of the Datashader dashboard based on explicit widget objects rather than defining a class with Parameters from which widgets are synthesized. The functionality should be identical with HoloViews >= 1.12.6 and Panel >= 0.6.4, but it shows the user how to specifically control the type and parameters of every widget while not requiring users to learn about Parameters or about writing their own Parameterized (or any other) custom classes. The two dashboards are meant to be so closely aligned that diff can be used to see the specific differences between the two approaches.

What makes this still be WIP is that when you uncomment #pn.Row(widgets,view) in widgetdashboard.ipynb, the output of that cell doesn't show any plot. It does show a plot if you change the return value of view() to just dataplot * labels (no map tiles), but including the map tiles or their options messes it up. @philippjfr , any ideas?

As it's just a demo, widgetdashboard.ipynb also defaults to nyc_taxi_50k, not nyc_taxi, but once it works it can be changed to share the same default as dashboard.ipynb.

jbednar avatar Oct 09 '19 20:10 jbednar

Adding a height to the base opts seemed to fix the issue.

jsignell avatar Nov 20 '19 18:11 jsignell

Can it also be fixed with a min_height? That way responsive behaviour isn't entirely disabled.

philippjfr avatar Nov 20 '19 18:11 philippjfr

Yeah that is a better solution.

jsignell avatar Nov 20 '19 20:11 jsignell

But isn't that just a workaround? Why should including map tiles affect whether there is a plot?

jbednar avatar Nov 21 '19 01:11 jbednar

It doesn't affect whether there is a plot. It affects whether the plot has height=0 presumably because having responsive set to True trumps height, width set on the other plot.

Maybe the question is should responsive=True have a default min_height? I imagine that has been discussed at length in a different repo.

jsignell avatar Nov 21 '19 14:11 jsignell

@jbednar do you still want this new notebook to be part of the examples? Asking as the PR is pretty old, you might have changed your mind ;)

maximlt avatar Jan 09 '23 16:01 maximlt

Yes, this should be updated and merged, particularly since it's the approach I'd recommend to most users starting out. I sure hope that there are answers to the above issue now!

jbednar avatar Jan 19 '23 02:01 jbednar