title: Angular directive calling ASP.NET controller that creates a chart image fails to render occasionally
body: <p>I have a page with two chart images, one or both of which often fail to load and remain blank. This happens roughly 40% of the time when the page is loaded.</p>
  
  <p>I have:</p>
  
  <ul>
  <li><p>an Angular directive</p></li>
  <li><p>that uses .loadImage() to request an image from an ASP.NET controller</p></li>
  <li><p>that creates the chart image using System.Drawing.</p></li>
  </ul>
  
  <p>The directive also has a menu with a selection of 10 charts, one of which is supposed to render in the beginning and it is possible to switch to the other ones via javascript. Even when the chart area is blank, picking one of the other charts in the menu (thus calling selectItem() in JS) returns the site back to normal and all charts work from that point on.</p>
  
  <p>Any idea where I should look first?</p>
  
  <p>Edit: My first guess would be some timing issue in rendering the angular directives that does not let it finish, but I am not sure how to proceed in determining the cause in these waters.</p>