holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.24k stars 363 forks source link

nyc_buildings notebook shows legend in double and interaction does not work #1312

Open PierreCe opened 5 months ago

PierreCe commented 5 months ago

ALL software version info

Online nyc_buildings notebook ((https://nyc-buildings-notebook.pyviz.demo.anaconda.com/notebooks/nyc_buildings.ipynb#)) Tested with Chrome

Description of expected behavior and the observed behavior

The legend should be shown only once, and deselecting a type of building should hide it what doesn't happen.

Complete, minimal, self-contained example code that reproduces the issue

All code is online

polys = hv.Polygons(ddf, vdims='type')
shaded = datashade(polys, color_key=color_key, aggregator=ds.by('type', ds.any()))
hover = inspect_polygons(shaded).opts(fill_color='red', tools=['hover'])
tiles * shaded * legend * hover

Screenshots or screencasts of the bug in action

In https://github.com/holoviz/datashader/blob/main/examples/user_guide/8_Polygons.ipynb there is a screenshot of the attended legend.

Actual behavior : image

As I manage to reproduce the same behavior locally, what would be the correction to make?