js-search.blade.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. <?php
  6. $getUptName = \App\Model\Setting\UPT::where('office_id',$changeUPT)->select('office_name')->distinct()->value('office_name');
  7. ?>
  8. <script>
  9. Highcharts.chart('inspeksi-kegiatan-search', {
  10. chart: {
  11. type: 'bar'
  12. },
  13. title:false,
  14. xAxis: {
  15. categories: [
  16. '{{$getUptName}}',
  17. ],
  18. title: {
  19. text: null
  20. }
  21. },
  22. yAxis: {
  23. min: 0,
  24. title: {
  25. text: 'Population (millions)',
  26. align: 'high'
  27. },
  28. labels: {
  29. overflow: 'justify'
  30. }
  31. },
  32. tooltip: {
  33. valueSuffix: ' millions'
  34. },
  35. plotOptions: {
  36. bar: {
  37. dataLabels: {
  38. enabled: true
  39. }
  40. }
  41. },
  42. legend: {
  43. layout: 'vertical',
  44. align: 'right',
  45. verticalAlign: 'top',
  46. x: -40,
  47. y: 80,
  48. floating: true,
  49. borderWidth: 1,
  50. backgroundColor:
  51. Highcharts.defaultOptions.legend.backgroundColor || '#000',
  52. shadow: true
  53. },
  54. credits: {
  55. enabled: false
  56. },
  57. series: [
  58. {
  59. name: 'Total Kegiatan Inspeksi',
  60. data: [
  61. {{\App\Model\Inspeksi\Inspeksi::where('kode_upt',$changeUPT)->count()}},
  62. ]
  63. },
  64. ]
  65. });
  66. </script>
  67. <script>
  68. Highcharts.chart('inspeksi-hasil-search', {
  69. chart: {
  70. type: 'bar'
  71. },
  72. title:false,
  73. xAxis: {
  74. categories: [
  75. '{{$getUptName}}',
  76. ],
  77. title: {
  78. text: null
  79. }
  80. },
  81. yAxis: {
  82. min: 0,
  83. title: {
  84. text: 'Population (millions)',
  85. align: 'high'
  86. },
  87. labels: {
  88. overflow: 'justify'
  89. }
  90. },
  91. tooltip: {
  92. valueSuffix: ' millions'
  93. },
  94. plotOptions: {
  95. bar: {
  96. dataLabels: {
  97. enabled: true
  98. }
  99. }
  100. },
  101. legend: {
  102. layout: 'vertical',
  103. align: 'right',
  104. verticalAlign: 'top',
  105. x: -40,
  106. y: 80,
  107. floating: true,
  108. borderWidth: 1,
  109. backgroundColor:
  110. Highcharts.defaultOptions.legend.backgroundColor || '#000',
  111. shadow: true
  112. },
  113. credits: {
  114. enabled: false
  115. },
  116. series: [
  117. {
  118. name: 'Berdasarkan Capaian Hasil',
  119. data: [
  120. {{number_format($capaian, 2)}},
  121. ]
  122. },
  123. ]
  124. });
  125. </script>