modifying a plot from javascript

I’m looking for a reference for updating a Bokeh plot in javascript. For now, I just want to be able to dynamically update the width and height.

I have the plot showing on the page and registered at:

Bokeh.index["00aa3cf7a726452ca7475f110c2ed63b”]

But I'm not sure what the right attributes are to modify.

Thanks,

Ryan

Hi Ryan,

I was able to achieve this by using the _set_dims function on the canvas element of the plotview.

Bokeh.index[Model_ID].views[Plot_ID].canvas._set_dims([width, height])

Hope this helps,

Liam

···

On Tuesday, March 31, 2015 at 3:37:55 AM UTC-4, Ryan Hafen wrote:

I’m looking for a reference for updating a Bokeh plot in javascript. For now, I just want to be able to dynamically update the width and height.

I have the plot showing on the page and registered at:

Bokeh.index["00aa3cf7a726452ca7475f110c2ed63b”]

But I’m not sure what the right attributes are to modify.

Thanks,

Ryan

Thanks!

In my case (0.8.1) it was Bokeh.index[Model_ID].canvas._set_dims([width,height]).

I wonder if there is general documentation somewhere on some of the interactions you can have to Bokeh objects on the javascript side?

Ryan

···

On Mar 31, 2015, at 7:46 AM, [email protected] wrote:

Hi Ryan,

I was able to achieve this by using the _set_dims function on the canvas element of the plotview.

Bokeh.index[Model_ID].views[Plot_ID].canvas._set_dims([width, height])

Hope this helps,

Liam

On Tuesday, March 31, 2015 at 3:37:55 AM UTC-4, Ryan Hafen wrote:

I’m looking for a reference for updating a Bokeh plot in javascript. For now, I just want to be able to dynamically update the width and height.

I have the plot showing on the page and registered at:

Bokeh.index["00aa3cf7a726452ca7475f110c2ed63b”]

But I’m not sure what the right attributes are to modify.

Thanks,

Ryan

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/ecdb4d60-f0ee-4a9c-9039-a6ae58949da1%40continuum.io.

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

Ryan, for the most part it is a matter of setting backbone properties that should match fairly 1-1 with what is documented here:

  http://bokeh.pydata.org/en/latest/docs/reference/models.html

There are a few things like changing canvas size that are different, as you have discovered.

Bryan

···

On Mar 31, 2015, at 3:21 PM, Ryan Hafen <[email protected]> wrote:

Thanks!

In my case (0.8.1) it was Bokeh.index[Model_ID].canvas._set_dims([width,height]).

I wonder if there is general documentation somewhere on some of the interactions you can have to Bokeh objects on the javascript side?

Ryan

On Mar 31, 2015, at 7:46 AM, [email protected] wrote:

Hi Ryan,

I was able to achieve this by using the _set_dims function on the canvas element of the plotview.

Bokeh.index[Model_ID].views[Plot_ID].canvas._set_dims([width, height])

Hope this helps,

Liam

On Tuesday, March 31, 2015 at 3:37:55 AM UTC-4, Ryan Hafen wrote:
I’m looking for a reference for updating a Bokeh plot in javascript. For now, I just want to be able to dynamically update the width and height.

I have the plot showing on the page and registered at:

Bokeh.index["00aa3cf7a726452ca7475f110c2ed63b”]

But I'm not sure what the right attributes are to modify.

Thanks,

Ryan

--
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/ecdb4d60-f0ee-4a9c-9039-a6ae58949da1%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/DAA6A894-88DD-4B4D-ACC8-C96C1C22E00A%40gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi,

···

On Tue, Mar 31, 2015 at 10:21 PM, Ryan Hafen [email protected] wrote:

Thanks!

In my case (0.8.1) it was Bokeh.index[Model_ID].canvas._set_dims([width,height]).

btw. You shouldn’t be using this private API any more [1], but obj.set("plot_width", width) (or “plot_height” respectively).

[1] https://github.com/bokeh/bokeh/issues/1723

Mateusz

I wonder if there is general documentation somewhere on some of the interactions you can have to Bokeh objects on the javascript side?

Ryan

On Mar 31, 2015, at 7:46 AM, [email protected] wrote:

Hi Ryan,

I was able to achieve this by using the _set_dims function on the canvas element of the plotview.

Bokeh.index[Model_ID].views[Plot_ID].canvas._set_dims([width, height])

Hope this helps,

Liam

On Tuesday, March 31, 2015 at 3:37:55 AM UTC-4, Ryan Hafen wrote:

I’m looking for a reference for updating a Bokeh plot in javascript. For now, I just want to be able to dynamically update the width and height.

I have the plot showing on the page and registered at:

Bokeh.index["00aa3cf7a726452ca7475f110c2ed63b”]

But I’m not sure what the right attributes are to modify.

Thanks,

Ryan

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/ecdb4d60-f0ee-4a9c-9039-a6ae58949da1%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/DAA6A894-88DD-4B4D-ACC8-C96C1C22E00A%40gmail.com.

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