index.htm 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. barBackgroundColor: 'gray',
  28. barBorderRadius: 7,
  29. barBorderWidth: 0,
  30. buttonBackgroundColor: 'gray',
  31. buttonBorderWidth: 0,
  32. buttonBorderRadius: 7,
  33. trackBackgroundColor: 'none',
  34. trackBorderWidth: 1,
  35. trackBorderRadius: 8,
  36. trackBorderColor: '#CCC'
  37. },
  38. series: [{
  39. name: 'AAPL Stock Price',
  40. data: data,
  41. tooltip: {
  42. valueDecimals: 2
  43. }
  44. }]
  45. });
  46. });
  47. </script>
  48. </body>
  49. </html>