JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://code.highcharts.com/stock/highstock.js"></script>
<script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
<div id="container" style="height: 400px; min-width: 310px"></div>
JavaScript
$(function () {
$.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=usdeur.json&callback=?', function (data) {
var year = new Date(data[data.length - 1][0]).getFullYear(); // Get year of last data point
// Create the chart
$('#container').highcharts('StockChart', {
title: {
text: 'USD to EUR exchange rate'
},
yAxis: {
title: {
text: 'Exchange rate'
}
},
series: [{
type: 'flags',
name: 'Flags on axis',
data: [{
x: Date.UTC(year, 2, 1),
title: 'On axis'
}, {
x: Date.UTC(year, 3, 1),
title: 'On axis'
}],
shape: 'squarepin',
zIndex: 100
},{
name: 'USD to EUR',
data: data,
type: 'areaspline',
id: 'dataseries',
tooltip: {
valueDecimals: 4
}
}]
});
});
});