Geen omschrijving

general_studies_overview.blade.php 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. @extends('layouts.master')
  2. @section('navigation')
  3. @if($role==1)
  4. @include('local.managers.admins._navigation')
  5. @elseif($role==2)
  6. @include('local.managers.sCoords._navigation')
  7. @elseif($role==3)
  8. @include('local.managers.pCoords._navigation')
  9. @else
  10. @include('local.professors._navigation')
  11. @endif
  12. @stop
  13. @section('main')
  14. <div class="row">
  15. <div class="col-md-12" id="graph"></div>
  16. </div>
  17. @stop
  18. @section('included-js')
  19. <!-- HighCharts -->
  20. <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
  21. <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
  22. @stop
  23. @section('javascript')
  24. $(function () {
  25. $('#graph').highcharts({
  26. chart: {
  27. type: 'bar'
  28. },
  29. title: {
  30. text: 'Achieved vs Expected Learning Outcomes'
  31. },
  32. xAxis: {
  33. categories: [
  34. @foreach($outcomes as $outcome)
  35. "{{{ $outcome->name }}}",
  36. @endforeach
  37. ],
  38. labels: {
  39. style: {
  40. fontSize:'11px'
  41. },
  42. step:1,
  43. useHTML:true,
  44. formatter: function() {
  45. return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">'+this.value+'</div>';
  46. },
  47. }
  48. },
  49. yAxis: {
  50. min: 0,
  51. max: 100,
  52. title: {
  53. text: 'Percentage'
  54. }
  55. },
  56. tooltip: {
  57. headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
  58. pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
  59. '<td style="padding:0"><b>{point.y:.2f}</b></td></tr>',
  60. footerFormat: '</table>',
  61. shared: true,
  62. useHTML: true
  63. },
  64. plotOptions: {
  65. bar: {
  66. //grouping: false,
  67. shadow: false,
  68. borderWidth: 0,
  69. },
  70. series: {
  71. pointPadding: 0,
  72. groupPadding: 0.075
  73. },
  74. },
  75. series: [{
  76. name: 'Achieved',
  77. color: '#e70033',
  78. dataLabels: {
  79. enabled: true,
  80. fontSize: 8,
  81. color: '#fff',
  82. align: 'right',
  83. format: '{y:.1f}%',
  84. style: {
  85. //fontWeight: 'bold'
  86. },
  87. y:-1
  88. },
  89. data:[
  90. @foreach($outcomes as $index => $outcome)
  91. @if(
  92. is_array($outcomes_attempted)
  93. && array_key_exists($outcome->id, $outcomes_attempted)
  94. && $outcomes_attempted[$outcome->id]!=0)
  95. {{{ ($outcomes_achieved[$outcome->id]/$outcomes_attempted[$outcome->id])*100 }}},
  96. @else
  97. 0,
  98. @endif
  99. @endforeach
  100. ],
  101. pointPadding: 0,
  102. }, {
  103. name: 'Expected',
  104. color: '#555555',
  105. dataLabels: {
  106. enabled: true,
  107. fontSize: 8,
  108. color: '#fff',
  109. align: 'right',
  110. format: '{y:.1f}%',
  111. style: {
  112. //fontWeight: 'bold'
  113. },
  114. y:-1
  115. },
  116. data: [
  117. @foreach($outcomes as $index => $outcome)
  118. @if(
  119. is_array($outcomes_attempted)
  120. && array_key_exists($outcome->id, $outcomes_attempted)
  121. && $outcomes_attempted[$outcome->id]!=0)
  122. {{{ $outcome->expected_outcome }}},
  123. @else
  124. 0,
  125. @endif
  126. @endforeach
  127. ],
  128. pointPadding: 0,
  129. }]
  130. });
  131. // Include dummy graph for outcomes
  132. @include('global.dummy-outcomes')
  133. });
  134. @stop