Dynamically adjust plot size to window

I’d like to resize a Plot object as the window gets resized

Once I have grabbed myplot amid the Bokeh objects, which method can I call to set its width? Thanks

$(window).resize(function(){

var windowWidth = window.innerWidth

var myplot = getBokehObjectByName(‘myplot’) //custom function, grabs Bokeh objects

// set the width of myplot to windowWidth

});

Hi,

···

On Thu, Sep 10, 2015 at 8:40 PM, Pythonic [email protected] wrote:

I’d like to resize a Plot object as the window gets resized

Once I have grabbed myplot amid the Bokeh objects, which method can I call to set its width? Thanks

$(window).resize(function(){

var windowWidth = window.innerWidth

var myplot = getBokehObjectByName(‘myplot’) //custom function, grabs Bokeh objects

// set the width of myplot to windowWidth

});

This feature is currently under implementation, see [1], and may be available as soon as next release (0.10). For now, the following [2] should be helpful.

[1] https://github.com/bokeh/bokeh/issues/2678
[2] https://github.com/birdsarah/gtimelog-viz/blob/master/app/templates/js/resize_plots.js

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/259372b4-783b-44ce-9d65-ca626f5014a4%40continuum.io.

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

Thanks! Very helpful, [2] will def do while the flag mechanism gets implemented

···

On Thursday, 10 September 2015 20:13:08 UTC+1, mateusz.paprocki wrote:

Hi,

On Thu, Sep 10, 2015 at 8:40 PM, Pythonic [email protected] wrote:

I’d like to resize a Plot object as the window gets resized

Once I have grabbed myplot amid the Bokeh objects, which method can I call to set its width? Thanks

$(window).resize(function(){

var windowWidth = window.innerWidth

var myplot = getBokehObjectByName(‘myplot’) //custom function, grabs Bokeh objects

// set the width of myplot to windowWidth

});

This feature is currently under implementation, see [1], and may be available as soon as next release (0.10). For now, the following [2] should be helpful.

[1] https://github.com/bokeh/bokeh/issues/2678
[2] https://github.com/birdsarah/gtimelog-viz/blob/master/app/templates/js/resize_plots.js

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 bo.[email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/259372b4-783b-44ce-9d65-ca626f5014a4%40continuum.io.

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

Yes, am hoping to have a PR in this week.

···

On Thu, Sep 10, 2015 at 1:37 PM, Pythonic [email protected] wrote:

Thanks! Very helpful, [2] will def do while the flag mechanism gets implemented

On Thursday, 10 September 2015 20:13:08 UTC+1, mateusz.paprocki wrote:

Hi,

On Thu, Sep 10, 2015 at 8:40 PM, Pythonic [email protected] wrote:

I’d like to resize a Plot object as the window gets resized

Once I have grabbed myplot amid the Bokeh objects, which method can I call to set its width? Thanks

$(window).resize(function(){

var windowWidth = window.innerWidth

var myplot = getBokehObjectByName(‘myplot’) //custom function, grabs Bokeh objects

// set the width of myplot to windowWidth

});

This feature is currently under implementation, see [1], and may be available as soon as next release (0.10). For now, the following [2] should be helpful.

[1] https://github.com/bokeh/bokeh/issues/2678
[2] https://github.com/birdsarah/gtimelog-viz/blob/master/app/templates/js/resize_plots.js

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/259372b4-783b-44ce-9d65-ca626f5014a4%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/93163d33-a163-4604-9c83-45e80d8a729c%40continuum.io.

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

btw gtimelog-viz is currently a bit broken, but the resize should code should be right.

···

On Thu, Sep 10, 2015 at 2:45 PM, Sarah Bird [email protected] wrote:

Yes, am hoping to have a PR in this week.

On Thu, Sep 10, 2015 at 1:37 PM, Pythonic [email protected] wrote:

Thanks! Very helpful, [2] will def do while the flag mechanism gets implemented

On Thursday, 10 September 2015 20:13:08 UTC+1, mateusz.paprocki wrote:

Hi,

On Thu, Sep 10, 2015 at 8:40 PM, Pythonic [email protected] wrote:

I’d like to resize a Plot object as the window gets resized

Once I have grabbed myplot amid the Bokeh objects, which method can I call to set its width? Thanks

$(window).resize(function(){

var windowWidth = window.innerWidth

var myplot = getBokehObjectByName(‘myplot’) //custom function, grabs Bokeh objects

// set the width of myplot to windowWidth

});

This feature is currently under implementation, see [1], and may be available as soon as next release (0.10). For now, the following [2] should be helpful.

[1] https://github.com/bokeh/bokeh/issues/2678
[2] https://github.com/birdsarah/gtimelog-viz/blob/master/app/templates/js/resize_plots.js

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/259372b4-783b-44ce-9d65-ca626f5014a4%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/93163d33-a163-4604-9c83-45e80d8a729c%40continuum.io.

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