How can i update Bokeh canvas in front end

item = JSON.parse(item_text);
Bokeh.embed.embed_item(item, "myplot");

Is there an API to update canvas when I dynamically change item in the front end after bokeh generation?

My current solution

document.getElementById("myplot").innerHTML = ''
Bokeh.embed.embed_item(newItem, "myplot");

Is there a better solution?

Hi,

From BokehJS directly, probably not. In Python I'd make a top level layout container, and replace its contents. But that's not going to be so straightforward. Something for this seems like a reasonable ask though, so I'd encourage you to open a GH issue to discuss it.

Thanks,

Bryan

···

On Mar 24, 2019, at 8:03 PM, tony fung <[email protected]> wrote:

item = JSON.parse(item_text);
Bokeh.embed.embed_item(item, "myplot");

Is there an API to update canvas when I dynamically change item in the front end after bokeh generation?

My current solution

document.getElementById("myplot").innerHTML = ''
Bokeh.embed.embed_item(newItem, "myplot");

Is there a better solution?

--
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/a3f72e8a-7c3c-4cde-b34d-8f7941060450%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Hi,

I have proposed this issue on git hub, but there seems to be no solution #8768

在 2019年3月25日星期一 UTC+8下午12:25:25,Bryan Van de ven写道:

···

Hi,

From BokehJS directly, probably not. In Python I’d make a top level layout container, and replace its contents. But that’s not going to be so straightforward. Something for this seems like a reasonable ask though, so I’d encourage you to open a GH issue to discuss it.

Thanks,

Bryan

On Mar 24, 2019, at 8:03 PM, tony fung [email protected] wrote:

item = JSON.parse(item_text);

Bokeh.embed.embed_item(item, “myplot”);

Is there an API to update canvas when I dynamically change item in the front end after bokeh generation?

My current solution

document.getElementById(“myplot”).innerHTML = ‘’

Bokeh.embed.embed_item(newItem, “myplot”);

Is there a better solution?


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/a3f72e8a-7c3c-4cde-b34d-8f7941060450%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi,

The phrasing of that issue made it seem like a support question. I will re-open it.

Thanks,

Bryan

···

On Mar 25, 2019, at 2:06 AM, tony fung <[email protected]> wrote:

Hi,

I have proposed this issue on git hub, but there seems to be no solution #8768

在 2019年3月25日星期一 UTC+8下午12:25:25,Bryan Van de ven写道:
Hi,

From BokehJS directly, probably not. In Python I'd make a top level layout container, and replace its contents. But that's not going to be so straightforward. Something for this seems like a reasonable ask though, so I'd encourage you to open a GH issue to discuss it.

Thanks,

Bryan

> On Mar 24, 2019, at 8:03 PM, tony fung <[email protected]> wrote:
>
> item = JSON.parse(item_text);
> Bokeh.embed.embed_item(item, "myplot");
>
> Is there an API to update canvas when I dynamically change item in the front end after bokeh generation?
>
> My current solution
>
> document.getElementById("myplot").innerHTML = ''
> Bokeh.embed.embed_item(newItem, "myplot");
>
> Is there a better solution?
>
>
> --
> 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+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/a3f72e8a-7c3c-4cde-b34d-8f7941060450%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 [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/fb845cc4-610b-491c-808d-9f3b1a7965ac%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.