Skip to content

Commit 064d54e

Browse files
committed
fix issue with not showing changes to chart.html in latest post
1 parent d7af1b0 commit 064d54e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

content/posts/170526-bar-charts-bokeh.markdown

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,29 @@ and added labels to both axes. I recommend keeping the
320320
documentation open to know what your options are for customizing your
321321
visualizations.
322322

323+
We just need a few updates to our `templates/chart.html` file to display
324+
the visualization. Open the file and add the folloiwng 6 lines to the file.
325+
Two of these lines are for the required CSS, two are JavaScript Bokeh
326+
files and the remaining two are the generated chart.
327+
328+
```jinja2
329+
<!DOCTYPE html>
330+
<html>
331+
<head>
332+
<title>Bar charts with Bokeh!</title>
333+
<link href="http://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.css" rel="stylesheet">
334+
<link href="http://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.0.min.css" rel="stylesheet">
335+
</head>
336+
<body>
337+
<h1>Bugs found over the past {{ bars_count }} days</h1>
338+
{{ the_div|safe }}
339+
<script src="http://cdn.pydata.org/bokeh/release/bokeh-0.12.5.min.js"></script>
340+
<script src="http://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.5.min.js"></script>
341+
{{ the_script|safe }}
342+
</body>
343+
</html>
344+
```
345+
323346
Alright, let's give our app a try with a simple chart of 4 bars. The
324347
Flask app should automatically reload when you save `app.py` with the new
325348
code but if you shut down the development server fire it back up with the

0 commit comments

Comments
 (0)