Skip to content

Commit

Permalink
Merge pull request #111 from hdoupe/cs-bokeh-update
Browse files Browse the repository at this point in the history
Update Tax-Brain to use JSON format from bokeh
  • Loading branch information
andersonfrailey authored Jan 9, 2020
2 parents af7cba0 + 5c96b1e commit a75f735
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cs-config/cs_config/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a75f735

Please sign in to comment.