Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
306 views
in Technique[技术] by (71.8m points)

python 3.x - Updating Bokeh source with CustomJS

I need to figure out a way to have the source data return to its original state before CustomJS applies its logic so that CustomJS doesn't progressively work with a reduced dataset every time the user selects a choice.

# scripts/bokeh_optimal_clusters.py
filter_answered = checkbox_categorical_filter(src_ans)
checkbox_group.js_on_change('active', filter_answered)

# scripts/functions/bokeh_callbacks.py
def checkbox_categorical_filter(src_ans): 
 return CustomJS(...)

Here's the repo.

Thanks!

question from:https://stackoverflow.com/questions/65929053/updating-bokeh-source-with-customjs

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I managed to fix the bug here.

Key is to pass all bokehs source objects to CustomJS, process the data using the original source and pass the filtered one.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...