123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002 |
- @extends('layouts.master')
-
- @section('css')
- {{ HTML::style('vendor/jquery-ui-1.11.4.custom/jquery-ui.min.css') }}
- {{ HTML::style('vendor/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css') }}
- @stop
-
- @section('navigation')
- @if ($role == 1)
- @include('local.managers.admins._navigation')
- @elseif($role == 2)
- @include('local.managers.sCoords._navigation')
- @elseif($role == 3)
- @include('local.managers.pCoords._navigation')
- @else
- @include('local.professors._navigation')
- @endif
- @stop
-
-
- @section('main')
-
-
-
-
-
-
-
-
-
-
- <div class="row">
- <ul id='levelTabs' class="nav nav-tabs" role="tablist">
- <!-- For each grouped course -->
-
-
- <li role="presentation" class ='first'>
- <a data-toggle="tab" href="#activity_1"
- role="tab">{{ strlen($activity_1->name) > 50 ? substr($activity_1->name, 0, 50) . '...' : $activity_1->name }}</a>
- </li>
- <li role="presentation">
- <a data-toggle="tab" href="#activity_2"
- role="tab">{{ strlen($activity_2->name) > 50 ? substr($activity_2->name, 0, 50) . '...' : $activity_2->name }}</a>
- </li>
-
-
- </ul>
- <div id="allLists" class="tab-content">
- <div role="tabpanel" class='tab-pane first' id="activity_1">
- <h3 style="text-align: center">Performance by Learning Outcome Criteria in {{ $activity_1->name }}</h3><hr>
- <div class="col-md-9" id="graph_1"></div>
-
- </div>
-
- <div role="tabpanel" class='tab-pane' id="activity_2">
- <h3 style="text-align: center">Performance by Learning Outcome Criteria in {{ $activity_2->name }}</h3><hr>
- <div class="col-md-9" id="graph_2"></div>
-
- </div>
-
- </div>
- </div>
- <div class="row">
-
- <ul id='levelTabs' class="nav nav-tabs" role="tablist">
- <!-- For each grouped course -->
-
-
- <li role="presentation" class = "first">
- <a data-toggle="tab" href="#activity_criteriaGraph_1"
- role="tab">{{ strlen($activity_1->name) > 50 ? substr($activity_1->name, 0, 50) . '...' : $activity_1->name }}</a>
- </li>
- <li role="presentation">
- <a data-toggle="tab" href="#activity_criteriaGraph_2"
- role="tab">{{ strlen($activity_2->name) > 50 ? substr($activity_2->name, 0, 50) . '...' : $activity_2->name }}</a>
- </li>
-
-
- </ul>
- <div id="allLists" class="tab-content">
- <div role="tabpanel" class='tab-pane first' id="activity_criteriaGraph_1">
- <h3 style="text-align: center">Criteria Achievement {{ $activity_1->name }}</h3><hr>
- <div class="col-md-9" id="criteriaGraph_1">
-
- </div>
- </div>
- <div role="tabpanel" class='tab-pane' id="activity_criteriaGraph_2">
- <h3 style="text-align: center">Criteria Achievement {{ $activity_2->name }}</h3><hr>
- <div class="col-md-9" id="criteriaGraph_2">
-
- </div>
- </div>
- </div>
- </div>
- <div class="row">
-
- <ul id='levelTabs' class="nav nav-tabs" role="tablist">
- <!-- For each grouped course -->
-
-
- <li role="presentation" class ="first">
- <a data-toggle="tab" href="#activity_tabla_1"
- role="tab">{{ strlen($activity_1->name) > 50 ? substr($activity_1->name, 0, 50) . '...' : $activity_1->name }}</a>
- </li>
- <li role="presentation">
- <a data-toggle="tab" href="#activity_tabla_2"
- role="tab">{{ strlen($activity_2->name) > 50 ? substr($activity_2->name, 0, 50) . '...' : $activity_2->name }}</a>
- </li>
-
-
- </ul>
- <div id="allLists" class="tab-content">
- <div role="tabpanel" class='tab-pane first' id="activity_tabla_1">
-
-
- <h3 style="text-align: center;">{{ $activity_1->name }} </h3>
-
- <br>
- <br>
- <h5 style="display: inline;">Date: </h5>
- <p style="display: inline;">
- <strong>({{ $activity_1->date }})</strong>
- </p>
- <br>
-
- <h5 style="display: inline;">Performance Indicators: </h5>
- <?php
- Log::info($activity_1->rubric[0]);
- ?>
- <p style="display: inline;"><i>{{ $activity_1->rubric[0]->num_scales }} (
- <?php
- $titles = $activity_1->rubric[0]->getTitles();
- ?>
- @if (sizeof($titles) != 1)
- @foreach ($titles as $index5 => $rubric_title)
- @if ($index5 != $activity_1->rubric[0]->num_scales - 1)
- {{ $rubric_title->text }},
- @else
- and {{ $rubric_title->text }}
- @endif
-
- @endforeach
- )
- @else
- {{ $titles[0]->text }} )
- @endif
- </i></p>
- <br>
- <h5 style="display: inline;">Scale: </h5>
- @if ($activity_1->rubric[0]->max_score == 1)
- <p style="display: inline;">1 point scale</p>
- @else
- <p style="display: inline;">1-{{ $activity_1->rubric[0]->max_score }} point scale</p>
-
- @endif
- <br>
- <br>
- <h4>Perfomance by Learning Outcome Criteria</h4>
- <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
- <p style="display: inline;"> <i>{{ $activity_1->rubric[0]->expected_points }} or more</i>
- </p>
- <br>
- <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
- target by criterion: </h5>
- <p style="display: inline;"> <i>{{ $activity_1->rubric[0]->expected_percentage }} %</i>
- </p>
- <br>
- <table class='table table-striped table-condensed datatable'>
- <thead>
- <tr>
- <th>
- Criterion
- </th>
- <th>
- Number of Students Assessed
- </th>
- <th>
- Number of students that achieved the target
- </th>
- <th>
- %
- </th>
- <th>
- Outcomes
- </th>
- </tr>
- </thead>
- <tbody>
- @foreach ($activity_1->allActivityCriterionInfo() as $index5 => $ac_criterion)
- <tr>
- <td> {{ $ac_criterion->name }}</td>
- <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity_1->id) }}
- </td>
- <td>
- {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity_1->id) }}
-
- </td>
- <?php
-
- $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity_1->id);
- $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity_1->id);
-
- $percentage = 'N/A';
- $activity_1->getOutcomeReport();
-
- ?>
- @if ($out_att == 0)
- <td class="col-md-1 danger">{{ $percentage }}</td>
-
- @else
- <?php
- $percentage = round(($out_ach / $out_att) * 100, 2);
- ?>
- @if ($percentage >= $activity_1->rubric[0]->expected_percentage)
- <td class="col-md-1 success">{{ $percentage }}%</td>
-
- @else
- <td class="col-md-1 danger">{{ $percentage }}%</td>
-
- @endif
- @endif
- <td>
-
- @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
-
- {{ $index6 + 1 }}. <?php echo $outcome->name . "\n\n\n <br>"; ?>
-
-
-
- @endforeach
-
-
- </td>
- </tr>
- @endforeach
- </tbody>
-
- </table>
- <hr>
- <br>
-
- <h4>Perfomance by Learning Outcome Student</h4>
- <h5 style="display: inline; margin:30px;">Target by outcome: </h5>
- <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
- </p>
- <br>
- <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
- target by outcome: </h5>
- <p style="display: inline;"> <i>
- <?php
- $expected = DB::table('target_outcomes_program')
- ->where('program_id', $course->program_id)
- ->where('semester_id', $course->semester_id)
- ->first()->expected_target;
-
- ?>
- {{ $expected }}
- </i>
- </p>
- <br>
- <table class='table table-striped table-condensed datatable'>
- <thead>
- <tr>
- <th>
- Outcome
- </th>
- <th>
- Number of Students Assessed
- </th>
- <th>
- Number of students that achieved the target
- </th>
- <th>
- %
- </th>
-
- </tr>
- </thead>
- <tbody>
- @foreach ($activity_1->getOutcomeReport() as $outcome)
- <tr>
- <td>
- {{ $outcome->name }}
- </td>
- <td>
- {{ $outcome->attempted }}
- </td>
- <td>
- {{ $outcome->achieved }}
- </td>
- @if ($outcome->percentage >= $expected)
- <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
-
- @else
- <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
-
- @endif
-
-
-
-
-
- </tr>
-
- @endforeach
- </tbody>
- </table>
-
- <br>
- <hr>
-
-
-
-
-
-
-
- </div>
- <div role="tabpanel" class='tab-pane' id="activity_tabla_2">
-
-
- <h3 style="text-align: center;">{{ $activity_2->name }} </h3>
-
- <br>
- <br>
- <h5 style="display: inline;">Date: </h5>
- <p style="display: inline;">
- <strong>({{ $activity_2->date }})</strong>
- </p>
- <br>
-
- <h5 style="display: inline;">Performance Indicators: </h5>
- <?php
- Log::info($activity_2->rubric[0]);
- ?>
- <p style="display: inline;"><i>{{ $activity_2->rubric[0]->num_scales }} (
- <?php
- $titles = $activity_2->rubric[0]->getTitles();
- ?>
- @if (sizeof($titles) != 1)
- @foreach ($titles as $index5 => $rubric_title)
- @if ($index5 != $activity_2->rubric[0]->num_scales - 1)
- {{ $rubric_title->text }},
- @else
- and {{ $rubric_title->text }}
- @endif
-
- @endforeach
- )
- @else
- {{ $titles[0]->text }} )
- @endif
- </i></p>
- <br>
- <h5 style="display: inline;">Scale: </h5>
- @if ($activity_2->rubric[0]->max_score == 1)
- <p style="display: inline;">1 point scale</p>
- @else
- <p style="display: inline;">1-{{ $activity_2->rubric[0]->max_score }} point scale</p>
-
- @endif
- <br>
- <br>
- <h4>Perfomance by Learning Outcome Criteria</h4>
- <h5 style="display: inline; margin:30px;">Target by criterion: </h5>
- <p style="display: inline;"> <i>{{ $activity_2->rubric[0]->expected_points }} or more</i>
- </p>
- <br>
- <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
- target by criterion: </h5>
- <p style="display: inline;"> <i>{{ $activity_2->rubric[0]->expected_percentage }} %</i>
- </p>
- <br>
- <table class='table table-striped table-condensed datatable'>
- <thead>
- <tr>
- <th>
- Criterion
- </th>
- <th>
- Number of Students Assessed
- </th>
- <th>
- Number of students that achieved the target
- </th>
- <th>
- %
- </th>
- <th>
- Outcomes
- </th>
- </tr>
- </thead>
- <tbody>
- @foreach ($activity_2->allActivityCriterionInfo() as $index5 => $ac_criterion)
- <tr>
- <td> {{ $ac_criterion->name }}</td>
- <td>{{ Criterion::students_attempted($ac_criterion->criterion_id, $activity_2->id) }}
- </td>
- <td>
- {{ Criterion::students_achieved($ac_criterion->criterion_id, $activity_2->id) }}
-
- </td>
- <?php
-
- $out_att = Criterion::students_attempted($ac_criterion->criterion_id, $activity_2->id);
- $out_ach = Criterion::students_achieved($ac_criterion->criterion_id, $activity_2->id);
-
- $percentage = 'N/A';
- $activity_2->getOutcomeReport();
-
- ?>
- @if ($out_att == 0)
- <td class="col-md-1 danger">{{ $percentage }}</td>
-
- @else
- <?php
- $percentage = round(($out_ach / $out_att) * 100, 2);
- ?>
- @if ($percentage >= $activity_2->rubric[0]->expected_percentage)
- <td class="col-md-1 success">{{ $percentage }}%</td>
-
- @else
- <td class="col-md-1 danger">{{ $percentage }}%</td>
-
- @endif
- @endif
- <td>
-
- @foreach (Criterion::outcomes($ac_criterion->criterion_id) as $index6 => $outcome)
-
- {{ $index6 + 1 }}. <?php echo $outcome->name . "\n\n\n <br>"; ?>
-
-
-
- @endforeach
-
-
- </td>
- </tr>
- @endforeach
- </tbody>
-
- </table>
- <hr>
- <br>
-
- <h4>Perfomance by Learning Outcome Student</h4>
- <h5 style="display: inline; margin:30px;">Target by outcome: </h5>
- <p style="display: inline;"> <i>>= 66.67% of the attempts</i>
- </p>
- <br>
- <h5 style="display: inline; margin:30px;">Expected percent of students achieving the
- target by outcome: </h5>
- <p style="display: inline;"> <i>
- <?php
- $expected = DB::table('target_outcomes_program')
- ->where('program_id', $course->program_id)
- ->where('semester_id', $course->semester_id)
- ->first()->expected_target;
-
- ?>
- {{ $expected }}
- </i>
- </p>
- <br>
- <table class='table table-striped table-condensed datatable'>
- <thead>
- <tr>
- <th>
- Outcome
- </th>
- <th>
- Number of Students Assessed
- </th>
- <th>
- Number of students that achieved the target
- </th>
- <th>
- %
- </th>
-
- </tr>
- </thead>
- <tbody>
- @foreach ($activity_2->getOutcomeReport() as $outcome)
- <tr>
- <td>
- {{ $outcome->name }}
- </td>
- <td>
- {{ $outcome->attempted }}
- </td>
- <td>
- {{ $outcome->achieved }}
- </td>
- @if ($outcome->percentage >= $expected)
- <td class="col-md-1 success">{{ $outcome->percentage }}%</td>
-
- @else
- <td class="col-md-1 danger">{{ $outcome->percentage }}%</td>
-
- @endif
-
-
-
-
-
- </tr>
-
- @endforeach
- </tbody>
- </table>
-
- <br>
- <hr>
-
-
-
-
-
-
-
- </div>
- </div>
- </div>
-
- @stop
- @section('included-js')
- @include('global._datatables_js')
- <!-- HighCharts -->
- <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
- <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
-
- <!-- Datepicker -->
- <script src="{{ asset('vendor/jquery-ui-1.11.4.custom/jquery-ui.min.js') }}"></script>
-
- @stop
-
-
- @section('javascript')
- $(function() {
-
-
-
- $('#criteriaGraph_1').highcharts({
- chart: {
- type: 'bar',
- height:
- @if ($activity_1->is_assessed())
-
- {{ count($activity_1->criteria_achieved()) * 22 + 225 }}
- @else
- {{ 22 + 225 }}
- @endif,
- },
- title: {
- text: ' ',
- },
- xAxis: {
- categories: [
- @if ($activity_1->is_assessed())
- @foreach ($activity_1->criteria_achieved() as $id => $value)
- "{{ Criterion::withTrashed()->find($id)->name }}",
- @endforeach
- @endif
- ],
- labels: {
- style: {
- fontSize: '12px'
- },
- step: 1,
- useHTML: true,
- formatter: function() {
- return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">' +
- this.value + '</div>';
- },
- }
- },
- yAxis: {
- min: 0,
- max: 100,
- title: {
- text: 'Percentage'
- },
- @if (isset($activity_1->rubric[0]) and isset($activity_1->rubric[0]->expected_percentage))
- plotLines:[{
- value:{{ $activity_1->rubric[0]->expected_percentage }},
- color: '#000',
- width:3,
- zIndex:4,
- label:{
- text: 'Goal ({{ $activity_1->rubric[0]->expected_percentage }}%)',
- style: {
- color: '#000',
- fontSize: '14px',
- }
-
- }
- }]
- @endif
- },
-
- tooltip: {
- headerFormat: '<span style="font-size:10px">{point.key}</span> <table > ',
- pointFormat: '<tr> <td style = "color:{series.color};padding:0" > {series.name}: </td>' +
- '<td style="padding:0"><b>{point.y:.2f}%</b></td> </tr>',
- footerFormat: '</table>',
- shared: true,
- useHTML: true
- },
- plotOptions: {
- bar: {
- //grouping: false,
- shadow: false,
- borderWidth: 0,
- },
- series: {
- pointPadding: 0,
- groupPadding: 0.1
- },
- },
- series: [{
- type: 'column',
- name: 'Passed',
- color: '#e70033',
- dataLabels: {
- enabled: true,
- fontSize: 8,
- color: '#fff',
- align: 'right',
- format: '{y:.1f}%',
- style: {
- //fontWeight: 'bold'
- },
- y: -1
- },
- data: [
- @if ($activity_1->is_assessed())
- @foreach ($activity_1->cap_array as $id => $crit)
-
- //This conditional is to ignore criteria that weren't assessed. These would have a value of null.
- @if ($crit->score_percentage)
- {{ $crit->score_percentage }},
- @else
- 0,
- @endif
- @endforeach
- @endif
- ],
- pointPadding: 0,
- }]
- });
-
- $('#criteriaGraph_2').highcharts({
- chart: {
- type: 'bar',
- height:
- @if ($activity_2->is_assessed())
-
- {{ count($activity_2->criteria_achieved()) * 22 + 225 }}
- @else
- {{ 22 + 225 }}
- @endif,
- },
- title: {
- text: ' ',
- },
- xAxis: {
- categories: [
- @if ($activity_2->is_assessed())
- @foreach ($activity_2->criteria_achieved() as $id => $value)
- "{{ Criterion::withTrashed()->find($id)->name }}",
- @endforeach
- @endif
- ],
- labels: {
- style: {
- fontSize: '12px'
- },
- step: 1,
- useHTML: true,
- formatter: function() {
- return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">' +
- this.value + '</div>';
- },
- }
- },
- yAxis: {
- min: 0,
- max: 100,
- title: {
- text: 'Percentage'
- },
- @if (isset($activity_2->rubric[0]) and isset($activity_2->rubric[0]->expected_percentage))
- plotLines:[{
- value:{{ $activity_2->rubric[0]->expected_percentage }},
- color: '#000',
- width:3,
- zIndex:4,
- label:{
- text: 'Goal ({{ $activity_2->rubric[0]->expected_percentage }}%)',
- style: {
- color: '#000',
- fontSize: '14px',
- }
-
- }
- }]
- @endif
- },
-
- tooltip: {
- headerFormat: '<span style="font-size:10px">{point.key}</span> <table > ',
- pointFormat: '<tr> <td style = "color:{series.color};padding:0" > {series.name}: </td>' +
- '<td style="padding:0"><b>{point.y:.2f}%</b></td> </tr>',
- footerFormat: '</table>',
- shared: true,
- useHTML: true
- },
- plotOptions: {
- bar: {
- //grouping: false,
- shadow: false,
- borderWidth: 0,
- },
- series: {
- pointPadding: 0,
- groupPadding: 0.1
- },
- },
- series: [{
- type: 'column',
- name: 'Passed',
- color: '#e70033',
- dataLabels: {
- enabled: true,
- fontSize: 8,
- color: '#fff',
- align: 'right',
- format: '{y:.1f}%',
- style: {
- //fontWeight: 'bold'
- },
- y: -1
- },
- data: [
- @if ($activity_2->is_assessed())
- @foreach ($activity_2->cap_array as $id => $crit)
-
- //This conditional is to ignore criteria that weren't assessed. These would have a value of null.
- @if ($crit->score_percentage)
- {{ $crit->score_percentage }},
- @else
- 0,
- @endif
- @endforeach
- @endif
- ],
- pointPadding: 0,
- }]
- });
-
-
- $('#graph_1').highcharts({
- chart: {
- type: 'bar',
- },
- title: {
- text: ' '
- },
- xAxis: {
- categories: [
- @foreach ($outcomes as $outcome)
- "{{ $outcome->name }}",
- @endforeach
- ],
- labels: {
- style: {
- fontSize: '11px'
- },
- step: 1,
- useHTML: true,
- formatter: function() {
- return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">' +
- this.value + '</div>';
- },
- }
- },
- yAxis: {
- min: 0,
- max: 100,
- title: {
- text: 'Percentage'
- }
- },
- tooltip: {
- headerFormat: '<span style="font-size:10px">{point.key}</span> <table > ',
- pointFormat: '<tr> <td style = "color:{series.color};padding:0" > {series.name}: </td>' +
- '<td style="padding:0"><b>{point.y:.2f}</b></td> </tr>',
- footerFormat: '</table>',
- shared: true,
- useHTML: true
- },
- plotOptions: {
- bar: {
- //grouping: false,
- shadow: false,
- borderWidth: 0,
- },
- series: {
- pointPadding: 0,
- groupPadding: 0.075
- },
- },
- series: [{
- name: 'Obtained Value',
- color: '#e70033',
- dataLabels: {
- enabled: true,
- fontSize: 8,
- color: '#fff',
- align: 'right',
- format: '{y:.1f}%',
- style: {
- //fontWeight: 'bold'
- },
- y: -1
- },
- data: [
- @foreach ($outcomes as $index => $outcome)
- @if (is_array($outcomes_attempted_1) && array_key_exists($outcome->id, $outcomes_attempted_1) && $outcomes_attempted_1[$outcome->id] != 0)
- {{ ($outcomes_achieved_1[$outcome->id] / $outcomes_attempted_1[$outcome->id]) * 100 }},
- @else
- 0,
- @endif
- @endforeach
- ],
- pointPadding: 0,
- }, {
- name: 'Expected Value',
- color: '#555555',
- dataLabels: {
- enabled: true,
- fontSize: 8,
- color: '#fff',
- align: 'right',
- format: '{y:.1f}%',
- style: {
- //fontWeight: 'bold'
- },
- y: -1
- },
- data: [
- @foreach ($outcomes as $index => $outcome)
- @if (is_array($outcomes_attempted_1) && array_key_exists($outcome->id, $outcomes_attempted_1) && $outcomes_attempted_1[$outcome->id] != 0)
- {{ $outcome->expected_outcome }},
- @else
- 0,
- @endif
- @endforeach
- ],
- pointPadding: 0,
- }]
- });
-
- $('#graph_2').highcharts({
- chart: {
- type: 'bar',
- },
- title: {
- text:' '
- },
- xAxis: {
- categories: [
- @foreach ($outcomes as $outcome)
- "{{ $outcome->name }}",
- @endforeach
- ],
- labels: {
- style: {
- fontSize: '11px'
- },
- step: 1,
- useHTML: true,
- formatter: function() {
- return '<div style="width:200px; word-break:break; text-overflow:ellipsis; overflow:hidden;">' +
- this.value + '</div>';
- },
- }
- },
- yAxis: {
- min: 0,
- max: 100,
- title: {
- text: 'Percentage'
- }
- },
- tooltip: {
- headerFormat: '<span style="font-size:10px">{point.key}</span> <table > ',
- pointFormat: '<tr> <td style = "color:{series.color};padding:0" > {series.name}: </td>' +
- '<td style="padding:0"><b>{point.y:.2f}</b></td> </tr>',
- footerFormat: '</table>',
- shared: true,
- useHTML: true
- },
- plotOptions: {
- bar: {
- //grouping: false,
- shadow: false,
- borderWidth: 0,
- },
- series: {
- pointPadding: 0,
- groupPadding: 0.075
- },
- },
- series: [{
- name: 'Obtained Value',
- color: '#e70033',
- dataLabels: {
- enabled: true,
- fontSize: 8,
- color: '#fff',
- align: 'right',
- format: '{y:.1f}%',
- style: {
- //fontWeight: 'bold'
- },
- y: -1
- },
- data: [
- @foreach ($outcomes as $index => $outcome)
- @if (is_array($outcomes_attempted_2) && array_key_exists($outcome->id, $outcomes_attempted_2) && $outcomes_attempted_2[$outcome->id] != 0)
- {{ ($outcomes_achieved_2[$outcome->id] / $outcomes_attempted_2[$outcome->id]) * 100 }},
- @else
- 0,
- @endif
- @endforeach
- ],
- pointPadding: 0,
- }, {
- name: 'Expected Value',
- color: '#555555',
- dataLabels: {
- enabled: true,
- fontSize: 8,
- color: '#fff',
- align: 'right',
- format: '{y:.1f}%',
- style: {
- //fontWeight: 'bold'
- },
- y: -1
- },
- data: [
- @foreach ($outcomes as $index => $outcome)
- @if (is_array($outcomes_attempted_2) && array_key_exists($outcome->id, $outcomes_attempted_2) && $outcomes_attempted_2[$outcome->id] != 0)
- {{ $outcome->expected_outcome }},
- @else
- 0,
- @endif
- @endforeach
- ],
- pointPadding: 0,
- }]
- });
-
- var chart = $('#graph_1').highcharts();
- var titletext = $('#graph_1').highcharts().options.title.text;
- var newtitletext = titletext.replace("'", "\'");
- chart.setTitle({
- text: newtitletext
- });
- var chart = $('#graph_2').highcharts();
- var titletext = $('#graph_2').highcharts().options.title.text;
- var newtitletext = titletext.replace("'", "\'");
- chart.setTitle({
- text: newtitletext
- });
- $('.first').each(function(){
- $(this).addClass('active');
- })
- // Include dummy graph for outcomes
- @include('global.dummy-outcomes')
-
-
- });
-
-
- @stop
-
- @section('included-js')
- @include('global._datatables_js')
- <!-- HighCharts -->
- <script src="{{ asset('vendor/highcharts/highcharts.js') }}"></script>
- <!--script src="http://code.highcharts.com/modules/exporting.js"></script -->
-
- <!-- Datepicker -->
- <script src="{{ asset('vendor/jquery-ui-1.11.4.custom/jquery-ui.min.js') }}"></script>
-
- @stop
|