Plot every 2nd datapoint in attempt to reduce file size
This commit is contained in:
4
app.py
4
app.py
@@ -70,8 +70,8 @@ def overview():
|
||||
|
||||
graph = pygal.Line(show_y_guides=False,
|
||||
show_legend=False, style=custom_style)
|
||||
graph.x_labels = [c['logged_at'] for c in cadences]
|
||||
graph.add('RPM', [c['rpm'] for c in cadences])
|
||||
graph.x_labels = [c['logged_at'] for c in cadences[::2]]
|
||||
graph.add('RPM', [c['rpm'] for c in cadences[::2]])
|
||||
graph_data = graph.render_data_uri()
|
||||
|
||||
return render_template('overview.html', last_cadence=last_cadence, cadences=cadences[-15:], graph_data=graph_data)
|
||||
|
||||
Reference in New Issue
Block a user