<!DOCTYPE html>
<
html
>
<
head
>
<
title
>Chart JS Bar Chart </
title
>
<
script
src
=
</
script
>
<
script
src
=
</
script
>
</
head
>
<
body
>
<
div
>
<
h1
style
=
"color:green"
>GeeksforGeeks</
h1
>
<
h3
>Chart JS Bar Chart </
h3
>
<
div
>
<
canvas
id
=
"barChartID"
></
canvas
>
</
div
>
</
div
>
<
script
>
// Bar chart
new Chart($("#barChartID"), {
type: 'bar',
options: {
legend: { display: true },
indexAxis: 'x',
title: {
display: true,
text: 'Bar Chart using ChartJS library'
}
},
data: {
labels: ["C++", "Java", "Blockchain", "PHP", "Python","HTML"],
datasets: [
{
label: "Technology Learned by Students",
backgroundColor: ["#FFC0CB", "#0000FF",
"#00FFFF", "#FFA500", "#FF7F50","#FF0000"],
data: [234, 356, 819, 732, 213, 542]
}
]
}
});
</
script
>
</
body
>
</
html
>