title: Refresh morris chart using javascript
body: <p>I have this morris chart that I would like to refresh using a javascript function. So I then can add a href link on the page that contains that javascript that will refresh the morris chart. </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>&lt;script type="text/javascript"&gt;
      $.get('@Url.Action("GetData")', function (result) {
          Morris.Line({
              element: 'samplechart',
              data: result,
              xkey: 'period',
              ykeys: ['a', 'b'],
              labels: ['YES', 'NO'],
              xLabelAngle: 60,
              parseTime: false,
              resize: true,
              lineColors: ['#32c5d2', '#c03e26']
          });
      });
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How would that javascrip funcion look and how do I call it?</p>