title: Chart.js - IndexSizeError: Index or size is negative or greater than the allowed amount
body: <p>I'm drawing a doughnut chart using Chart.js Arc function.
  It worked fine for sometime. But recently it started throwing the above exception.</p>
  
  <p>The exception is thrown at the following line in Chart.js Arc function : </p>
  
  <pre><code>ctx.arc(this.x, this.y, this.outerRadius, this.startAngle, this.endAngle);
  </code></pre>
  
  <p>Here the values are as follows : </p>
  
  <blockquote>
    <p>x = 0, y = 0, outerRadius = -0.5, startAngle = 4.71XXX, endAngle = 4.71XXX</p>
  </blockquote>
  
  <p>I guess the zero values for x and y or the negative value for outerRadius is causing the problem.</p>
  
  <p>Strange thing is that it is <strong>working perfectly when I clear the browser cache</strong> and try for the same dataset.
  Though the dataset returned by the server is same, the above values are different.</p>
  
  <blockquote>
    <p>x = 50, y = 25, outerRadius = 24.5, startAngle = 4.71XXX, endAngle = 4.71XXX</p>
  </blockquote>
  
  <p>Might be the x and y calculations are done before the <code>canvas</code> is getting rendered in the former case.</p>
  
  <p>Anyone else having similar issues?
  Thanks :-)</p>