You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dashboard.blade.php 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. @extends('market.layout.master')
  2. @section('ptitle', 'Marketing')
  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. label: '# of Forms Submitted (Dealer)',
  78. data: <?php echo json_encode($finalD6) ?>,
  79. backgroundColor: [
  80. 'rgba(255, 99, 132, 0.2)',
  81. 'rgba(255, 99, 132, 0.2)',
  82. 'rgba(255, 99, 132, 0.2)',
  83. 'rgba(255, 99, 132, 0.2)',
  84. 'rgba(255, 99, 132, 0.2)',
  85. 'rgba(255, 99, 132, 0.2)',
  86. 'rgba(255, 99, 132, 0.2)',
  87. 'rgba(255, 99, 132, 0.2)',
  88. 'rgba(255, 99, 132, 0.2)',
  89. 'rgba(255, 99, 132, 0.2)',
  90. 'rgba(255, 99, 132, 0.2)',
  91. 'rgba(255, 99, 132, 0.2)'
  92. ],
  93. borderColor: [
  94. 'rgba(255,99,132,1)',
  95. 'rgba(255,99,132,1)',
  96. 'rgba(255,99,132,1)',
  97. 'rgba(255,99,132,1)',
  98. 'rgba(255,99,132,1)',
  99. 'rgba(255,99,132,1)',
  100. 'rgba(255,99,132,1)',
  101. 'rgba(255,99,132,1)',
  102. 'rgba(255,99,132,1)',
  103. 'rgba(255,99,132,1)',
  104. 'rgba(255,99,132,1)',
  105. 'rgba(255,99,132,1)'
  106. ],
  107. borderWidth: 1
  108. },
  109. {
  110. label: '# of Forms Submitted (Non Dealer)',
  111. data: <?php echo json_encode($finalD5) ?>,
  112. backgroundColor: [
  113. 'rgba(54, 162, 235, 0.2)',
  114. 'rgba(54, 162, 235, 0.2)',
  115. 'rgba(54, 162, 235, 0.2)',
  116. 'rgba(54, 162, 235, 0.2)',
  117. 'rgba(54, 162, 235, 0.2)',
  118. 'rgba(54, 162, 235, 0.2)',
  119. 'rgba(54, 162, 235, 0.2)',
  120. 'rgba(54, 162, 235, 0.2)',
  121. 'rgba(54, 162, 235, 0.2)',
  122. 'rgba(54, 162, 235, 0.2)',
  123. 'rgba(54, 162, 235, 0.2)',
  124. 'rgba(54, 162, 235, 0.2)'
  125. ],
  126. borderColor: [
  127. 'rgba(54, 162, 235, 1)',
  128. 'rgba(54, 162, 235, 1)',
  129. 'rgba(54, 162, 235, 1)',
  130. 'rgba(54, 162, 235, 1)',
  131. 'rgba(54, 162, 235, 1)',
  132. 'rgba(54, 162, 235, 1)',
  133. 'rgba(54, 162, 235, 1)',
  134. 'rgba(54, 162, 235, 1)',
  135. 'rgba(54, 162, 235, 1)',
  136. 'rgba(54, 162, 235, 1)',
  137. 'rgba(54, 162, 235, 1)',
  138. 'rgba(54, 162, 235, 1)'
  139. ],
  140. borderWidth: 1
  141. }]
  142. },
  143. options: {
  144. responsive: false,
  145. scales: {
  146. xAxes: [{
  147. ticks: {
  148. maxRotation: 90,
  149. minRotation: 80
  150. },
  151. }],
  152. yAxes: [{
  153. ticks: {
  154. beginAtZero: true
  155. },
  156. }]
  157. }
  158. }
  159. });
  160. </script>
  161. @endsection