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.
<script type="text/javascript">
$.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']
});
});
</script>
How would that javascrip funcion look and how do I call it?