diff --git a/db.py b/db.py index 8f096bf..ec229f0 100644 --- a/db.py +++ b/db.py @@ -547,6 +547,8 @@ class DataBase(): 'points': list(weight_points) } + plot_labels = zip(relative_positions, messages) + # Return exercise data with SVG dimensions and data points return { 'exercise_name': topsets[0]['exercise_name'], @@ -554,4 +556,5 @@ class DataBase(): 'vb_height': vb_height, 'plots': [estimated_1rm, repetitions, weight], 'best_fit_points': list(best_fit_points), + 'plot_labels': plot_labels } \ No newline at end of file diff --git a/templates/partials/sparkline.html b/templates/partials/sparkline.html index bd2e8c2..c9039cf 100644 --- a/templates/partials/sparkline.html +++ b/templates/partials/sparkline.html @@ -23,7 +23,6 @@ {% set x = (position * vb_width)+margin %} {% set y = (vb_height - value)+margin %} - {% endfor %} {% endmacro %} @@ -56,6 +55,20 @@ {{ plot_line(plot.points, plot.color) }} {% endfor %} + + {% for pos, message in plot_labels %} + + {% endfor %} + + {% for pos in relative_positions %} + {% endfor %}
{% for plot in plots %}