<!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
=
</
script
>
<
script
src
=
</
script
>
</
head
>
<
body
>
<
div
>
<
h1
style
=
"color:green;"
>GeeksforGeeks</
h1
>
<
h3
>Chart.js General Colors - Example 2</
h3
>
<
div
>
<
canvas
id
=
"polarAreaChart"
width
=
"400"
height
=
"400"
>
</
canvas
>
</
div
>
</
div
>
<
script
>
const ctx =
document.getElementById('polarAreaChart').getContext('2d');
const dataForPolarAreaChart = {
labels: ['Coding', 'Problem Solving',
'Algorithms', 'Data Structures',
'Debugging'],
datasets: [{
data: [90, 80, 85, 75, 85],
backgroundColor: [
'rgba(255, 99, 132, 0.7)',
'rgba(75, 192, 192, 0.7)',
'rgba(255, 205, 86, 0.7)',
'rgba(54, 162, 235, 0.7)',
'rgba(153, 102, 255, 0.7)',
],
borderColor: [
'rgba(255, 0, 0, 1)',
'rgba(0, 128, 0, 1)',
'rgba(255, 165, 0, 1)',
'rgba(0, 0, 255, 1)',
'rgba(128, 0, 128, 1)',
],
borderWidth: 2,
}],
};
const optionsForPolarAreaChart = {
maintainAspectRatio: false,
scale: {
ticks: {
suggestedMin: 0,
suggestedMax: 100,
},
},
};
new Chart(ctx, {
type: 'polarArea',
data: dataForPolarAreaChart,
options: optionsForPolarAreaChart,
});
</
script
>
</
body
>
</
html
>