diff --git a/app.py b/app.py index e2cc97d..525e91b 100644 --- a/app.py +++ b/app.py @@ -53,7 +53,14 @@ def home(): def overview(): cadences = db.get_all_cadences() last_cadence = cadences[-1]['rpm'] - return render_template('overview.html', last_cadence=last_cadence, cadences=cadences) + + plot = { + "x": [c['logged_at'] for c in cadences], + "y": [c['rpm'] for c in cadences], + "type": 'scatter' + } + + return render_template('overview.html', last_cadence=last_cadence, plot=plot, cadences=cadences) if __name__ == '__main__': diff --git a/templates/overview.html b/templates/overview.html index 1c12236..a0ea743 100644 --- a/templates/overview.html +++ b/templates/overview.html @@ -1,7 +1,18 @@

+ class="mb-4 text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl lg:text-6xl dark:text-white text-center"> {{last_cadence}} rpm

+
+ +