but now I don’t see the graph, the snippet embedded into the html (using Jinja2 {{ snippet | safe}}) doesn’t seem to be a valid javascript, not at least the way the object is being returned by my Bokeh plotting procedure.
I looked at the documentation but there’s not much there that can help me.
but now I don’t see the graph, the snippet embedded into the html (using Jinja2 {{ snippet | safe}}) doesn’t seem to be a valid javascript, not at least the way the object is being returned by my Bokeh plotting procedure.
I looked at the documentation but there’s not much there that can help me.
Thanks in advance
Paulo
–
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].
autoload_static returns a tuple with two items, only one of which you need to template into your document. Here is the reference page for autoload_static:
But to elaborate further, it returns a two things tuple (code, tag) The "code" portion is all the js code that describes your plot. You need to save this code in a .js file accessible at the path you pass in to autoload_static. For example:
*This* is what you need to template into your Jinja template. Wherever you put this script, it will be replaced by the plot. Notice the "src" attribute of the <script> tag is exactly the path passed in to autoload_static above. You need to save the value of "code" (which is too long to include here) to a file at "static/js/myplot.js" (you need to give the *full* path to a .js file to autoload_static)
but now I don't see the graph, the snippet embedded into the html (using Jinja2 {{ snippet | safe}}) doesn't seem to be a valid javascript, not at least the way the object is being returned by my Bokeh plotting procedure.
I looked at the documentation but there's not much there that can help me.