Report_Pie.aspx 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report_Pie.aspx.cs" Inherits="HotelManage.Report_Pie" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head runat="server">
  5. <title></title>
  6. <script src="js/jquery-1.8.3.min.js" type="text/javascript"></script>
  7. <style type="text/css">
  8. ${demo.css}
  9. </style>
  10. <script type="text/javascript">
  11. $(function () {
  12. $('#container').highcharts({
  13. chart: {
  14. plotBackgroundColor: null,
  15. plotBorderWidth: null,
  16. plotShadow: false
  17. },
  18. title: {
  19. text: '<%=year()%>年每月收益比例图'
  20. },
  21. tooltip: {
  22. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  23. },
  24. plotOptions: {
  25. pie: {
  26. allowPointSelect: true,
  27. cursor: 'pointer',
  28. dataLabels: {
  29. enabled: true,
  30. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  31. style: {
  32. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  33. }
  34. }
  35. }
  36. },
  37. series: [{
  38. type: 'pie',
  39. name: '销售额占比:',
  40. data: [
  41. <%=pie()%>
  42. ['其他月份',0]
  43. ]
  44. }]
  45. });
  46. });
  47. </script>
  48. </head>
  49. <body>
  50. <script src="../../js/highcharts.js"></script>
  51. <script src="../../js/modules/exporting.js"></script>
  52. <div id="container" style="width:100%;height: 400px; margin: 0 auto"></div>
  53. </body>
  54. </html>