File size: 538 Bytes
50e8e86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
new Chart(document.getElementById('PieChart'), {
  type: 'pie',
  data: {
    labels: ['1', '2', '3'],
    datasets: [
      {
        label: 'Dataset 1',
        data: [50, 15, 35],
        backgroundColor: ['#64bbf3', '#ee6c71', '#fecc4e'],
      },
    ],
  },
  options: {
    responsive: true,
    plugins: {
      legend: {
        position: 'top',
        labels: {
          boxWidth: 15,
          padding: 15,
        },
      },
      title: {
        display: true,
        text: 'Chart.js Pie Chart',
      },
    },
  },
})