Home Forums Chart Support Using CanvasJS with bootstrap 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?