summaryrefslogtreecommitdiff
path: root/app/static/js/chart.js
blob: d72d415847e128da0602bc658a80014c92671d8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
				}
			}
		}
	});
}