title: Sweep animation with highcharts pie
body: <p>I'm trying to animate data updates to a pie chart built using Highcharts.</p>
  
  <p>Here's a demo I've hacked together, showing a very crude version of the animation I'm trying to produce: <a href="http://jsfiddle.net/HsspB/" rel="nofollow">http://jsfiddle.net/HsspB/</a></p>
  
  <p>The hack implements the animation with a setInterval:</p>
  
  <pre><code>    var iTimer = setInterval(step, 25);
      function step() {
          iCurrent = Math.min(iCurrent+3, iFinal);
          tChart.series[0].setData(
              [
                  { 'y': iCurrent, 'color': '#f2b000', 'name': null },
                  { 'y': 100-iCurrent, 'color': '#fae09e', 'name': null }
              ],
              true
          );
          if(iCurrent === iFinal) clearInterval(iTimer);
      }
  </code></pre>
  
  <p>The reason I'm not using that exact code is that it's obviously a hack, and it seems like Highcharts must already make this possible through its API, if only I knew how to articulate it.</p>
  
  <p>The hack is entirely procedural (instead of declarative), meaning that I have to actually work out and mathematically model the steps instead of specifying a duration, transition type, and easing function.</p>
  
  <p>I'd like to know whether this is something Highcharts provides for (presumably via the chart.animation property), and how I might go about implementing it. Failing explicit support, I'd be interested in advice about ways to roll my own approach, including whether there are other relevant parts of the Highcharts API that are better-suited to this kind of work than relying on a full data update (i.e. series.setData()). And hey -- if I can do it via CSS animations, I'm cool with that too.</p>
  
  <p>(When considering fallbacks, I am using jQuery 1.8.3 and core jQueryUI 1.8.6)</p>
  
  <p>Any help is appreciated.</p>