1960efc144cd4528656090636771adcba2a9c4d1.svn-base 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. zoomType: 'x'
  23. },
  24. title: {
  25. text: '月平均温度',
  26. },
  27. subtitle: {
  28. text: document.ontouchstart === undefined ?
  29. '框选放大' :
  30. '手势放大'
  31. },
  32. xAxis: {
  33. categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
  34. },
  35. yAxis: {
  36. title: {
  37. text: '温度 (°C)'
  38. },
  39. plotLines: [{
  40. value: 0,
  41. width: 1,
  42. color: '#808080'
  43. }]
  44. },
  45. tooltip: {
  46. valueSuffix: '°C'
  47. },
  48. plotOptions: {
  49. series: {
  50. cursor: 'pointer',
  51. point: {
  52. events: {
  53. click: function() {
  54. alert(this.series.name+","+this.x+","+this.y)
  55. }
  56. }
  57. },
  58. marker: {
  59. lineWidth: 1
  60. }
  61. }
  62. },
  63. series: [{
  64. name: '北京',
  65. 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]
  66. }, {
  67. name: '广州',
  68. data: [-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]
  69. }, {
  70. name: '深圳',
  71. data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]
  72. }]
  73. });
  74. });
  75. </script>
  76. </head>
  77. <body>
  78. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  79. </body>
  80. </html>