Forum Replies Created by blackjack1234

Viewing 1 post (of 1 total)
  • in reply to: Using CanvasJS with bootstrap #5320

    I’ve tried this in a pretty vanilla bootstrap theme and just can’t get it to work. The container is there at” whatever size I specify but no data.

    The same code works and presents data in a basic HTML5 page but just can’t get it to work in Bootstrap

    <div class=”row”>
    <div class=”span12″>

    <script type=”text/javascript” src=”canvasjs.min.js”></script>
    <script type=”text/javascript”>
    window.onload = function () {
    var chart = new CanvasJS.Chart(“chartContainer”, {
    data: [
    {
    type: “bar”,
    dataPoints: [
    { x: 10, y: 10 },
    { x: 20, y: 15 },
    { x: 30, y: 25 },
    { x: 40, y: 30 },
    { x: 50, y: 28 }
    ]
    }
    ]
    });

    chart.render();
    }
    </script>

    <div class=”span10″ id=”chartContainer” style=”height: 400px;”></div>

    </div>
    </div>

    What else do I need to change?

Viewing 1 post (of 1 total)