File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -354,16 +354,23 @@ def csv_data(
354354 visible = show_n_bins ,
355355)
356356
357- interactive_xlim = pn .bind (xlim_auto , interactive_decomposition )
357+ interactive_xlim = pn .rx (xlim_auto )( interactive_decomposition )
358358selector_xlim = pn .widgets .EditableRangeSlider (
359359 name = "X-lim" ,
360360 start = interactive_xlim .rx ()[0 ],
361361 end = interactive_xlim .rx ()[1 ],
362- value = interactive_xlim ,
362+ value = interactive_xlim . rx () ,
363363 format = "0.0[00]" ,
364364 step = 0.1 ,
365365)
366366
367+
368+ def callback_xlim (start , end ):
369+ selector_xlim .param .update (dict (value = (start , end )))
370+
371+
372+ selector_xlim .param .watch_values (fn = callback_xlim , parameter_names = ["start" , "end" ])
373+
367374interactive_states = pn .bind (
368375 states_from_data , interactive_decomposition , interactive_inputs_decomposition
369376)
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ dependencies = [
3737
3838[project .optional-dependencies ]
3939dashboard = [
40- " panel>=1.3.8 " ,
40+ " panel>=1.4.5 " ,
4141 " cryptography" ,
4242]
4343
@@ -56,6 +56,7 @@ doc = [
5656
5757dev = [
5858 " simdec[doc,test,dashboard]" ,
59+ " watchfiles" ,
5960 " pre-commit" ,
6061 " hatch" ,
6162]
You can’t perform that action at this time.
0 commit comments