39af76039e206d12d2004b8e1a5b6b86e0be973c.svn-base 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  9. <!--框架必需start-->
  10. <script type="text/javascript" src="<%=path%>/libs/js/jquery.js"></script>
  11. <script type="text/javascript" src="<%=path%>/libs/js/language/cn.js"></script>
  12. <script type="text/javascript" src="<%=path%>/libs/js/framework.js"></script>
  13. <link href="<%=path%>/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  14. <link rel="stylesheet" type="text/css" id="skin" prePath="<%=path%>/"/>
  15. <link rel="stylesheet" type="text/css" id="customSkin"/>
  16. <!--框架必需end-->
  17. <script src="<%=path%>/libs/thirdparty/highcharts/js/highcharts.js"></script>
  18. <script>
  19. $(function () {
  20. $('#container').highcharts({
  21. chart: {
  22. type: 'spline'
  23. },
  24. title: {
  25. text: '月平均温度',
  26. x: -20 //center
  27. },
  28. subtitle: {
  29. text: '来源:气象局官方数据',
  30. x: -20
  31. },
  32. xAxis: {
  33. categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
  34. },
  35. yAxis: {
  36. title: {
  37. text: '温度 (°C)'
  38. },
  39. labels: {
  40. formatter: function() {
  41. return this.value +'°'
  42. }
  43. }
  44. },
  45. tooltip: {
  46. crosshairs: true,
  47. shared: true
  48. },
  49. plotOptions: {
  50. spline: {
  51. marker: {
  52. radius: 4,
  53. lineColor: '#666666',
  54. lineWidth: 1
  55. }
  56. }
  57. },
  58. series: [{
  59. name: '北京',
  60. marker: {
  61. symbol: 'square'
  62. },
  63. data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, {
  64. y: 26.5,
  65. marker: {
  66. symbol: 'url(sun.png)'
  67. }
  68. }, 23.3, 18.3, 13.9, 9.6]
  69. }, {
  70. name: '广州',
  71. marker: {
  72. symbol: 'diamond'
  73. },
  74. data: [{
  75. y: 3.9,
  76. marker: {
  77. symbol: 'url(snow.png)'
  78. }
  79. }, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
  80. }]
  81. });
  82. });
  83. </script>
  84. </head>
  85. <body>
  86. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  87. </body>
  88. </html>