JSFiddle - React, Tailwind, and code Playground
by leonsaysHi
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"></div>
JavaScript
$(function () {
var data = [
/* Jul 2015 */
[1437696000000,42162332,44455540,76756427],
[1438041600000,33618097,37011653,115450607],
[1438214400000,33628268,42884953,50999452],
/* Aug 2015 */
[1438560000000,69975968, 33618097, 33628268],
[1438646400000,124138623, 42884953, 33628268]
];
// create the chart
$('#container').highcharts('StockChart', {
chart: {
alignTicks: false
},
rangeSelector: {
selected: 1
},
title: {
text: 'AAPL Stock Volume'
},
series: [{
type: 'column',
name: 'AAPL Stock Volume 1',
data: data,
dataGrouping: {
units: [[
'week', // unit name
[1] // allowed multiples
], [
'month',
[1, 2, 3, 4, 6]
]]
}
},
{
type: 'column',
name: 'AAPL Stock Volume 2',
data: data,
dataGrouping: {
units: [[
'week', // unit name
[1] // allowed multiples
], [
'month',
[1, 2, 3, 4, 6]
]]
}
}]
});
});