From 960f3fabf56d7d7f11ea6295fd76849d71724f27 Mon Sep 17 00:00:00 2001 From: stilbruch Date: Mon, 2 May 2022 18:55:43 -0500 Subject: More work on progress pages --- app/static/js/chart.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 app/static/js/chart.js (limited to 'app/static') diff --git a/app/static/js/chart.js b/app/static/js/chart.js new file mode 100644 index 0000000..d72d415 --- /dev/null +++ b/app/static/js/chart.js @@ -0,0 +1,21 @@ + +function fillChart(id) { + const ctx = document.getElementById(id) + new Chart(document.getElementById('exercise_chart'), { + type: 'line', + data: { + cubicInterpolationMode: 'monotone', + tension: 0.4, + pointStyle: 'circle', + pointRadius: 5, + pointHoverRadius: 10, + }, + option: { + scales: { + y: { + beginAtZero: true + } + } + } + }); +} -- cgit v1.2.3