The functional approach we used in the previous section is convenient for exploration within the notebook. For a complex dashboard, however, it is better to use a somewhat declarative approach for more complex dashboards. In order to do that, we need to inherit from the Panel's param.Parameterized object and declare the parameters as it's attributed. For each view, we will create a separate method, using the @param.depends('param1', 'param2') decorator to bind the view refresh with the corresponding parameter updates. Let's give it a try:
- First, we'll define the DateRange parameter, using a simple tuple of date-time values:
bounds = (dt.datetime(2019,1,1),dt.datetime(2019,5,30))dr = param.DateRange(bounds=bounds, ...