<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>GeeksforGeeks Polar Area Chart</title>
<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js">
</script>
<script src=
"https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.umd.min.js">
</script>
</head>
<body>
<div>
<h1 style="color:green;">
GeeksforGeeks
</h1>
<h3>
Chart JS Polar Area Chart Example 2
</h3>
<div><canvas id="geeksChart"
width="400" height="400">
</canvas></div>
</div>
<script>
const data = {
labels: ["Programming", "Articles",
"Courses", "Visitors"],
datasets: [{
data: [30, 40, 20, 10],
backgroundColor: ["#FF6384", "#36A2EB",
"#FFCE56", "#4CAF50"],
hoverBackgroundColor: ["#FF6384", "#36A2EB",
"#FFCE56", "#4CAF50"],
hoverBorderColor: "#fff",
hoverBorderWidth: 2,
circular: false,
}]
};
const config = {
type: 'polarArea',
data: data,
options: {
responsive: true,
maintainAspectRatio: false,
title: {
display: true,
text: 'GeeksforGeeks Polar Area Chart'
},
animation: {
animateRotate: true,
animateScale: true
}
}
};
new Chart($("#geeksChart"), config);
</script>
</body>
</html>