Forum Replies Created by unicorn

Viewing 5 posts - 1 through 5 (of 5 total)
  • in reply to: chart not rendering #24455

    Yes!! Thank you

    in reply to: chart not rendering #24448

    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)

    in reply to: chart not rendering #24406
    in reply to: chart not rendering #24380
    <!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?

    in reply to: chart not rendering #24377

    Thank you so much :)

Viewing 5 posts - 1 through 5 (of 5 total)