☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

CustomJS to add more circles

Community Support
Jonas_Grave_Kristens
Jonas_Grave_Kristens

@aroberts If you update the CDS the way you show, then you need to apply an .change.emit() to the CDS. However, I believe it is not recommended to update a CDS this way (with change.emit()). Either one updates the whole .data at once or, as in your case, the recommended way of appending data to a CDS is the use of stream.

CustomJS(
    args = {'source': source},
    code = '''
    const data = {
        'x' : [Math.random() * 10],
        'y' : [Math.random() * 10],
    }
    source.stream(data);

    // or - not recommended
    //source.data.x.push(Math.random() * 10);
    //source.data.y.push(Math.random() * 10);
    //source.change.emit();
    '''
    )
⌁   Link to post

End of archived discussion · Replies are disabled