items_kqtotal.php 1020 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * 桌面首页项(考勤统计)
  4. */
  5. defined('HOST') or die ('not access');
  6. ?>
  7. <script>
  8. homeobject.show_kqtotal_list=function(arr){
  9. if(typeof(echarts)=='undefined')return;
  10. if(!this.myChartkqtotal)this.myChartkqtotal = echarts.init(get('kqtotal_list{rand}'));
  11. var option = {
  12. tooltip: {
  13. trigger: 'item',
  14. formatter: "{a} <br/>{b}: {c} ({d}%)"
  15. },
  16. legend: {
  17. orient: 'vertical',
  18. x: 'right',
  19. data:arr.data
  20. },
  21. series: [
  22. {
  23. name:'出勤情况',
  24. type:'pie',
  25. radius: ['50%', '70%'],
  26. itemStyle:{
  27. normal:{
  28. //color:function(params){
  29. // return params.data.color;
  30. //}
  31. }
  32. },
  33. data:arr.rows
  34. }
  35. ]
  36. };
  37. this.myChartkqtotal.setOption(option);
  38. }
  39. </script>
  40. <div class="panel panel-default">
  41. <div class="panel-heading">
  42. <div class="panel-title"><?=$itemnowname?>(<?=$rock->date?>)</div>
  43. </div>
  44. <div class="panel-body">
  45. <div id="kqtotal_list{rand}" style="height:250px;"></div>
  46. </div>
  47. </div>
粤ICP备19079148号