-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdonught.js
40 lines (38 loc) · 992 Bytes
/
donught.js
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
29
30
31
32
33
34
35
36
37
38
39
40
let myChart = document.getElementById('myChart').getContext('2d');
let newChart = new Chart(myChart, {
type:'doughnut',
data: {
labels:['Fat', 'Carbohydrate', 'Protein'],
datasets: [{
label: 'Neutrition Chart',
data: [40, 25, 35],
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(54, 162, 235)',
'rgb(255, 205, 86)'
],
hoverOffset : 4
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'bottom',
labels: {
font: {
size: 25
}
}
},
title: {
display: true,
text: 'Nutrition Chart',
font: {
size: 30
}
}
}
},
});