From 5c96b1e8f5dd8257e5c9c09559ce1d82282d14c5 Mon Sep 17 00:00:00 2001 From: Henry Doupe Date: Wed, 8 Jan 2020 14:34:39 -0500 Subject: [PATCH] Update Tax-Brain to use JSON format from bokeh --- cs-config/cs_config/outputs.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cs-config/cs_config/outputs.py b/cs-config/cs_config/outputs.py index d7bada7..4fb449e 100644 --- a/cs-config/cs_config/outputs.py +++ b/cs-config/cs_config/outputs.py @@ -4,7 +4,7 @@ from bokeh.models import (ColumnDataSource, Toggle, CustomJS, NumeralTickFormatter, HoverTool) from bokeh.models.widgets import Tabs, Panel, Div -from bokeh.embed import components +from bokeh.embed import json_item from bokeh.layouts import layout from bokeh.plotting import figure @@ -98,14 +98,11 @@ def aggregate_plot(tb): fig_layout = layout([fig], [base_toggle, reform_toggle]) # Components needed to embed the figure - js, div = components(fig_layout) + data = json_item(fig_layout) outputs = { "media_type": "bokeh", "title": "", - "data": { - "javascript": js, - "html": div - } + "data": data, } return outputs