JSFiddle - React, Tailwind, and code Playground
by H17737
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: 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
$('#container').highcharts('StockChart', {
chart: {
type: 'line'
},
rangeSelector : {
selected : 1
},
title : {
text : 'USD to EUR exchange rate'
},
yAxis : {
title : {
text : 'Exchange rate'
},
plotLines : [{
value : 0.6738,
color : 'green',
dashStyle : 'LongDashDotDot',
width : 2,
zIndex:10,
label : {
text : 'Last quarter minimum'
}
}, {
value : 0.7419,
color : 'red',
dashStyle : 'shortdash',
zIndex:10,
width : 2,
label : {
text : 'Last quarter maximum'
}
}]
},
series : [{
name : 'USD to EUR',
data : data,
color:'#71AFE2',
tooltip : {
valueDecimals : 4
}
}]
});
});
});