index.htm 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Highstock Example</title>
  7. <style type="text/css">
  8. </style>
  9. </head>
  10. <body>
  11. <script src="../../code/highstock.js"></script>
  12. <script src="../../code/modules/data.js"></script>
  13. <script src="../../code/modules/exporting.js"></script>
  14. <script src="../../code/modules/export-data.js"></script>
  15. <div id="container" style="height: 400px"></div>
  16. <script type="text/javascript">
  17. Highcharts.getJSON('https://www.highcharts.com/samples/data/aapl-v.json', function (data) {
  18. // create the chart
  19. Highcharts.stockChart('container', {
  20. chart: {
  21. alignTicks: false
  22. },
  23. rangeSelector: {
  24. selected: 1
  25. },
  26. title: {
  27. text: 'AAPL Stock Volume'
  28. },
  29. series: [{
  30. type: 'column',
  31. name: 'AAPL Stock Volume',
  32. data: data,
  33. dataGrouping: {
  34. units: [[
  35. 'week', // unit name
  36. [1] // allowed multiples
  37. ], [
  38. 'month',
  39. [1, 2, 3, 4, 6]
  40. ]]
  41. }
  42. }]
  43. });
  44. });
  45. </script>
  46. </body>
  47. </html>