Change xlim dynamically with param

Hello everyone, I would like to change xlim by parameter, I am doing it in this way:

import holoviews as hv
import panel as pn
import param
from holoviews.streams import Pipe, Buffer

class Xrange(param.Parameterized):
    xlim = param.Range((20,100), bounds=(0,None), softbounds=(None,100))
xrange = Xrange()

_points     = Pipe(data=[1,2,3,4,5,6,7])
plot1 = hv.DynamicMap(hv.Points, streams=[_points]).apply.opts(xlim=xrange.param.xlim)
pn.Row(plot1, xrange)

unfortunately nothing happens, could you please help me to manage it?

Add framewise=True to your opts like this:
plot1 = hv.DynamicMap(hv.Points, streams=[_points]).apply.opts(xlim=xrange.param.xlim, framewise=True)

1 Like

Dear Sir, thank you so much!!! That works like a charm.

1 Like