Javascript examples for highcharts:Chart Configuration
many panes in chart
<html> <head> <title>Highcharts Demo</title> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <script src="https://code.highcharts.com/stock/highstock.js"></script> <script src="https://code.highcharts.com/stock/modules/drag-panes.js"></script> <script src="https://code.highcharts.com/stock/modules/exporting.js"></script> <div id="container" style="height: 600px; min-width: 310px"></div> <script type="text/javascript"> $.getJSON('https://www.highcharts.com/samples/data/jsonp.php?filename=aapl-ohlcv.json&callback=?', function(data) { var ohlc = [],/*from w ww . ja va2 s. c o m*/ volume = [], dataLength = data.length, groupingUnits = [ [ 'week', // unit name [1] // allowed multiples ], [ 'month', [1, 2, 3, 4, 6] ] ], i = 0; for (i; i < dataLength; i += 1) { ohlc.push([ data[i][0], // the date data[i][1], // open data[i][2], // high data[i][3], // low data[i][4] // close ]); volume.push([ data[i][0], // the date data[i][5] // the volume ]); } // create the chart Highcharts.stockChart('container', { rangeSelector: { selected: 1 }, title: { text: 'AAPL Historical' }, yAxis: [{ labels: { align: 'right', x: -3 }, title: { text: 'OHLC' }, height: '60%', lineWidth: 2, resize: { enabled: true } }, { labels: { align: 'right', x: -3 }, title: { text: 'Volume' }, top: '65%', height: '15%', offset: 0, lineWidth: 2 }, { labels: { align: 'right', x: -3 }, title: { text: 'Volume2' }, top: '80%', height: '15%', offset: 0, lineWidth: 2 }], tooltip: { split: true }, series: [{ type: 'candlestick', name: 'AAPL', data: ohlc, dataGrouping: { units: groupingUnits } }, { type: 'column', name: 'Volume', data: volume, yAxis: 1, dataGrouping: { units: groupingUnits } }, { type: 'column', name: 'Volume1', data: volume, yAxis: 2, dataGrouping: { units: groupingUnits } }] }); }); </script> </body> </html>