Flaskapp with Bokeh

Hi,

I’m attempting to embed a bokeh document within a flask app. I’m using script, div = components(plot) and then renderTemplate(html,script,div)

The chart makes it into my index html nicely, and the hovertool appears to be working on the localhost, however, the widgets are not active and do not update the graph accordingly. Do I need to rewrite the input widgets to respond as javascript callbacks? I believe this is possible, but I was hoping there was an easier way. Why are the widgets not working?

Full project zip is too large. Here are some snips.

Thanks,

Greg

image.png

image.png

image.png

image.png

Hi,

The components function is only intended and useful for embedding standalone Bokeh content, i.e. not non-Bokeh server content with real python callbacks. For that, Bokeh server apps have to be embedded with one of the functions specifically intended for that:

  Embedding Plots and Apps — Bokeh 1.0.2 documentation

Thanks,

Bryan

···

On Dec 4, 2018, at 11:57, Greg Black <[email protected]> wrote:

Hi,

I'm attempting to embed a bokeh document within a flask app. I'm using script, div = components(plot) and then renderTemplate(html,script,div)
The chart makes it into my index html nicely, and the hovertool appears to be working on the localhost, however, the widgets are not active and do not update the graph accordingly. Do I need to rewrite the input widgets to respond as javascript callbacks? I believe this is possible, but I was hoping there was an easier way. Why are the widgets not working?

Full project zip is too large. Here are some snips.

Thanks,
Greg
<image.png>
<image.png>
<image.png>
<image.png>

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CAORqYh9kPpKrydh-NRO-s7V1TiwX0ick7Qc-LP1PGLPWXBah5Q%40mail.gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.