JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/javascript" src="http://code.highcharts.com/stock/highstock.src.js" ></script>
<div id="container" style="height: 500px; min-width: 500px"></div>
JavaScript
$(function() {
$.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=usdeur.json&callback=?', function(data) {
// Create the chart
window.chart = new Highcharts.StockChart({
chart: {
renderTo: 'container'
},
rangeSelector: {
selected: 1
},
title: {
text: 'USD to EUR exchange rate'
},
yAxis: {
title: {
text: 'Exchange rate'
}
},
series: [{
name: 'USD to EUR',
data: data,
id: 'dataseries',
}]
}, function(chart){
setTimeout(function(){
chart.addSeries({
type: 'flags',
data: [{
x: Date.UTC(2011, 1, 14),
title: 'On series'
}, {
x: Date.UTC(2011, 3, 28),
title: 'On series'
}],
onSeries: 'dataseries',
shape: 'squarepin'
});
}, 2000);
});
});
});