File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -320,6 +320,29 @@ and added labels to both axes. I recommend keeping the
320320documentation open to know what your options are for customizing your
321321visualizations.
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+
323346Alright, let's give our app a try with a simple chart of 4 bars. The
324347Flask app should automatically reload when you save ` app.py ` with the new
325348code but if you shut down the development server fire it back up with the
You can’t perform that action at this time.
0 commit comments