☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

New selection specification a big change? (plus WIP of slider example)

Community Support
Sarah_Bird1
Sarah_Bird1

Hi all,

I was just working up a demo of the new callbacks. Still very much a WIP, but you can see it here: http://nbviewer.ipython.org/github/birdsarah/bokeh-miscellany/blob/master/notebooks/slider_example/Gapminder%20homage%200_2%20html%20widget.ipynb (it takes a little while to load)

In doing this I discovered that where you used to be able to use:
source.selected = [0]

you now have to use:
source.selected = {
‘0d’: {‘flag’: False, ‘indices’: },
‘1d’: {‘indices’: [0]},
‘2d’: {‘indices’: }
}

This seems like a faily big non-backward compatible change (but the docstring was helpful and got me back on the right path quickly).

Best,

Bird

⌁   Link to post
Fabio_Pliger
Fabio_Pliger

Hi Sarah,

···

On Fri, May 15, 2015 at 7:30 AM, Sarah Bird sarah.birdman@gmail.com wrote:

Hi all,

I was just working up a demo of the new callbacks. Still very much a WIP, but you can see it here: http://nbviewer.ipython.org/github/birdsarah/bokeh-miscellany/blob/master/notebooks/slider_example/Gapminder%20homage%200_2%20html%20widget.ipynb (it takes a little while to load)

Awesome!

In doing this I discovered that where you used to be able to use:
source.selected = [0]

you now have to use:
source.selected = {
‘0d’: {‘flag’: False, ‘indices’: },
‘1d’: {‘indices’: [0]},
‘2d’: {‘indices’: }
}

This seems like a faily big non-backward compatible change (but the docstring was helpful and got me back on the right path quickly).

Grrr… you are right. This is indeed a fairly big non-backward compatible change that involves all API levels (specially those that are at a fairly stable status, like glyph and plotting) and highlighted warning about this change on the docs.

Thanks!!

–

Fabio Pliger

⌁   Link to post

End of archived discussion · Replies are disabled