From d3d4d39d3044dfa62f034d80f19d256cbcfeb7af Mon Sep 17 00:00:00 2001 From: Peter Stockings Date: Tue, 8 Aug 2023 22:24:00 +1000 Subject: [PATCH] Exercise graphs still dont look good on mobile, legend is too large and plot was in top right hand corner. Attempting to address issues --- templates/person.html | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/templates/person.html b/templates/person.html index 00e8007..98ba8e1 100644 --- a/templates/person.html +++ b/templates/person.html @@ -228,7 +228,12 @@ {% endif %} ], { - margin: { t: 0, l: 20, r: 20 }, + margin: { + t: 20, // Increase top margin to move the graph downwards + l: 50, // Increase left margin if the graph is too far to the right + r: 50, // Increase right margin for the same reason + b: 40 // Bottom margin for better layout + }, xaxis: { type: 'date', showgrid: false }, yaxis: { title: 'Reps', showgrid: false }, yaxis2: { @@ -236,7 +241,7 @@ overlaying: 'y', side: 'right', showgrid: false, - position: 0.96 + position: 0.94 }, yaxis3: { title: 'Estimated 1RM', @@ -244,6 +249,15 @@ side: 'right', showgrid: false, position: 1.00 + }, + legend: { + x: 1, + xanchor: 'right', + y: 1, + yanchor: 'top', + font: { + size: 10 // Adjust the font size of the legend to make it smaller + } } }, { responsive: true,