From ac0463db9a00b8d5fcd570d18e86c9ba62851365 Mon Sep 17 00:00:00 2001 From: stilbruch Date: Wed, 4 May 2022 19:09:29 -0500 Subject: Progress on progress api endpoint --- app/static/js/chart.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/static') diff --git a/app/static/js/chart.js b/app/static/js/chart.js index d72d415..06edc4d 100644 --- a/app/static/js/chart.js +++ b/app/static/js/chart.js @@ -1,7 +1,6 @@ - -function fillChart(id) { - const ctx = document.getElementById(id) - new Chart(document.getElementById('exercise_chart'), { +function exercise_chart(elem_id, exercise_id) { + // Create initial chart + let chart = new Chart(document.getElementById(elem_id), { type: 'line', data: { cubicInterpolationMode: 'monotone', @@ -18,4 +17,6 @@ function fillChart(id) { } } }); + + // Load chart data for exercise } -- cgit v1.2.3