Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

dashboard.blade.php 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. @extends('eep-hr.layout.master')
  2. @section('ptitle', 'EEP')
  3. @section('page_title', 'Dashboard')
  4. @section('subpage', 'Graph & Summary Report')
  5. @section('img_profile', asset($user->staffDetail->user_pic))
  6. @section('login_name', $user->staffDetail->name )
  7. @section('last_login', $user->last_login_at )
  8. @section('content')
  9. <div class="fluid">
  10. <!-- Donut -->
  11. <div class="widget grid4 chartWrapper">
  12. <div class="whead"><h6>Form's Statistics Overview</h6></div>
  13. <div class="body"><canvas id="pieChart1" width="400" height="400"></canvas></div>
  14. </div>
  15. <!-- Auto updating chart -->
  16. <div class="widget grid8 chartWrapper">
  17. <div class="whead"><h6>Form's Statistics by Month (2019)</h6></div>
  18. <div class="body"><center><canvas id="chart1" width="700" height="400"></canvas></center></div>
  19. </div>
  20. </div>
  21. @endsection
  22. @section('external_js')
  23. <script type="text/javascript">
  24. var total = <?php echo $total ?>;
  25. var rec = <?php echo $rec ?>;
  26. var dealer = <?php echo $dealer ?>;
  27. var normal = <?php echo $normal ?>;
  28. var rejected = <?php echo $rejected ?>;
  29. var ctx = document.getElementById('pieChart1');
  30. var data = {
  31. datasets: [{
  32. fill: true,
  33. backgroundColor: [
  34. 'Yellow',
  35. 'Green',
  36. 'Brown',
  37. 'Red',
  38. ],
  39. hoverBackgroundColor:[
  40. 'Yellow',
  41. 'Green',
  42. 'Brown',
  43. 'Red',
  44. ],
  45. data: [rec, dealer, normal, rejected]
  46. }],
  47. // These labels appear in the legend and in the tooltips when hovering different arcs
  48. labels: [
  49. 'Total Rectification ('+rec+')',
  50. 'Total Dealer ('+dealer+')',
  51. 'Total Non Dealer ('+normal+')',
  52. 'Total Rejected ('+rejected+')'
  53. ]
  54. };
  55. var options = {
  56. responsive: true,
  57. // title: {
  58. // display: true,
  59. // text: 'What happens when you lend your favorite t-shirt to a girl ?',
  60. // position: 'top'
  61. // },
  62. // rotation: -0.7 * Math.PI
  63. };
  64. var myPieChart = new Chart(ctx, {
  65. type: 'doughnut',
  66. data: data,
  67. options: options
  68. });
  69. /***************************************/
  70. var ctx2 = document.getElementById('chart1');
  71. var data = '';
  72. var myChart = new Chart(ctx2, {
  73. type: 'bar',
  74. data: {
  75. labels: ['January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
  76. datasets: [
  77. {
  78. label: '# of Forms Submitted (AEP)',
  79. data: <?php echo json_encode($finalD5) ?>,
  80. backgroundColor: [
  81. 'rgba(54, 162, 235, 0.2)',
  82. 'rgba(54, 162, 235, 0.2)',
  83. 'rgba(54, 162, 235, 0.2)',
  84. 'rgba(54, 162, 235, 0.2)',
  85. 'rgba(54, 162, 235, 0.2)',
  86. 'rgba(54, 162, 235, 0.2)',
  87. 'rgba(54, 162, 235, 0.2)',
  88. 'rgba(54, 162, 235, 0.2)',
  89. 'rgba(54, 162, 235, 0.2)',
  90. 'rgba(54, 162, 235, 0.2)',
  91. 'rgba(54, 162, 235, 0.2)',
  92. 'rgba(54, 162, 235, 0.2)'
  93. ],
  94. borderColor: [
  95. 'rgba(54, 162, 235, 1)',
  96. 'rgba(54, 162, 235, 1)',
  97. 'rgba(54, 162, 235, 1)',
  98. 'rgba(54, 162, 235, 1)',
  99. 'rgba(54, 162, 235, 1)',
  100. 'rgba(54, 162, 235, 1)',
  101. 'rgba(54, 162, 235, 1)',
  102. 'rgba(54, 162, 235, 1)',
  103. 'rgba(54, 162, 235, 1)',
  104. 'rgba(54, 162, 235, 1)',
  105. 'rgba(54, 162, 235, 1)',
  106. 'rgba(54, 162, 235, 1)'
  107. ],
  108. borderWidth: 1
  109. }]
  110. },
  111. options: {
  112. responsive: false,
  113. scales: {
  114. xAxes: [{
  115. ticks: {
  116. maxRotation: 90,
  117. minRotation: 80
  118. },
  119. }],
  120. yAxes: [{
  121. ticks: {
  122. beginAtZero: true
  123. },
  124. }]
  125. }
  126. }
  127. });
  128. </script>
  129. @endsection