On Apr 10, 2018, at 18:09, Mateusz Paprocki <mpaprocki@anaconda.com> wrote:
Hi,
On Mon, Apr 2, 2018 at 9:17 PM, <gbrunick@gmail.com> wrote:
I was just curious about the "best practices" way to look up a plot from Javascript.
I am currently using bokeh.embed.components to produce Javascript and divs that I include in a static HTML document. In particular, I am not using a server, so I tend to write some Javascript to update ColumnsDataSources and whatnot. I know that it is possible to use CustomJS for this purpose, but I prefer to just write the Javascript directly as I do a lot of non-Bokeh things along with the Bokeh updates. This is all pretty straight forward once I get my hands on the plots in questions, but its not entirely clear to me how I should be doing that.
Currently, I do something along the lines of:
doc = Bokeh.documents[0];
fig = doc.get_model_by_name("my_fig_name");
Is this the right way to go? Is Bokeh.documents an implementation detail, or should I consider that part of the public API? Is there some other function that I should use to get my hands on the Bokeh document object from Javascript?
maybe you could submit a code example of your approach (you can skip all the data and unrelated stuff; I'm just interested in the embedding code)? We have some work going on improving bokeh's templating capabilities, so this may be useful to cover more cases with this work.
Mateusz
Thanks,
Gerard
--
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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/92e15c71-273d-4644-9624-a9098b59fb1b%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
--
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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CANFzp8hAwVKrvwNBreHo4bSS43zMNuvFzmEz_V_Oizihrqpe2Q%40mail.gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.