Files
monpas/application/views/monpas/compactsop/ijktabelcompact.php
T

282 lines
10 KiB
PHP

<div class="sopOnderdeelBlok">
<div class="sopTitelHolder">
<?php if($naam){ ?>
<p class="sopTitel" ><?php echo $naam ; ?></p>
<?php if ($data['lijsten'][0]){ ?>
<p class="subTitel1" ><?php echo $data['versienaam']?>
<?php foreach($data['lijsten'] as $index => $lijst){ ?>
<p class="subTitel2"><?php echo $lijst->vantm ?> (a.: <?php echo $lijst->ambities->gemscore ?>)</p>
<?php }; ?>
<?php }; ?>
<?php }; ?>
</div>
<?php if($chartid){ ?>
<div class="sopKaderGrafiek highcharts-background"
id="<?= $chartid ?>"
style=" text-align:center; ">
</div>
<?php }; ?>
<script>
<?php if ($data['lijsten']){ ?>
$(function(){
fFillGraph4=function(){
var xas = [];
var verkorteVersies = [];
var balkGegevens = [];
var lijnGegevens = [];
<?php foreach($data['lijsten'] as $index => $lijst){ ?>
var indexnummer = <?= $index?>;
var labels = [];
var scores = [];
var ambities = [];
var ambitiewaarde =<?=intval($lijst->ambities->gemscore) ?>;
var ambitienaam = 'p. ' + '<?=$lijst->periodenummer ?>' + ', ' + '<?=$lijst->ambities->ambitievan ?>' + '-ambitie';
var xastitel = '';
<?php if($lijst->label){ ?>
var xastitel = '<?php echo $lijst->label ?>';
<?php } ?>
<?php foreach($lijst->scores as $score){
$omschrijving = "gemiddelde";
if(isset($score->omschrijving)){
$omschrijving = $score->omschrijving;
$kleur = '#808080';}
if(isset($score->kleur) && $score->disabled == 'F' && $score->disablenvt =='F'){ $kleur = $score->kleur;
};
?>
labels.push(<?php $score->nummer ?>);
ambities.push(ambitiewaarde);
<?php if(! isset($score->gem) || $score->gem == 0 ){ ?>
scores.push({
y: null,
color: '<?=$kleur ?>',
name: '<?= $score->nummer ?>',
});
<?php }
else{?>
scores.push({
y: <?= floatval($score->gem) ?>,
color: '<?= $kleur ?>',
name: '<?= $score->nummer ?>',
});
<?php }
} // foreach lijstscores ?>
labels.unshift(' ');
var legescore ={
y : null,
color : 'transparent',
name : 'x'
};
scores.unshift(legescore);
labels.push(' ');
scores.push(legescore);
ambities.unshift(ambitiewaarde);
ambities.push(ambitiewaarde);
var xas = [];
balkGegevens.push({
dataLabels: {
enabled : true,
nullFormat: '',
format: '<span style="font-size: 9px; font-weight: normal;">'+ '<?=$lijst->periodenummer ?>'+'</span>',
},
type : 'column',
name : '<?=$lijst->vantm ?>',
color : '#f8f7f1',
backgroundColor: '#e6e6e6',
data : scores
});
var xas = [];
if (balkGegevens[0]){
$.each(balkGegevens[0].data,function(i,p){
if (p.name=== 'x') xas.push('');
else xas.push(p.name);
});
}
lijnGegevens = ({
dataLabels: {
format: ''
},
label: {
format: '<span style="font-size: 9px; font-weight: normal;">'+ '<?=$lijst->ambities->ambitievan ?>'+'</span>'
},
type: 'spline',
name: ambitienaam,
data: ambities //ambities
});
balkGegevens.push(lijnGegevens);
<?php } // foreach lijsten ?>
// });
var ijkgrafiek;
ijkgrafiek = Highcharts.chart('<?= $chartid ?>', {
chart:{
// width:350,
margin: [0,0,20,0],
animation: false,
backgroundColor: '#e6e6e6',
options3d: {
enabled: true,
alpha: 15,
beta: 15,
viewDistance: 25,
depth: 40
},
},
title:{
text:''
},
credits: {
enabled: false
},
xAxis: {
type: 'category',
categories: xas,
y: 20,
labels:{
skew3d: true,
style:{
fontSize: '8px'
}
}
},
yAxis: {
min:0,
max: 100,
y: 20,
title: false,
labels:{
skew3d: true,
style:{
fontSize: '8px'
}
}
},
legend: {
enabled: false
},
plotOptions: {
column:{
pointPadding: 0.05,
borderWidth:0
},
series:{
groupPadding: 0.05,
animation: false,
// label:{
// connectorAllowed: false,
// enabled: true,
// formatter: function(){
// return 'gelukt'
// }
// },
dataLabels: {
enabled: true,
inside: true,
align: 'center',
verticalAlign: 'top',
color: '#404040',
style: {
textOutline: false
}
}
},
spline: {
pointStart: 0,
marker: {
enabled: false
},
}
},
series: balkGegevens,
// showInLegend: false
});
}()
});
<?php } ?>
</script>
<div class="sopKaderTabel" >
<?php if ($data['lijsten'][0]->scores){ ?>
<table class="sopTabel" style="width:355px; " >
<thead >
<tr style="">
<th style="width: 20px; padding-left:3px; ">nr</th>
<th style="width: 275px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding-left:3px; "> <?=$data['lijsten'][0]->label?></th>
<?php foreach ($data['lijsten'] as $lijst){ ?>
<th style=" width: 30px;
padding-right: 3px;">
<?php echo 'p '.$lijst->periodenummer; ?>
</th>
<?php }; // foreach ?>
</tr>
</thead>
<tbody >
<?php $i = 0;
foreach( $data['lijsten'][0]->scores as $score){?>
<tr >
<td style=" padding-left: 3px; " ><?php if($score->nummer != 'gem'){ echo $score->nummer . '.';}?>
</td>
<td style="overflow-x: hidden;
overflow-y: hidden;
text-overflow: ellipsis;
white-space: nowrap;" >
<?php echo isset($score->omschrijving) ? $score->omschrijving: 'Gemiddelde'?>
</td>
<?php foreach ($data['lijsten'] as $lijst){
$kleur = $lijst->scores[$i]->disabled == 'T' || $lijst->scores[$i]->disablenvt == 'T' ? '' : (isset($lijst->scores[$i]->kleur) ? $lijst->scores[$i]->kleur : '');
$gem = $lijst->scores[$i]->disabled == 'T' ? 'uit' : ($lijst->scores[$i]->disablenvt == 'T' ? 'nvt' : (isset($lijst->scores[$i]->gem) ? $lijst->scores[$i]->gem : '')); ?>
<td style="background-color: <?=$kleur ?> !important;
padding-right: 3px;
text-align: right" >
<?=$gem?>
</td>
<?php }; // foreach
$i++; ?>
</tr>
<?php ;} ; ?>
</tbody>
<!-- <tr >-->
<!-- <td colspan="8"-->
<!-- class="inforegel">Scores in procenten</td>-->
<!-- </tr>-->
</table>
<span>scores in procenten</span>
<?php }; ?> <!-- if lijst[0]->scores -->
</div>
</div>