···
On Thu, Jan 12, 2017 at 4:25 PM, Kiko [email protected] wrote:
are there any errors in JS console? I don’t know if brython works with native DOM elements or not. If it warps then there should be a way to get a handle on the underlying native element, as with e.g. jquery with element[0].
Mateusz
–
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/CAB-sx61YLhGyCWt%3DGde5ead%2ByvyZrDWNHyGwWr6u0RPNiwSTEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
2017-01-12 16:15 GMT+01:00 Mateusz Paprocki [email protected]:
Thanks it works like a charm using the selector:
https://jsfiddle.net/1c0ftk73/
I’ve tried to pass a brython HTML element object but it seems it doesn’t work (this is the expected I suppose…).
On Thu, Jan 12, 2017 at 4:14 PM, Mateusz Paprocki [email protected] wrote:
Hi,
Actually https://github.com/bokeh/bokeh/blob/master/bokehjs/examples/stocks/stocks.ts#L66 shows this.
On Thu, Jan 12, 2017 at 8:32 AM, Kiko correoso garcia [email protected] wrote:
Hi all,
I’m pretty new to bokeh and after reading the documentation and diggend in the coffeescript code and the js console I couldn’t find an answer to my question.
I can see that from python one can get the js code and the html DIV tag where the chart will be rendered using components (e.g., http://bokeh.pydata.org/en/latest/docs/user_guide/embed.html#components).
Yesterday I was playing with bokehJS and Brython (http://brython.info/) and I could manage the creation of a plot but I don’t know how to control where the plot will be placed (e.g., https://jsfiddle.net/230v1zev/ adapted from http://bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html#bokeh-plotting). I’ve tried to use:
Bokeh.embed.add_document_standalone(doc, div);
seen here: [http://bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html#low-level-models](http://bokeh.pydata.org/en/latest/docs/user_guide/bokehjs.html#low-level-models)
But I was getting an error.
So, my question is,
is there something like components but in JS?,
or
is there the possibility to pass an html element id to a Bokeh.Plotting.figure in order to manage where it will be rendered the plot?
there are two options, either you use the lower-level API, so add_document_standalone()
, but then you have to configure a few things on your own, e.g. https://github.com/bokeh/bokeh/blob/master/bokehjs/examples/anscombe/anscombe.ts#L75 or use higher-level API as show in https://github.com/bokeh/bokeh/blob/master/bokehjs/examples/burtin/burtin.ts#L143. It’s not shown in this example (and any other for that matter), but show(plot, target)
accepts an element, selector or jquery object as the second argument, which is then passed to add_document_standalone()
.
Thanks again.
–
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/CANFzp8iUODJ%3Dskd5LHyPofG803-roPjp7CxyUUVJNp8-EjxP4A%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Mateusz
Thanks in advance.
Best.
–
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/fb6968d3-815b-4b6e-9f07-94f1bb7c2573%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.