JSFiddle - React, Tailwind, and code Playground
by karin
HTML
<script type="text/javascript" src="http://github.highcharts.com/v3.0Beta/highcharts.js"></script>
<script type="text/javascript" src="http://github.highcharts.com/v3.0Beta/modules/data.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'
},
series: [{
name: 'Tokyo',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5]
}]
},
function (chart) {
$('#btn').click(function () {
chart.series[0].update({
type: "column"
});
});
});
});
});