index.htm 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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="../../code/highcharts.js"></script>
  12. <script src="../../code/highcharts-more.js"></script>
  13. <script src="../../code/modules/exporting.js"></script>
  14. <script src="../../code/modules/export-data.js"></script>
  15. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  16. <script type="text/javascript">
  17. Highcharts.chart('container', {
  18. chart: {
  19. type: 'columnrange',
  20. inverted: true
  21. },
  22. title: {
  23. text: 'Temperature variation by month'
  24. },
  25. subtitle: {
  26. text: 'Observed in Vik i Sogn, Norway, 2017'
  27. },
  28. xAxis: {
  29. categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
  30. 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  31. },
  32. yAxis: {
  33. title: {
  34. text: 'Temperature ( °C )'
  35. }
  36. },
  37. tooltip: {
  38. valueSuffix: '°C'
  39. },
  40. plotOptions: {
  41. columnrange: {
  42. dataLabels: {
  43. enabled: true,
  44. format: '{y}°C'
  45. }
  46. }
  47. },
  48. legend: {
  49. enabled: false
  50. },
  51. series: [{
  52. name: 'Temperatures',
  53. data: [
  54. [-9.9, 10.3],
  55. [-8.6, 8.5],
  56. [-10.2, 11.8],
  57. [-1.7, 12.2],
  58. [-0.6, 23.1],
  59. [3.7, 25.4],
  60. [6.0, 26.2],
  61. [6.7, 21.4],
  62. [3.5, 19.5],
  63. [-1.3, 16.0],
  64. [-8.7, 9.4],
  65. [-9.0, 8.6]
  66. ]
  67. }]
  68. });
  69. </script>
  70. </body>
  71. </html>