You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... For example, the ColumnDataSource also supports "patch" and "stream" events, for executing CustomJS callbacks whenever the data source is patched or streamed to.
First of all, it's kinda misleading to use the word "events" when the setup is to actually use js_on_change, NOT js_on_event.
I trawled through a number of issues/discourse posts and have seen the js_on_change('stream',...) several times, not sure if this has changed historically or it's just been overlooked.
Observed behavior
N/A
Example code
N/A
Stack traceback or browser console output
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered:
Sorry this slipped through the cracks for triage. Agree js_on_change is unfortunate, it's historical baggage at this point. Will at least update the docs but will also try to see if any more concrete improvements can be made.
@gmerritt123 I am just going to remove these docs entirely in the 3.3 update for now, and re-purpose this issue for adding a proper solution with bokeh.events events.
bryevdv
changed the title
[DOCS] - Correction required in User Guide --> CustomJS Interaction Section
Use real events for patching and streaming
Oct 8, 2023
@bryevdv thanks for addressing! I imagine this'll be a pretty big "breaking" change from previous version so I'll definitely have to pay attention. My main work stuff is still back in bokeh 3.1 but I think 3.3 migration will definitely happen w all the new great stuff.
Software versions
N/A
Browser name and version
N/A
Jupyter notebook / Jupyter Lab version
No response
Expected behavior
Pretty minor but cost me some time figuring out today. Specifically under https://docs.bokeh.org/en/latest/docs/user_guide/interaction/callbacks.html#customjs-for-model-property-events :
First of all, it's kinda misleading to use the word "events" when the setup is to actually use js_on_change, NOT js_on_event.
Secondly, it's NOT
js_on_change("patch"/"stream", CustomJS(...))
it is actually
js_on_change("streaming"/"patching",CustomJS(...))
I trawled through a number of issues/discourse posts and have seen the
js_on_change('stream',...)
several times, not sure if this has changed historically or it's just been overlooked.Observed behavior
N/A
Example code
Stack traceback or browser console output
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered: