index.htm 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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>Highcharts Example</title>
  7. <style type="text/css">
  8. </style>
  9. </head>
  10. <body>
  11. <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  12. <script src="../../code/highcharts.js"></script>
  13. <script src="../../code/highcharts-more.js"></script>
  14. <script src="../../code/modules/exporting.js"></script>
  15. <script src="../../code/modules/export-data.js"></script>
  16. <div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
  17. <script type="text/javascript">
  18. $.getJSON(
  19. 'https://cdn.rawgit.com/highcharts/highcharts/057b672172ccc6c08fe7dbb27fc17ebca3f5b770/samples/data/range.json',
  20. function (data) {
  21. Highcharts.chart('container', {
  22. chart: {
  23. type: 'arearange',
  24. zoomType: 'x',
  25. scrollablePlotArea: {
  26. minWidth: 600,
  27. scrollPositionX: 1
  28. }
  29. },
  30. title: {
  31. text: 'Temperature variation by day'
  32. },
  33. xAxis: {
  34. type: 'datetime'
  35. },
  36. yAxis: {
  37. title: {
  38. text: null
  39. }
  40. },
  41. tooltip: {
  42. crosshairs: true,
  43. shared: true,
  44. valueSuffix: '°C'
  45. },
  46. legend: {
  47. enabled: false
  48. },
  49. series: [{
  50. name: 'Temperatures',
  51. data: data
  52. }]
  53. });
  54. }
  55. );
  56. </script>
  57. </body>
  58. </html>