| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>Highstock Example</title>
- <style type="text/css">
- </style>
- </head>
- <body>
- <script src="../../code/highstock.js"></script>
- <script src="../../code/modules/data.js"></script>
- <script src="../../code/modules/exporting.js"></script>
- <div id="container" style="height: 400px; min-width: 310px"></div>
- <script type="text/javascript">
- Highcharts.getJSON('https://www.highcharts.com/samples/data/aapl-ohlc.json', function (data) {
- // create the chart
- Highcharts.stockChart('container', {
- rangeSelector: {
- selected: 2
- },
- title: {
- text: 'AAPL Stock Price'
- },
- series: [{
- type: 'ohlc',
- name: 'AAPL Stock Price',
- data: data,
- dataGrouping: {
- units: [[
- 'week', // unit name
- [1] // allowed multiples
- ], [
- 'month',
- [1, 2, 3, 4, 6]
- ]]
- }
- }]
- });
- });
- </script>
- </body>
- </html>
|