JSFiddle - React, Tailwind, and code Playground

by jeffgw

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
<button id="btn">update</button>

JavaScript

$(function () {
    var chart;
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                type: 'line'
            },
            title: {
                text: 'Monthly Average Temperature',
                x: -20 //center
            },
            series: [{
                name: 'Tokyo',
                data: [7.0, 6.9, 9.5]
            }]
        },function(chart){
        
            $('#btn').click(function(){
                chart.series[0].data[0].update({
                    y:2
                }); 
            });
        
        });
    });
});