pzfmlIndex.htm 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>慧牧科技</title>
  5. <script src="views/haifmp/js/jquery-2.1.1.min.js"></script>
  6. <script type="text/javascript" src="js/highcharts/highcharts.js"></script>
  7. <style type="text/css">
  8. </style>
  9. <script type="text/javascript">
  10. $(function () {
  11. var jo = "$!jo";
  12. $('#container').highcharts({
  13. chart: {
  14. type: 'bar'
  15. },
  16. title: {
  17. text: '最近四周配种分娩数条形图'
  18. },
  19. subtitle: {
  20. text: '数据来源: 慧牧科技'
  21. },
  22. xAxis: {
  23. categories: jo.name,
  24. title: {
  25. text: null
  26. }
  27. },
  28. yAxis: {
  29. min: 0,
  30. title: {
  31. text: '配种分娩数',
  32. align: 'high'
  33. },
  34. labels: {
  35. overflow: 'justify'
  36. }
  37. },
  38. tooltip: {
  39. valueSuffix: ' 次'
  40. },
  41. plotOptions: {
  42. bar: {
  43. dataLabels: {
  44. enabled: true
  45. }
  46. }
  47. },
  48. legend: {
  49. layout: 'vertical',
  50. align: 'right',
  51. verticalAlign: 'top',
  52. x: -40,
  53. y: 100,
  54. floating: true,
  55. borderWidth: 1,
  56. backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
  57. shadow: true
  58. },
  59. credits: {
  60. enabled: false
  61. },
  62. series: [{
  63. name: '配种数',
  64. data: jo.pzsum
  65. }, {
  66. name: '分娩数',
  67. data: jo.fmsum
  68. }]
  69. });
  70. $('#container1').highcharts({
  71. chart: {
  72. type: 'line'
  73. },
  74. title: {
  75. text: '最近四周配种分娩率'
  76. },
  77. subtitle: {
  78. text: '数据来源: 慧牧科技'
  79. },
  80. xAxis: {
  81. categories: jo.name,
  82. },
  83. yAxis: {
  84. title: {
  85. text: '%'
  86. },
  87. labels: {
  88. overflow: 'justify'
  89. }
  90. },
  91. plotOptions: {
  92. line: {
  93. dataLabels: {
  94. enabled: true // 开启数据标签
  95. },
  96. enableMouseTracking: false // 关闭鼠标跟踪,对应的提示框、点击事件会失效
  97. }
  98. },
  99. series: [{
  100. name: '配种分娩率',
  101. data: jo.pzfm
  102. }]
  103. });
  104. });
  105. </script>
  106. </head>
  107. <body>
  108. <div id="container" style="min-width:400px;height:400px"></div>
  109. <div id="container1" style="min-width:400px;height:400px"></div>
  110. </body>
  111. </html>