Hi. I’d like to control some figures using a dataframe for source options. After a bit of exploration I came to the following snippet below (for demo purposes). I’m not entirely happy using the private attribute param._widgets to add the on_click event. Is there an alternative?
There is no need to use pn.Param to turn the only parameter you have into a widget (pn.Param basically creates widgets out of the parameters of a param.Parameterized class and a container to host them).
I’m not sure though if having our various options in a DF is the right thing (usually you’d go with a param.Selector()). But it may make sense if your use case is to display all possible options (incl. the parameters) in a a concise tightly packed list.
There are different ways, the post below has a nice summary and some discussion: