JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://www.highcharts.com/js/highstock.js"></script>
<script type="text/javascript" src="http://www.highcharts.com/js/testing-stock-exporting.js"></script>
<div id="container" style="height: 450px; min-width:450px"></div>
JavaScript
$(function() {
$.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-ohlcv.json&callback=?', function(data) {
var ohlc = [],
volume = [],
dataLength = data.length;
for (i = 0; i < dataLength; i++) {
ohlc.push([
data[i][0],
data[i][1],
data[i][2],
data[i][3],
data[i][4]
]);
volume.push([
data[i][0],
data[i][5]
])
}
var groupingUnits = [[
'week',
[1]
], [
'month',
[1, 2, 3, 4, 6]
]];
chart = new Highcharts.StockChart({
chart: {
renderTo: 'container',
alignTicks: false,
plotBorderWidth:1
},
rangeSelector: {
enabled: false
},
plotOptions:{
series:{
connectNulls:true
},
candlestick: {
color: 'red',
upColor: 'green',//candlestick is including color and upcolor, could you please set the ohlc the same, ohlc have only color
},
ohlc: {
color: 'green'//OHLC have not upcolor likes Candlestick
}
},
xAxis: {
type: 'datetime',
title: {
text: null
},
gridLineWidth :1//how to set gridline for each chart (first, second, third)
},
yAxis: [{
title: {
text: 'First'
},
height: 150,
lineWidth: 2
...