<!DOCTYPE HTML>
<html>
<head>
<script type = "text/javascript" src="https://cdn.canvasjs.com/canvasjs.min.js">
</script>
<script type= "text/javascript" >
window.onload = function() {
var chart = new CanvasJS.Chart("chartContainer",
{
title: {
text: "testing module"
},
axisY: {
includeZero: False,
interval: 2,
valueFormatString: "#0.## C"
},
axisX: {
interval: 1,
valueFormatString: "DD-MMM"
},
data: [
{
type: "rangeBar",
yValueFormatString: "#0.00 C",
dataPoints: [
{ x: new Date(2018,03,1), y: [17,22] },
{ x: new Date(2018,03,2), y: [18,35] },
{ x: new Date(2018,03,3), y: [18,32] },
{ x: new Date(2018,03,4), y: [18,32] },
{ x: new Date(2018,03,5), y: [20,35] },
{ x: new Date(2018,03,6), y: [20,38] },
{ x: new Date(2018,03,7), y: [21,32] }
]
}
]
});
chart.render();
}
</script>
</head>
<body>
<div id = "chartContainer" style = "height: 370px; width: 50%;"></div>
</body>
</html>
I have written this code but there is no output on the browser and on debugging it shows that CanvasJS is not defined.