Home forums Using CanvasJS no output visible

This topic contains 1 reply, has 2 voices, and was last updated by  Priyanka M S 1 month, 4 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22616

    <!DOCTYPE HTML>
    <html>
    <head>
    <script type = “text/javascript” src=”https://canvasjs.com/assets/script/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

    Priyanka M S
    Member

    @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.