Skip to content Skip to sidebar Skip to footer

Get A Different (non Default) Widget When Using Param In Parameterized Class (holoviz Param Panel)

I use a parameterized class to build my Panel dashboard. I would like to use a CrossSelector but this selector does not seem to be available when looking at the options that libra

Solution 1:

Param has a default widget for every Selector, but you can change this.

You can override this default widget as follows to get the CrossSelector in your example by using pn.Param():

pn.Row(pn.Param(
    valve_explorer.param['selected_features'], 
    widgets={'selected_features': pn.widgets.CrossSelector}
))

A similar solution found on SO is using pn.panel():

pn.Row(pn.panel(
    valve_explorer.param['selected_features'], 
    widgets={'selected_features': pn.widgets.CrossSelector}
))

See more documentation on using Param with Panel here: https://panel.pyviz.org/user_guide/Param.html

Post a Comment for "Get A Different (non Default) Widget When Using Param In Parameterized Class (holoviz Param Panel)"