市长热线演示版

index.htm 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>Highcharts Example</title>
  6. <script type="text/javascript" src="http://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
  7. <script type="text/javascript">
  8. $(function () {
  9. $('#container').highcharts({
  10. chart: {
  11. zoomType: 'xy'
  12. },
  13. title: {
  14. text: 'Average Monthly Weather Data for Tokyo'
  15. },
  16. subtitle: {
  17. text: 'Source: WorldClimate.com'
  18. },
  19. xAxis: [{
  20. categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
  21. 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
  22. }],
  23. yAxis: [{ // Primary yAxis
  24. labels: {
  25. format: '{value}°C',
  26. style: {
  27. color: Highcharts.getOptions().colors[2]
  28. }
  29. },
  30. title: {
  31. text: 'Temperature',
  32. style: {
  33. color: Highcharts.getOptions().colors[2]
  34. }
  35. },
  36. opposite: true
  37. }, { // Secondary yAxis
  38. gridLineWidth: 0,
  39. title: {
  40. text: 'Rainfall',
  41. style: {
  42. color: Highcharts.getOptions().colors[0]
  43. }
  44. },
  45. labels: {
  46. format: '{value} mm',
  47. style: {
  48. color: Highcharts.getOptions().colors[0]
  49. }
  50. }
  51. }, { // Tertiary yAxis
  52. gridLineWidth: 0,
  53. title: {
  54. text: 'Sea-Level Pressure',
  55. style: {
  56. color: Highcharts.getOptions().colors[1]
  57. }
  58. },
  59. labels: {
  60. format: '{value} mb',
  61. style: {
  62. color: Highcharts.getOptions().colors[1]
  63. }
  64. },
  65. opposite: true
  66. }],
  67. tooltip: {
  68. shared: true
  69. },
  70. legend: {
  71. layout: 'vertical',
  72. align: 'left',
  73. x: 120,
  74. verticalAlign: 'top',
  75. y: 80,
  76. floating: true,
  77. backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
  78. },
  79. series: [{
  80. name: 'Rainfall',
  81. type: 'column',
  82. yAxis: 1,
  83. data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
  84. tooltip: {
  85. valueSuffix: ' mm'
  86. }
  87. }, {
  88. name: 'Sea-Level Pressure',
  89. type: 'spline',
  90. yAxis: 2,
  91. data: [1016, 1016, 1015.9, 1015.5, 1012.3, 1009.5, 1009.6, 1010.2, 1013.1, 1016.9, 1018.2, 1016.7],
  92. marker: {
  93. enabled: false
  94. },
  95. dashStyle: 'shortdot',
  96. tooltip: {
  97. valueSuffix: ' mb'
  98. }
  99. }, {
  100. name: 'Temperature',
  101. type: 'spline',
  102. data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6],
  103. tooltip: {
  104. valueSuffix: ' °C'
  105. }
  106. }]
  107. });
  108. });
  109. </script>
  110. </head>
  111. <body>
  112. <script src="../../js/highcharts.js"></script>
  113. <script src="../../js/modules/exporting.js"></script>
  114. <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
  115. </body>
  116. </html>