index.htm 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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; min-width: 310px"></div>
  16. <script type="text/javascript">
  17. Highcharts.getJSON('https://www.highcharts.com/samples/data/aapl-c.json', function (data) {
  18. // Create the chart
  19. Highcharts.stockChart('container', {
  20. rangeSelector: {
  21. selected: 1
  22. },
  23. title: {
  24. text: 'AAPL Stock Price'
  25. },
  26. scrollbar: {
  27. enabled: false
  28. },
  29. series: [{
  30. name: 'AAPL Stock Price',
  31. data: data,
  32. tooltip: {
  33. valueDecimals: 2
  34. }
  35. }]
  36. });
  37. });
  38. </script>
  39. </body>
  40. </html>