3

Is it possible to integrate a Holoviews Plot to an existing Bokeh APP and update its data using widgets the same way it is done with ordinary Bokeh Plots?

for example, I would like to do something like this:


    ### Creating a Chord Plot from Holoviews     
    p_holo=hv.Chord(pd.DataFrame(dic_plot))

    ### Rendering to Bokeh Figure
    p=hv.render(p_holo)

    ...

    ### Defining a callback for changing Holoviews Plot data:
    def update_holo_data():
       ...
       p.data=new_data

1 Answer 1

4

No, HoloViews is explicitly not designed around callbacks instead following a reactive pattern. The way to set this up is using a DynamicMap and streams, specifically the Pipe stream:

def callback(data):
    return hv.Chord(pd.DataFrame(data))

stream = hv.streams.Pipe(data=dic_plot)

dmap = hv.DynamicMap(callback, streams=[stream])

p = hv.render(dmap)

stream.send(new_data)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.