js-search.blade.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <script src="http://code.highcharts.com/highcharts.js"></script>
  2. <script src="http://code.highcharts.com/maps/modules/map.js"></script>
  3. <script src="http://code.highcharts.com/maps/modules/exporting.js"></script>
  4. <script src="http://code.highcharts.com/mapdata/countries/us/us-all.js"></script>
  5. <script>
  6. Highcharts.chart('sppRT-search', {
  7. chart: {
  8. type: 'bar'
  9. },
  10. title:false,
  11. xAxis: {
  12. categories: [
  13. @foreach(\App\Model\ListMonth::all() as $key => $value)
  14. '{{$value->nama}}',
  15. @endforeach
  16. ],
  17. title: {
  18. text: null
  19. }
  20. },
  21. yAxis: {
  22. min: 0,
  23. title: {
  24. text: 'UPT',
  25. align: 'high'
  26. },
  27. labels: {
  28. overflow: 'justify'
  29. }
  30. },
  31. tooltip: {
  32. valueSuffix: ' Jumlah'
  33. },
  34. plotOptions: {
  35. bar: {
  36. dataLabels: {
  37. enabled: true
  38. }
  39. }
  40. },
  41. legend: {
  42. layout: 'vertical',
  43. align: 'right',
  44. verticalAlign: 'top',
  45. x: -40,
  46. y: 80,
  47. floating: true,
  48. borderWidth: 1,
  49. backgroundColor:
  50. Highcharts.defaultOptions.legend.backgroundColor || '#FFFFFF',
  51. shadow: true
  52. },
  53. credits: {
  54. enabled: false
  55. },
  56. series: [
  57. {
  58. name: 'Total RT Terbit Diterbitkan',
  59. data: [
  60. @foreach(\App\Model\ListMonth::all() as $key => $value)
  61. 0,
  62. @endforeach
  63. ]
  64. },
  65. {
  66. name: 'RT Terbayar ( H-60 s.d H-30 )',
  67. data: [
  68. @foreach(\App\Model\ListMonth::all() as $key => $value)
  69. <?php
  70. if ($value->id_bulan == 1) {
  71. $minMonth = 11;
  72. $minYears = $year - 1;
  73. }
  74. elseif ($value->id_bulan == 2) {
  75. $minMonth = 12;
  76. $minYears = $year - 1;
  77. }
  78. else{
  79. $minMonth = $value->id_bulan - 2;
  80. $minYears = $year;
  81. }
  82. ?>
  83. 0,
  84. @endforeach
  85. ]
  86. },
  87. {
  88. name: 'RT Terbayar ( H-30 s.d H ) Hasil TL UPT',
  89. data: [
  90. @foreach(\App\Model\ListMonth::all() as $key => $value)
  91. <?php
  92. if ($value->id_bulan == 1) {
  93. $minMonth = 11;
  94. $minYears = $year - 1;
  95. }
  96. elseif ($value->id_bulan == 2) {
  97. $minMonth = 12;
  98. $minYears = $year - 1;
  99. }
  100. else{
  101. $minMonth = $value->id_bulan - 1;
  102. $minYears = $year;
  103. }
  104. ?>
  105. @if(\App\Model\SPP\RT::where('status_pembayaran','paid')->get() == null)
  106. 0,
  107. @else
  108. 0,
  109. @endif
  110. @endforeach
  111. ]
  112. },
  113. {
  114. name: 'RT Belum Terbayar ( Belum Jatuh Tempo )',
  115. data: [
  116. @foreach(\App\Model\ListMonth::all() as $key => $value)
  117. <?php
  118. if ($value->id_bulan == 1) {
  119. $minMonth = 11;
  120. $minYears = $year - 1;
  121. }
  122. elseif ($value->id_bulan == 2) {
  123. $minMonth = 12;
  124. $minYears = $year - 1;
  125. }
  126. else{
  127. $minMonth = $value->id_bulan - 1;
  128. $minYears = $year;
  129. }
  130. ?>
  131. 0,
  132. @endforeach
  133. ]
  134. },
  135. {
  136. name: 'RT Tidak Membayar ( Menjadi Reminder )',
  137. data: [
  138. @foreach(\App\Model\ListMonth::all() as $key => $value)
  139. <?php
  140. if ($value->id_bulan == 1) {
  141. $minMonth = 11;
  142. $minYears = $year - 1;
  143. }
  144. elseif ($value->id_bulan == 2) {
  145. $minMonth = 12;
  146. $minYears = $year - 1;
  147. }
  148. else{
  149. $minMonth = $value->id_bulan;
  150. $minYears = $year;
  151. }
  152. ?>
  153. 0,
  154. @endforeach
  155. ]
  156. },
  157. ]
  158. });
  159. </script>
  160. <script type="text/javascript">
  161. var map = am4core.create("chartdiv", am4maps.MapChart);
  162. </script>