3d59041cbeeede07215c41cf467fa19878727075.svn-base 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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: 'line'
  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. },
  40. tooltip: {
  41. enabled: false,
  42. formatter: function() {
  43. return '<b>'+ this.series.name +'</b><br/>'+
  44. this.x +': '+ this.y +'°C';
  45. }
  46. },
  47. plotOptions: {
  48. line: {
  49. dataLabels: {
  50. enabled: true
  51. },
  52. enableMouseTracking: false
  53. }
  54. },
  55. series: [{
  56. name: '北京',
  57. 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]
  58. }, {
  59. name: '广州',
  60. 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]
  61. }]
  62. });
  63. });
  64. </script>
  65. </head>
  66. <body>
  67. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  68. </body>
  69. </html>