[Chartjs]-UnCaught IndexSizeError: ChartJS

0👍

Not sure if this is exactly the same issue but it sounds similar to what I was experiencing here

angular-chart zero dimensions inside angular-strap panel

0👍

The problem is that when you load the page in some cases the chart doesn’t receive the dimensions of the page (the width and height) therefore can not create the chart again. That happened to me when my app was showing a modal with AngularJS. So I did this:

In my index.html

<canvas chart-options="viewCountOptions" id="doughnut" class="chart chart-doughnut" chart-data="data" chart-labels="labels" chart-colours="colours" chart-legend="legend">

In my controllers.js

$scope.viewCountOptions = {
     responsive: false
  };

Leave a comment