The Kickstarter Dashboard of awesome-panel.org I have a MultiSelect widget for selecting categories
I thought this was not really usefull as it took up a lot of space and it’s difficult to go from selecting all categories to just a few and back. So I wanted to try having a more vertically oriented version on the right side.
I could do this using Rows and Columns. But the I found that the MultiSelect was too wide. So I needed to set the max_width.
I was in doubt on how to do this as the documentation only says how you can layout a Parametrized Class
But I found it works for a single parameter of a Parametrized class as well.
pn.Param(self.param.categories, widgets={"categories": {"max_width": 125, "size": len(self.categories)}}), sizing_mode="stretch_width"),
My question is. Is this really the right and best way to control the layout of an individual parameter of a parametrized class?
I needed individual styling because I needed to control a lot of things
def view(self):
"""A Reactive View of the KickstarterDashboard"""
return pn.Column(
pn.pane.Markdown(__doc__),
InfoAlert(INFO),
pn.layout.HSpacer(height=25),
pn.Row(
pn.Column(self.scatter_plot_view, self.bar_chart_view, sizing_mode="stretch_width"),
pn.Param(self.param.categories, widgets={"categories": {"max_width": 125, "size": len(self.categories)}}), sizing_mode="stretch_width"),
sizing_mode="stretch_width",
)