Specifying selected points in a graph (Bokeh JS)

Hi all,

I am currently displaying a set of bokeh linked plots using bokeh JS (everything is ran under the Django framework). What I want is to have an HTML input text box where the user can enter a Node ID, then I query the back-end database through an AJAX request to display more information about that node and at the same time highlight (select) that node in the frontend visualization.

I am currently able to do all these steps except highlight the specified node in bokeh. How can I modify what are the selected nodes in the bokeh visualization of the graphs?

So far I have a customJS callback that is called whenever a point is selected, this works fine because the user explicitly clicks a point in the graph and the function provides useful information in the console as it should. However in my scenario the user is not directly interacting with the graph and I still want to somehow call a function that will modify the bokeh plot (i.e. change which nodes are selected/highlighted). How can I go about doing that? If that is not possible using Bokeh, is there some workaround? This is an important functionality I would like to have and I don’t want to redo all plots in D3 instead of Bokeh.

I’ve read through this post: Redirecting to Google Groups but it wasn’t particularly helpful since it seems to not have been answered fully.

Any help would be greatly appreciated!