I have following code:
TypeError: Object of type ‘function’ is not JSON serializable
source = ColumnDataSource(val_df)
p0 = figure(
x_axis_type="datetime",
x_axis_label="Timestamp",
title="Spans",
)
p0.yaxis.axis_label = 'score'
p0.y_range==Range1d(start=0, end=1)
f = figure(plot_width=1200, plot_height=500,x_axis_type="datetime",x_axis_label="Timestamp")
r1 = f.line(
x='timestamp', #Column timestamp
y=df.columns[5], #Frequency column
source=source,
)
handler = CustomJS(
args=dict(
figure=figure,
),
code = """
var name = cb_obj.value;
"""
select = Select(title="Select tags:", value='1', options=list(df.columns)[1:])
select.js_on_change('value', handler)
show(column(select, p0))
)
I get the error as in the title while running the show command. What is wrong here ?