RangeSlider value_throttled issue

I’m getting an issue w/ trying to use value_throttled in Jupyter. Everything works as expected by abandoning the throttle.
image

But fails silently when attempting to set the value_throttled attribute. Also, will mess up doc rendering if multiple elements are on the worksheet.

Haven’t checked it outside of Jupyter yet. Working w/ Bokeh 2.4.1. Anyone else see this?

#external
from bokeh.models import RangeSlider
from bokeh.io import show, output_notebook
output_notebook()

#define doc
def widget(doc):
  def slide(attr, old, new): print(f'old is {old} | new is {new}')
  
  range_slider = RangeSlider(title='Stuff:',start=0, end=9, value_throttled=(1,2), step=1)
  range_slider.on_change('value_throttled', slide)
    
  doc.add_root(range_slider)

#push doc
target_app = show(widget, notebook_url="http://localhost:8888")

value_throttled cannot be set, it is only for reporting out value changes, just at a lower update rate than value. [1] If you want to set the value, you should only ever assign to the usual value property.


  1. It should really be marked readonly, but I think it might pre-date the addition of readonly properties. ↩︎

OIC now, works as expected. I could’ve swore I tried that combo. Thanks!

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.