Hi,
This is an example that reproduces the problem: categories can´t be updated after I change them once.
Am I supposed to do this in a fundamentally different way?
import panel as pn
import holoviews as hv
import hvplot.pandas # noqa
import pandas as pd
import param
import numpy as np
class Viewer(param.Parameterized):
control = param.Number(default=0, bounds=(0,1), step=1)
def __init__(self, **params):
super().__init__(**params)
self.traces = []
for columns in ['ABCD', 'EFGH']:
self.traces.append(pd.DataFrame(np.random.randint(0,100,size=(100, 4)), columns=list(columns)))
self.panel = pn.Column(pn.Param(self.param), pn.pane.HoloViews(hv.DynamicMap(self.view)))
@param.depends("control")
def view(self):
return self.traces[self.control].hvplot()
v = Viewer()
v.panel
You can notice that once I select Control=1 the categories will not revert back if I select again Control=0. The video starts with the categories A, B, C and D. It get stuck with E, F, G and H even if the actual data is correct! Hope the explanation is clear enough.