JSFiddle - React, Tailwind, and code Playground
by Richard Houltz
HTML
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
<div id="container" style="height: 400px; min-width: 310px"></div>
JavaScript
$(function () {
$.getJSON('https://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json&callback=?', function (data) {
// Create the chart
$('#container').highcharts('StockChart', {
rangeSelector : {
enabled: false
},
navigator: {
enabled: false
},
scrollbar: {
enabled: false
},
credits: {
enabled: false
},
exporting: {
enabled: false
},
plotOptions:
{
series:{
animation: false
}
},
series : [{
name : 'Temperature',
data : values,
type : 'areaspline',
threshold : null,
tooltip : {
valueDecimals : 2
},
fillColor : {
linearGradient : {
x1: 0,
y1: 0,
x2: 0,
y2: 1
},
stops : [
[0, Highcharts.getOptions().colors[0]],
[1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')]
]
}
}]
});
});
});
var values =
[
/* Jun 2009 */
[1244764800000,19.57],
[1245024000000,19.44],
[1245110400000,19.48],
[1245196800000,19.37],
[1245283200000,19.41],
[1245369600000,19.93],
[1245628800000,19.62],
[1245715200000,19.14],
[1245801600000,19.46],
[1245888000000,19.98],
[1245974400000,20.35],
[1246233600000,20.28],
[1246320000000,20.35],
/* Jul 2009...