summaryrefslogtreecommitdiff
path: root/app/templates/home.html
diff options
context:
space:
mode:
authorstilbruch <stilbruch@protonail.com>2022-04-06 18:07:35 -0500
committerstilbruch <stilbruch@protonail.com>2022-04-06 18:07:35 -0500
commit0ff4b0d4fdbadef3d1dcc5320e28d2026fd68a65 (patch)
treedcf0244662de297da1b3d0f139e92c9c99cbc684 /app/templates/home.html
parent4d7c4bb40e08c80e336f766375735dbae3c2a20b (diff)
downloadStrengthy-0ff4b0d4fdbadef3d1dcc5320e28d2026fd68a65.tar.xz
Strengthy-0ff4b0d4fdbadef3d1dcc5320e28d2026fd68a65.zip
Add graph template
Diffstat (limited to 'app/templates/home.html')
-rw-r--r--app/templates/home.html34
1 files changed, 28 insertions, 6 deletions
diff --git a/app/templates/home.html b/app/templates/home.html
index afbed29..d90ef6a 100644
--- a/app/templates/home.html
+++ b/app/templates/home.html
@@ -148,12 +148,7 @@
<div class="columns">
<div class="column is-4">
<div class="card">
- <div class="card-content">
- <p class="title">
- FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER
- FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER FILLER
- </p>
- </div>
+ <canvas id="chart-1"></canvas>
<footer class="card-footer">
<p class="card-footer-item">
<span>
@@ -199,5 +194,32 @@
</div>
</div>
</div>
+<script>
+
+const ctx = document.getElementById('chart-1');
+const myChart = new Chart(ctx, {
+ type: 'line',
+ data: {
+ labels: ['01/01/22', '01/02/22', '02/01/22', '03/01/22', '04/01/22', '05/01/22', '06/01/22', '07/01/22'],
+ datasets: [{
+ label: 'Bench Press',
+ data: [125, 145, 185, 185, 200, 205, 205],
+ borderWidth: 1,
+ cubicInterpolationMode: 'monotone',
+ tension: 0.4,
+ pointStyle: 'circle',
+ pointRadius: 5,
+ pointHoverRadius: 10
+ }]
+ },
+ options: {
+ scales: {
+ y: {
+ beginAtZero: true
+ }
+ }
+ }
+});
+</script>
{% endblock %}