Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. <%--
  2. Document : sanphamdanhmuc
  3. Created on : Jan 15, 2019, 7:29:02 AM
  4. Author : JunBu
  5. --%>
  6.  
  7. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  8. <%@page language="java"%>
  9. <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
  10. <!DOCTYPE html>
  11. <html>
  12. <jsp:include page="../header.jsp"/>
  13. <body>
  14. <h1>Report</h1>
  15. <c:if test="${listReportItem.size() > 0}">
  16. <table border="1">
  17. <thead>
  18. <th>Danh Mục</th>
  19. <th>Số Lượng</th>
  20. <th>Tổng Giá Trị</th>
  21. <th>Giá Cao Nhất</th>
  22. <th>Giá Thấp Nhất</th>
  23. <th>Trung Bình</th>
  24. </thead>
  25. <tbody>
  26. <c:forEach var="row" items="${listReportItem}">
  27. <tr>
  28. <td><c:out value="${row.group}"/></td>
  29. <td><c:out value="${row.count}"/></td>
  30. <td><c:out value="${row.sum}"/></td>
  31. <td><c:out value="${row.min}"/></td>
  32. <td><c:out value="${row.max}"/></td>
  33. <td><c:out value="${row.avg}"/></td>
  34. </tr>
  35. </c:forEach>
  36. </tbody>
  37. </table>
  38. <hr/>
  39. <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
  40. <script type="text/javascript">
  41. google.charts.load('current', {'packages':['corechart']});
  42. google.charts.setOnLoadCallback(drawChart);
  43. function drawChart() {
  44. var data = google.visualization.arrayToDataTable([
  45. ['Danh mục', 'Số lượng'],
  46. <c:forEach var="row" items="${listReportItem}">
  47. ['${row.group}',${row.count}],
  48. </c:forEach>
  49. ]);
  50.  
  51. var options = {
  52. 'title':'Thống Kê Thông Tin Hàng Hóa',
  53. 'width':550,
  54. 'height':400
  55. }
  56.  
  57. var chart = new google.visualization.PieChart(document.getElementById('piechart_3d'));
  58. chart.draw(data, options);
  59. }
  60. </script>
  61. <div id="piechart_3d" style="width: 700px; height: 500px"></div>
  62. </c:if>
  63.  
  64. </body>
  65. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement