title: Changing data when click button in chart.js
body: <p>I'm working on some website project, in I have problem with charts.js, I want to change the data inside of the chart, So when i click button the data value is changing, but i'm stuck on it, i don't know how to do it. Here's the example of the code that similar with my project <a href="https://jsfiddle.net/4vdebs6v/" rel="nofollow noreferrer">Chart.js</a>. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var data = {
      labels: ['January', 'February', 'March'],
      
      datasets: [
          {
          fillColor: "rgba(220,220,220,0.2)",
          strokeColor: "rgba(220,220,220,1)",
          pointColor: "rgba(220,220,220,1)",
          pointStrokeColor: "#fff",
          pointHighlightFill: "#fff",
          pointHighlightStroke: "rgba(220,220,220,1)",
          data: [30,120,90]
          },
          {
          fillColor: "rgba(100,220,220,0.7)",
          strokeColor: "rgba(220,220,220,1)",
          pointColor: "rgba(220,220,220,1)",
          pointStrokeColor: "#fff",
          pointHighlightFill: "#fff",
          pointHighlightStroke: "rgba(220,220,220,1)",
          data: [10,70,110]
          }
      ]
      };
  
      var context = document.querySelector('#graph').getContext('2d');
      new Chart(context).Line(data);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js"&gt;&lt;/script&gt;
  &lt;canvas id="graph" width="800px" height="400px"&gt;&lt;/canvas&gt;
  
  &lt;button&gt;
  Option 1
  &lt;/button&gt;
  &lt;button&gt;
  Option 2
  &lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>