From 46b051060cab4353373386fc546e0eec31c94e46 Mon Sep 17 00:00:00 2001 From: walkews Date: Tue, 23 May 2017 10:40:01 -0500 Subject: [PATCH] feat(show when ready): Show plots when doccument is ready. --- app/app.py | 2 +- app/templates/bokeh.js | 2 +- app/templates/matplotlib.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/app.py b/app/app.py index b3e2ffb..f98c727 100644 --- a/app/app.py +++ b/app/app.py @@ -131,4 +131,4 @@ def pybokeh(nation): if __name__ == '__main__': port = int(os.environ.get("PORT", 5000)) - app.run(debug=True, host='0.0.0.0', port=port) \ No newline at end of file + app.run(host='0.0.0.0', port=port) \ No newline at end of file diff --git a/app/templates/bokeh.js b/app/templates/bokeh.js index 380c5bb..b5df28c 100644 --- a/app/templates/bokeh.js +++ b/app/templates/bokeh.js @@ -11,9 +11,9 @@ console.log('updated div/scripts') }); - console.log('updated div/scripts') } +$( document ).ready(updateChart) $('#update').on('click', updateChart) $('#nation').on('change', updateChart) \ No newline at end of file diff --git a/app/templates/matplotlib.js b/app/templates/matplotlib.js index 8d1ce03..d4b1370 100644 --- a/app/templates/matplotlib.js +++ b/app/templates/matplotlib.js @@ -7,5 +7,5 @@ function updateChartSrc(){ } - +$( document ).ready(updateChartSrc) $("#nation").on('change', updateChartSrc);