items_tjlogin.php 1009 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * 桌面首页项(登录统计)
  4. */
  5. defined('HOST') or die ('not access');
  6. ?>
  7. <script>
  8. homeobject.show_tjlogin_list=function(arr){
  9. if(typeof(echarts)=='undefined')return;
  10. if(!this.myCharttjlogina)this.myCharttjlogina = echarts.init(get('tjlogin_list{rand}'));
  11. console.log(arr);
  12. var option = {
  13. tooltip: {
  14. trigger: 'item',
  15. formatter: "{b}: {c}人 ({d}%)"
  16. },
  17. legend: {
  18. orient: 'vertical',
  19. x: 'right',
  20. data:arr.data
  21. },
  22. series: [
  23. {
  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.myCharttjlogina.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="tjlogin_list{rand}" style="height:250px;"></div>
  46. </div>
  47. </div>
粤ICP备19079148号