summaryrefslogtreecommitdiff
path: root/app/static/js/chart.js
blob: 06edc4d0686c1f1f4d948387d49c379b19ab4d58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function exercise_chart(elem_id, exercise_id) {
	// Create initial chart
	let chart = new Chart(document.getElementById(elem_id), {
		type: 'line',
		data: {
			cubicInterpolationMode: 'monotone',
			tension: 0.4,
			pointStyle: 'circle',
			pointRadius: 5,
			pointHoverRadius: 10,
		},
		option: {
			scales: {
				y: {
					beginAtZero: true
				}
			}
		}
	});

	// Load chart data for exercise
}