JSFiddle - React, Tailwind, and code Playground
by Sunny SM
HTML
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
<button id="button" class="autocompare">Set new data</button>
JavaScript
var chart = Highcharts.chart('container', {
chart: {
type: 'pie'
},
series: [{
data: [29.9, 71.5, 106.4]
}]
});
// the button action
$('#button').click(function() {
chart.series[0].setData([129.2, 144.0, 176.0, 25.5, 122.52, 145.10]);
});