Yes!! Thank you
I’m getting a blank webpage
Uncaught ReferenceError: require is not defined at ipl3.js:1 chart3.html:7 Uncaught TypeError: Cannot read property ‘data’ of undefined at window.onload (chart3.html:7)
Here’s the link – https://drive.google.com/drive/folders/1ZHnJuYvrnz8iX884rqgNFSzUDVqr6NV5?usp=sharing
please check
<!DOCTYPE HTML> <html> <head> <script type="text/javascript"> window.onload = function (){ var dataPoints = []; for(var j = 0; j < probForObj["data"].length; j++){ dataPoints.push({label: probForObj["data"][j], y: Math.round(probForObj["value"][j])}); } var chart = new CanvasJS.Chart("chartContainer", { title:{ text: "Top economical bowlers in 2015" }, axisX: { labelAngle: 0 }, data: [{ type: "column", dataPoints: dataPoints }] }); chart.render(); } </script> <script type="text/javascript" src="https://cdn.canvasjs.com/canvasjs.min.js"></script> <script src="ipl.js" type="text/javascript"></script></head> </head> <body> <div id="chartContainer" style="height: 300px; width: 100%;"> </div> </body> </html>
I’m using Visual Studio code. It’s not working. Can you tell me what’s wrong please?
Thank you so much :)