reportDemo.jsp 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!-- context path -->
  4. <t:base type="jquery,easyui"></t:base>
  5. <script type="text/javascript" src="plug-in/Highcharts-2.2.5/js/highcharts.src.js"></script>
  6. <script type="text/javascript" src="plug-in/Highcharts-2.2.5/js/modules/exporting.src.js"></script>
  7. <c:set var="ctxPath" value="${pageContext.request.contextPath}" />
  8. <script type="text/javascript">
  9. $(function() {
  10. $(document).ready(function() {
  11. var chart;
  12. $.ajax({
  13. type : "POST",
  14. url : "jeecgListDemoController.do?broswerCount&reportType=line",
  15. success : function(jsondata) {
  16. data = eval(jsondata);
  17. chart = new Highcharts.Chart({
  18. chart : {
  19. renderTo : 'containerline',
  20. plotBackgroundColor : null,
  21. plotBorderWidth : null,
  22. plotShadow : false
  23. },
  24. title : {
  25. text : '<t:mutiLang langKey="broswer.count.analysis"/>-<b><t:mutiLang langKey="common.line.chart"/></b>'
  26. },
  27. xAxis : {
  28. categories : [ '1', '2', '3', '4', '5','6','7','8']
  29. },
  30. tooltip : {
  31. shadow: false,
  32. percentageDecimals : 1,
  33. formatter: function() {
  34. return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.percentage, 1) +'%';
  35. }
  36. },
  37. exporting:{
  38. filename:'pie',
  39. url:'${ctxPath}/jeecgListDemoController.do?export'
  40. },
  41. plotOptions : {
  42. pie : {
  43. allowPointSelect : true,
  44. cursor : 'pointer',
  45. showInLegend : true,
  46. dataLabels : {
  47. enabled : true,
  48. color : '#000000',
  49. connectorColor : '#000000',
  50. formatter : function() {
  51. return '<b>' + this.point.name + '</b>: ' + Highcharts.numberFormat(this.percentage, 1)+"%";
  52. }
  53. }
  54. }
  55. },
  56. series : data
  57. });
  58. }
  59. });
  60. });
  61. });
  62. </script>
  63. <script type="text/javascript">
  64. $(function() {
  65. $(document).ready(function() {
  66. var chart;
  67. $.ajax({
  68. type : "POST",
  69. url : "jeecgListDemoController.do?broswerCount&reportType=column",
  70. success : function(jsondata) {
  71. data = eval(jsondata);
  72. console.log(data);
  73. chart = new Highcharts.Chart({
  74. chart : {
  75. renderTo : 'containerCol',
  76. plotBackgroundColor : null,
  77. plotBorderWidth : null,
  78. plotShadow : false
  79. },
  80. title : {
  81. text : '<t:mutiLang langKey="broswer.count.analysis"/>-<b><t:mutiLang langKey="common.histogram"/></b>'
  82. },
  83. xAxis : {
  84. //update-begin--Author:weict Date:20170515 for:TASK #1973 【demo 问题】综合报表挤一块了,少点数据,提高效果--------------------
  85. categories : [ 'Chrome', 'Firefox', 'IE', 'MSIE 7.0', 'MSIE 8.0','MSIE 9.0','rv:11.0','Safari']
  86. //update-end--Author:weict Date:20170515 for:TASK #1973 【demo 问题】综合报表挤一块了,少点数据,提高效果----------------------
  87. },
  88. tooltip : {
  89. percentageDecimals : 1,
  90. formatter: function() {
  91. return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.percentage, 1) +'%';
  92. }
  93. },
  94. exporting:{
  95. filename:'column',
  96. url:'${ctxPath}/jeecgListDemoController.do?export'//
  97. },
  98. plotOptions : {
  99. column : {
  100. allowPointSelect : true,
  101. cursor : 'pointer',
  102. showInLegend : true,
  103. dataLabels : {
  104. enabled : true,
  105. color : '#000000',
  106. connectorColor : '#000000',
  107. formatter : function() {
  108. //update-begin--Author:weict Date:20170515 for:TASK #1973 【demo 问题】综合报表挤一块了,少点数据,提高效果--------------------
  109. return Highcharts.numberFormat(this.percentage, 1)+"%";
  110. //update-end--Author:weict Date:20170515 for:TASK #1973 【demo 问题】综合报表挤一块了,少点数据,提高效果----------------------
  111. }
  112. }
  113. }
  114. },
  115. series:data,
  116. });
  117. }
  118. });
  119. });
  120. });
  121. </script>
  122. <script type="text/javascript">
  123. $(function() {
  124. $(document).ready(function() {
  125. var chart;
  126. $.ajax({
  127. type : "POST",
  128. url : "jeecgListDemoController.do?broswerCount&reportType=pie",
  129. success : function(jsondata) {
  130. data = eval(jsondata);
  131. chart = new Highcharts.Chart({
  132. chart : {
  133. renderTo : 'containerPie',
  134. plotBackgroundColor : null,
  135. plotBorderWidth : null,
  136. plotShadow : false
  137. },
  138. title : {
  139. text : '<t:mutiLang langKey="broswer.count.analysis"/>-<b><t:mutiLang langKey="common.pie.chart"/></b>'
  140. },
  141. xAxis : {
  142. categories : [ '1', '2', '3', '4', '5']
  143. },
  144. tooltip : {
  145. shadow: false,
  146. percentageDecimals : 1,
  147. formatter: function() {
  148. return '<b>'+this.point.name + '</b>:' + Highcharts.numberFormat(this.percentage, 1) +'%';
  149. }
  150. },
  151. exporting:{
  152. filename:'pie',
  153. url:'${ctxPath}/jeecgListDemoController.do?export'
  154. },
  155. plotOptions : {
  156. pie : {
  157. allowPointSelect : true,
  158. cursor : 'pointer',
  159. showInLegend : true,
  160. dataLabels : {
  161. enabled : true,
  162. color : '#000000',
  163. connectorColor : '#000000',
  164. formatter : function() {
  165. return '<b>' + this.point.name + '</b>: ' + Highcharts.numberFormat(this.percentage, 1)+"%";
  166. }
  167. }
  168. }
  169. },
  170. series : data
  171. });
  172. }
  173. });
  174. });
  175. });
  176. </script>
  177. <span id="containerline" style="float: left; width: 30%; height: 60%"></span>
  178. <span id="containerCol" style="float: left; width: 38%; height: 60%"></span>
  179. <span id="containerPie" style="width: 30%; height: 60%"></span>
  180. <div style="width: 100%; height: 38%;">
  181. <t:datagrid name="broswerStatisticList" title="broswer.count.statistics" actionUrl="jeecgListDemoController.do?listAllStatisticByJdbc" idField="id" fit="true">
  182. <t:dgCol title="common.code" field="id" hidden="true"></t:dgCol>
  183. <t:dgCol title="lang.broswer" field="broswer" width="130"></t:dgCol>
  184. <t:dgCol title="number.broswer" field="broswercount" width="130"></t:dgCol>
  185. <t:dgCol title="common.proportion" field="rate" width="130"></t:dgCol>
  186. </t:datagrid>
  187. </div>
  188. <script type="text/javascript">
  189. $(function(){
  190. $(document.body).css("width","99.3%");
  191. });
  192. </script>
  193. <!-- add-update--Author:jg_renjie Date:20150613 for:页面自适应页面,不会出现左右滚动条 -->