The source has an attribute column_names which will give you all
the column_names as an array. You could then iterate over that
array to do whatever you need to access the data.
I think that's what you're asking for, sorry if I've
misunderstood.
Bird
···
On 10/8/16 7:03 AM, wrote:
Hy,
I have the following callback:
self.sources[i].callback =CustomJS(args=dict(p=p,source=self.sources[i]),
code=“”"
var inds = cb_obj.get(‘selected’)[‘1d’].indices;
var d1 = cb_obj.get(‘data’);
var text = ‘’;
var datatext = ‘’;
if (inds.length == 1)
{
datatext = ('Point '+inds[0]);
var data = "<p>This is 'myWindow' for Point“+inds[0]+” : “+d1[‘Col X’][inds[0]]+”
";
myWindow = window.open( +encodeURIComponent(data),
"_blank",“width=200,height=100”);
myWindow.focus();
}
“”"
)
``
** Is there a way to access all columns without knowing theircolumn name?**
I can't figure out what data type the cb_obj.get('data')returns. The self.sources[i] is
a ColumnDataSource(data=self.datadict).
I want to open a window for every selected point anddisplay the data of the selected point.
Thanks in advance,
Tom
–
You received this message because you are subscribed to the GoogleGroups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it,send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io. To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/8abe249a-2c85-4350-adab-b8c6fd93c16b%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/8abe249a-2c85-4350-adab-b8c6fd93c16b%40continuum.io?utm_medium=email&utm_source=footer). For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
–
Sarah Bird
Developer, Bokeh
[

](http://continuum.io)
“data:text/html,”
