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: 600px; min-width: 500px"></div>
JavaScript
$(function() {
$.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-ohlc.json&callback=?', function(data) {
// split the data set into ohlc and volume
var ohlc = [],
volume = [],
dataLength = Math.round(data.length / 10);
for (i = 0; i < dataLength; i++) {
ohlc.push([
data[i][0],
data[i][1],
data[i][2],
data[i][3],
data[i][4]
]);
}
var groupingUnits = [['minute', [1, 10, 30, 60]]];
Highcharts.setOptions({
lang: {
rangeSelectorZoom: ' '
}
});
chart = new Highcharts.StockChart({
chart: {
renderTo: 'container',
alignTicks: false,
zoomType: 'x',
plotBackgroundImage: 'http://www.invox.org/IMG/jpg/fond_1.jpg'
},
/* rangeSelector: {
buttons: [],
inputEnabled: true
}, */
yAxis: [{
title: {
text: 'Grafik'
},
height: 300,
lineWidth: 2
}],
series: [{
type: 'candlestick',
name: 'AAPL',
data: ohlc,
dataGrouping: {
units: groupingUnits
}
}]
});
});
});