<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript" src=
"https://canvasjs.com/assets/script/canvasjs.min.js">
</script>
</head>
<body>
<div style="text-align:center">
<h1 style="color:green">GeeksforGeeks</h1>
<h3>Canvas JS Spline Chart </h3>
</div>
<div id="chartID"
style="height:400px; max-width:950px;
margin:0px auto;">
</div>
<script>
window.onload = function () {
var chart = new CanvasJS.Chart("chartID", {
title:{
text: "Spline chart showing admissions count"
},
axisX:{
title: "Academic Year",
},
axisY:{
title: "Admissions Count",
},
data: [
{
type: "spline",
xValueFormatString: "YYYY",
color:"green",
dataPoints: [
{ x:new Date(2016, 0,01), y:110},
{ x:new Date(2017, 0,01), y:125 },
{ x:new Date(2018, 0,01), y:108},
{ x:new Date(2019, 0,01), y:140},
{ x:new Date(2020, 0,01), y:143},
{ x:new Date(2021, 0,01), y:102 },
{ x:new Date(2022, 0,01), y:122 }
]// end dataPoints
}
]// end data
});
chart.render();
}// window onload
</script>
</body>
</html>