I would like from the following code that when the user clicks on a row from the datatable then on the call back event I would like to plot other data about the date.
from datetime import date
from random import randint
from bokeh.models import ColumnDataSource
from bokeh.models.widgets
import DataTable, DateFormatter, TableColumn
from bokeh.io import output_file, show, vform
output_file("data_table.html")
data = dict(
dates=[date(2014, 3, i+1) for i in range(10)],
downloads=[randint(0, 100) for i in range(10)],
)
source = ColumnDataSource(data)
columns = [
TableColumn(field="dates", title="Date", formatter=DateFormatter()),
TableColumn(field="downloads", title="Downloads"),
]
data_table = DataTable(source=source, columns=columns, width=400, height=280)
show(vform(data_table))
Basically, when I click on a row from the data_table, I want to display a plot corresponding to the first column name (in this case date)
I am fairly new to bokeh, so I don't quite understand where the event listener is for the on_click on the datatable.
Any help would be appreciated thanks..