CustomJSTransform on TableColumn?

Not sure if this is feature request material or I’m missing something. Trying to create a TableColumn that displays the result of a CustomJSTransform.

Something like…

from bokeh.models import TableColumn, DataTable, ColumnDataSource,CustomJSTransform
from bokeh.transform import transform
from bokeh.plotting import show
src = ColumnDataSource(data={'x':[2,3,5]})
tr = CustomJSTransform(v_func=''' return>x*2)''')

c1 = TableColumn(field='x',title='x')
# c2 = TableColumn(field=transform(field_name='x',transform=tr),title='x*2') #NOPE
tbl = DataTable(columns=[c1
                        # ,c2


I have not checked for sure, but I don’t actually think this is supported yet. Currently I think anything that wants to handle transforms will have to do so explicitly. Right now I think only glyphs fall in that bucket, and tat DataTable would need to taught how to understand transforms.

Alternatively, a more thorough approach might be to introduce some notion of a derived column on CDS, and let transforms “live” on the CDS so that user client of the CDS could use the derived column like an normal column.

Either way it would be some new development, so a GH issue is appropriate.

Thanks —> [FEATURE] - CustomJSTransform on DataTable · Issue #13111 · bokeh/bokeh · GitHub

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.