Hi Jim,
Not sure if I’ve missed an email, but just to let you know that I’m not
aware of any movement in the DataTable widget.
However, the User Defined Models framework is now pretty robust and I’m
wondering whether you can use that to do the integration of whatever JS
Data Table plus Bokeh. If you’re in the notebook, I hear good things
about qgrid (although I’ve never used it myself).
Sincerely,
Sarah Bird
On 1/26/16 7:02 AM, Jim Sharpe wrote:
Hi Byran,
After seeing such rapid progress on other issues such as the
push_notebook/comms fix in the latest dev build I’m hopeful that there
might have been some movement on this table/sort/selection mapping
problem. It’s the last outstanding issue we have before an important
client demo. Do you have any further thoughts on what we might be able
to do to work around it?
On Wednesday, January 6, 2016 at 9:49:35 PM UTC-7, Jim Sharpe wrote:
I've opened issue #3564
<[https://github.com/bokeh/bokeh/issues/3564](https://github.com/bokeh/bokeh/issues/3564)> and am inclined to
agree that actually modifying the order of the source might not be a
great idea (who knows what external code might not be expecting that
to happen). However it would be great to have some kind of mapping
capability so we could somehow get at the values in the selected rows.
On Wednesday, January 6, 2016 at 8:48:35 PM UTC-7, Bryan Van de ven
wrote:
I think this may not be possible at the moment, can you open an
issue on GitHub? I can think of a few possible approaches
offhand, but it will require a little investigation.
Looking at the current code:
[https://github.com/bokeh/bokeh/blob/master/bokehjs/src/coffee/widget/data_table.coffee#L52-L86](https://github.com/bokeh/bokeh/blob/master/bokehjs/src/coffee/widget/data_table.coffee#L52-L86)
<[https://github.com/bokeh/bokeh/blob/master/bokehjs/src/coffee/widget/data_table.coffee#L52-L86](https://github.com/bokeh/bokeh/blob/master/bokehjs/src/coffee/widget/data_table.coffee#L52-L86)>
It *looks* like it actually is trying to update the data source
order. I'm not sure how I feel about that. I think maybe I hope
that doesn't work, I think a better approach would be to
maintain an explicit sorter to use to map to the original data.
Bryan
After a bit more testing with v11 RC2 it appears that if the source
is indeed getting reordered that the modified version is not getting
exposed to with the javascript callback or python code running in a
jupyter notebook as the order of the data sources in both those
places remains unchanged. (WHich unfortunately means the indexes
reported for the selected rows don't align with the correct data.
> On Jan 6, 2016, at 9:37 PM, Jim Sharpe <[email protected]> wrote:
>
> After looking through all the Bokeh references I can find I
haven't found an answer to this so I thought I'd post here.
>
> I'm trying to find a way to query the values on selected rows
of a DataTable after it has been sorted by clicking on one of
the column headers.
>
> Before the table row order gets modified by the sort operation
I could use the selected indexes available in a CustomJS
callback to get the values contained in the selected rows from
the ColumnDataSource used as input to the table. However, when
the table rows are reordered with a sort those selection indexes
relate to the new order of the rows that are displayed. (i.e.
the order oder of the source stays the same but the display
order is different.) The reported selection indexes correctly
match the display order (e.g. if the third row is selected a
selection index of 2 will be reported). However, I can't figure
out how to get the values that are displayed on that row since
it now isn't the third row of the input data source.
>
> I'm sure this must be more simple than I'm trying to make it,
any suggestions would be greatly appreciated.
>
> --
> 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/c649e2f3-8c4c-4b24-bcb4-2efefe4d44c7%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/c649e2f3-8c4c-4b24-bcb4-2efefe4d44c7%40continuum.io)
<[https://groups.google.com/a/continuum.io/d/msgid/bokeh/c649e2f3-8c4c-4b24-bcb4-2efefe4d44c7%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/c649e2f3-8c4c-4b24-bcb4-2efefe4d44c7%40continuum.io)>.
> For more options, visit
[https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout)
<[https://groups.google.com/a/continuum.io/d/optout](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]
mailto:[email protected].
To post to this group, send email to [email protected]
mailto:[email protected].
To view this discussion on the web visit
https://groups.google.com/a/continuum.io/d/msgid/bokeh/a225d561-9f70-4c88-a776-4178adb510cf%40continuum.io
<https://groups.google.com/a/continuum.io/d/msgid/bokeh/a225d561-9f70-4c88-a776-4178adb510cf%40continuum.io?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
–
You received this message because you are subscribed to a topic in the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/5HQ8gPssZB4/unsubscribe.
To unsubscribe from this group and all its topics, 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/56AAA838.502%40gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.