<!DOCTYPE>
<
html
>
<
head
>
<
meta
charset
=
"UTF-8"
/>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1"
/>
<
title
>Chart.js</
title
>
<
script
src
=
</
script
>
</
head
>
<
body
>
<
canvas
id
=
"canvasId"
aria-label
=
"chart"
height
=
"350"
width
=
"580"
>
</
canvas
>
<
script
>
let tip =
document.getElementById("canvasId").getContext("2d");
let chartObj = new Chart(tip, {
type: "radar",
data: {
labels: ["HTML", "CSS", "JavaScript",
"Python", "Java", "C++"],
datasets: [{
label: "GeeksforGeeks Subjects",
data: [35, 50, 30, 35, 30, 15],
backgroundColor: ['coral', 'aqua',
'pink', 'lightgreen',
'lightblue', 'crimson'],
borderColor: [
"black",
],
borderWidth: 1,
hoverBackgroundColor: ['tomato', 'cyan',
'lightpink', 'limegreen',
'deepskyblue', 'darkred'],
hoverBorderColor: 'black',
}],
},
options: {
responsive: false,
plugins: {
title: {
display: true,
text: 'GeeksforGeeks Subjects Performance',
},
canvasId: {
enabled: true,
backgroundColor: 'rgba(255, 255, 0, 0.8)',
borderColor: 'black',
borderWidth: 1,
displayColors: false,
callbacks: {
label: function (context) {
return 'Value: ' + context.parsed.y;
},
title: function (context) {
return 'Subject: ' + context[0].label;
},
},
},
},
animations: {
tension: {
duration: 1000,
easing: 'easeOutBounce',
from: 1,
to: 0,
loop: true,
},
y: {
easing: 'easeInOutElastic',
},
},
scales: {
y: {
min: 0,
max: 45,
}
}
}
});
</
script
>
</
body
>
</
html
>