holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.78k stars 519 forks source link

Support click and selection events on Perspective pane #5074

Open MarcSkovMadsen opened 1 year ago

MarcSkovMadsen commented 1 year ago

Click events are supported by Perspective and described in https://perspective.finos.org/docs/js/#click-events. It would be really valuable to add click (and row selection?) events to the Panel Perspective pane.

Selection events where added in https://github.com/finos/perspective/issues/201

If the api improvements of Perspective could be aligned with Tabulator it would be really valuable as then its really easy to explore which is the best for a specific use case.

Thanks.

MarcSkovMadsen commented 1 year ago

Additional Context

According to #3671 the Perspective pane has a selection parameter. But it is not working.

JanHomann commented 1 year ago

This is an important feature. Otherwise, I do not see ways of cross-filtering between different Perspective panes as they demonstrate on the Perspective website. Perspective panes are really powerful elements and linking several of them together for cross-filtering / selection would allow for very powerful and dynamic applications with very minimal code. They showcase many amazing examples of that on their website.

s22chan commented 1 year ago

The click event isn't too bad to handle, see https://github.com/s22chan/panel/tree/feat/perspective-click-events

MarcSkovMadsen commented 1 year ago

Hi @s22chan . The link does not work for me. Could you share again?

s22chan commented 1 year ago

try this: https://github.com/holoviz/panel/compare/main...s22chan:panel:feat/perspective-click-events?expand=1

I'd finish it, but I don't have the time to test all the different plugins. Also perspective >2.1 removed UMD builds and it's not obvious how to get panel to load them as js modules.

cottrell commented 1 year ago

@s22chan seems to work ... can it just be merged? I'm only weakly testing so far on xbar and datagrid.

contang0 commented 12 months ago

The selection feature is indeed sorely needed. Perspective is much more powerful and useful for my purposes because I can switch between a visualisation and export the underlying data, which is a key feature that is available in Tableau but hard to find elsewhere.

philippjfr commented 3 months ago

Partially implemented in https://github.com/holoviz/panel/pull/5430