Display liner formula for E1RM over time, and weekly/monthly progress in weight (this part doesnt work well, will probably remove)

This commit is contained in:
Peter Stockings
2024-03-09 17:15:08 +11:00
parent fd04eb00b1
commit e3de9f886b
3 changed files with 21 additions and 2 deletions

View File

@@ -7,6 +7,8 @@
<title>Workout Tracker</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900&display=swap" rel="stylesheet" />
<link rel="stylesheet" type="text/css"
href="https://cdn.rawgit.com/dreampulse/computer-modern-web-font/master/fonts.css">
<link type="text/css" rel="stylesheet" href="/static/css/tail.select.min.css">
<script src="/static/js/tail.select.min.js"></script>
<script src="/static/js/tailwindcss@3.2.4.js"></script>
@@ -14,7 +16,6 @@
<script src="/static/js/htmx.min.js" defer></script>
<script src="/static/js/hyperscript.min.js" defer></script>
<script src="/static/js/sweetalert2@11.js" defer></script>
</head>
<body>

View File

@@ -46,7 +46,12 @@
<div id="popover-{{ unique_id }}" class="absolute t-0 r-0 hidden bg-white border border-gray-300 p-2 z-10">
<!-- Popover content will be dynamically inserted here -->
</div>
<h4 class="text-l font-semibold text-blue-400 mb-2 text-center">{{ title }}</h4>
<h4 class="text-l font-semibold text-blue-400 text-center">{{ title }}</h4>
<h2 class="text-xs font-semibold text-blue-200 mb-2 text-center" style='font-family: "Computer Modern Sans", sans-serif;'>
{% if best_fit_formula %}
y = {{ best_fit_formula.slope }}x {% if best_fit_formula.intercept != 0 %}+ {{ best_fit_formula.intercept }}{% endif %}, {{ best_fit_formula.kg_per_week }} kg/week, {{ best_fit_formula.kg_per_month }} kg/month
{% endif %}
</h2>
<svg viewBox="0 0 {{ (vb_width + 2*margin) | int }} {{ (vb_height + 2*margin) | int }}" preserveAspectRatio="none">
{% for plot in plots %}
<g class="{{ plot.label }}" style="fill: {{ plot.color }}; stroke: {{ plot.color }};">