Home Forums Chart Support no output visible

no output visible

Viewing 2 posts - 1 through 2 (of 2 total)
  • #22616
    <!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.

    #22621

    @manishajaiswal,

    Changing includeZero: False, to includeZero: false, should work fine as boolean values in JavaScript are case-sensitive.

    __
    Priyanka M S
    Team CanvasJS

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

You must be logged in to reply to this topic.