Rebuild the Bokeh case study with the current API. Input: a CSV Date,Region,Sales.
- Two
ColumnDataSources: all rows, and the rows of the first region (sorted names) that are shown. figure(...)withwidth=700, height=400, datetime x axis, toolspan,box_zoom,reset,save, titleMonthly Sales Trend for <region>; alineand ascatter(size=6)on the shown source; aHoverToolon the line with tooltipsDate @Date{%F}andSales @Sales{0,0}and a datetime formatter.- A
Selectwidget (titleSelect Region:) whosejs_on_change("value", CustomJS(...))callback filters the full source into the shown source and updates the title, so the page works as a standalone HTML file.
Print: glyphs: Line, Scatter, tools: PanTool, BoxZoomTool, ResetTool, SaveTool, HoverTool, select: options [...], value East, size: 700x400, title: Monthly Sales Trend for East, source columns: Date, Region, Sales (without index), rows shown initially: 3, callbacks on select: CustomJS.