Bring back the functionality needed to embed separate Bokeh roots within React
See original GitHub issueBokehJS 0.12.16 has embed/add_model_from_session
function that can be used to embed an arbitrary root anywhere. In particular, I use it to embed separate components of the same document in different parts of a React application.
Commit 3eaa05a6fcef60abc7680d8b4465da0032750a35 removed this function, and I don’t think that right now there’s a way to embed separate roots without embedding the whole document at once.
Note that this comment may also be relevant: https://github.com/bokeh/bokeh/pull/7708#discussion_r235605875
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Proper integration between bokeh and react/create react app
Many apps out there are written in react, and it seems like it would ... Bring back the functionality needed to embed separate...
Read more >Embedding bokeh chart in reactjs frontend - Stack Overflow
In my opinion the easiest way is to use BokehJS on your frontend and Bokeh.embed.json_item on your backend . The typical process would...
Read more >Embedding Bokeh into a ReactJS app using BokehJS
Generate a Bokeh plot in python as you normally would. · Pass the resulting Bokeh plot object to the json_item function call, which...
Read more >Python and Bokeh: Part II. The beginner's guide to creating…
In second part of our tutorial series on Bokeh visualization library we explore Bokeh applications and how to serve them using Bokeh server....
Read more >Integrating Bokeh Visualizations in Django Application
For that, we will be importing components from bokeh.embed which returns the individual components. The function bokeh.embed.components() ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just want to concur that the ability to dynamically embed new roots them at arbitrary locations on the page would be very helpful. It would allow the user to use bit and pieces of Bokeh in a non-bokeh layout. If there is a workaround for this I would love to know!
Ok I think adding a JS API to perform the same function as the template embedding (only explicitly and selectively, instead of automatically) is reasonably actionable. In fact it’s possible that such an API or something close already exists and we simply need to expose or document it better.
This is predicated on caring primarily about being able to control when/where individual roots are injected, but being insensitive to when/how the document is loaded (i.e. it should not be of explicit concern to users to control) Basically, sessions and documents should always be considered together (a session is simply the communication to support ongoing synchronizing an entire document)
This is useful but I am also after a mockup/proposal of what would ideally liked to be had, that could evolve into an integration test
cc @mattpap