title: Dynamically update values of a chartjs chart
body: <p>I created an basic bar chart using chartjs and it works fine. Now I want to update the values on a time based interval. My problem is that after I created the chart, I do not know how to update its values correctly...</p>
  
  <p>My code:</p>
  
  <pre><code>var ctx = $("#myChart").get(0).getContext("2d");
  
  var dts = [
      {
          fillColor: "rgba(220,220,220,0.5)",
          strokeColor: "rgba(220,220,220,1)",
          data: [0, 0, 0, 0, 0]
      }
  ];
  
  var data = {
      labels: ["Core#1", "Core#2", "Core#3", "Core#4", "Total"],
      datasets: dts
  };
  
  var chart = new Chart(ctx);
  chart.Bar(data);
  
  //test code
  setInterval( function () {                        
      data.datasets[0].data = [random(), random(), random(), random(), random()];
      chart.Bar(data);
  
  },2000);
  </code></pre>
  
  <p>in the test code, I am updating the values with <code>datasets[0].data</code>- is this the right way to do it? The problem with this is that everytime I call <code>chart.Bar()</code>, the values are reset to 0 then animated to the random value (like I am recreating the chart). This way, all animations are always from 0 to value which looks strange. I would expect that if I update a value from 50 to 10 the bar would go down to 10 from 50 and not setted to 0 then animated to 10.</p>
  
  <p>I did not found anything in the docs about this... am I doing something wrong or this is impossible with this library?</p>