summaryrefslogtreecommitdiffstats
path: root/admin/survey/script/Chartjs.js
blob: d968d2fc2c8e8a7e7ca1a90a1920a4122b7047bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function diagnosticsChart(place,display) {

	const data = {
		datasets: [{
		  data: display,
		  backgroundColor: [
			'rgb(229,229,229)',
			'rgb(30, 136, 229)',
		  ],
		  borderWidth: 0, //spacing between slices
		}]
	};
	
	  const config = {
		type: 'doughnut',
		data: data,
		options: {
			events: [], //no hover labels,animations,...
			cutout: 30, //slice width
		}
	};

	  const myChart = new Chart(
		document.getElementById(place),
		config
	  );

}