228 lines
7.0 KiB
PHP
228 lines
7.0 KiB
PHP
<!doctype html>
|
|
<html>
|
|
<head>
|
|
|
|
|
|
|
|
<script type="text/javascript" src="<?php echo $this->config->item('vendor_url'); ?>/js_lib/jquery.min.js?v=1.17.26"></script>
|
|
<script src="<?php echo $this->config->item('vendor_url'); ?>/js_lib/Highcharts/code/highcharts.js"></script>
|
|
<script src="<?php echo $this->config->item('vendor_url'); ?>/js_lib/Highcharts/code/highcharts-3d.js"></script>
|
|
|
|
<style>
|
|
body {
|
|
font-family: 'Verdana', 'sans-serif';
|
|
font-size: 12px;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div>
|
|
<div id="chartSopIJk" style="width: 580px; height:285px; margin: 0 auto; background-color: #f8f7f1;"> </div>
|
|
|
|
<?php if ($data['lijsten']){?>
|
|
|
|
<div><span style="font-weight: bold"><?php echo $data ['versienaam']; ?></span>
|
|
<span style="font-weight: bold"><?php echo $data['lijsten'][0]->vorm == 1 ? ', schoolversie' : ', indivduele versie';?></span>
|
|
</div>
|
|
<div>
|
|
<?php foreach($data['lijsten'] as $index => $lijst){
|
|
if ($index == 1 && $data['aantal']== 2) echo 'Vergelijking:';
|
|
if ($index == 1 && $data['aantal'] != 2) echo 'Vergelijkingen:';
|
|
?>
|
|
<p><?php echo $lijst->vantm ?></p>
|
|
<?php }; ?>
|
|
</div>
|
|
<?php } // if datalijsten ?>
|
|
</div>
|
|
<script>
|
|
<?php if ($data['lijsten']){ ?>
|
|
$(function(){
|
|
fFillGraph20=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 xastitel = '';
|
|
<?php if($lijst->label){ ?>
|
|
var xastitel = '<?php echo $lijst->label ?>';
|
|
<?php } ?>
|
|
|
|
<?php foreach($lijst->scores as $index2 => $score){
|
|
?>
|
|
|
|
labels.push('<?= $score->nummer ?>');
|
|
<?php if(intval($score->gem) > 0){ ?>
|
|
scores.push({
|
|
y: <?= intval($score->gem) ?>,
|
|
color: '<?=$score->kleur ?>',
|
|
name: '<?= $score->nummer ?>',
|
|
});
|
|
<?php }
|
|
if (intval($score->gem) == 0){ ?>
|
|
scores.push({
|
|
y: null,
|
|
color: '<?=$score->kleur ?>',
|
|
name: '<?= $score->nummer ?>',
|
|
});
|
|
<?php } //if
|
|
} // foreach lijstscores ?>
|
|
|
|
verkorteVersies.push(<?= $lijst->periodenummer ?>);
|
|
var ambitiewaarde =<?=$data['lijsten'][0]->ambities->gemscore; ?>;
|
|
ambities.push(
|
|
{ y: <?=$data['lijsten'][0]->ambities->gemscore; ?>,
|
|
color: '#000000',
|
|
name: ''
|
|
|
|
}
|
|
);
|
|
|
|
labels.unshift(' ');
|
|
var legescore ={
|
|
y : 0,
|
|
color : 'transparent',
|
|
name : '0'
|
|
};
|
|
|
|
scores.unshift(legescore);
|
|
verkorteVersies.unshift(<?= $lijst->periodenummer ?>);
|
|
|
|
labels.push(' ');
|
|
scores.push(legescore);
|
|
verkorteVersies.push(<?=$lijst->periodenummer ?>);
|
|
|
|
balkGegevens[indexnummer] =({
|
|
dataLabels: {
|
|
format: '<span style="font-size: 5px;">{point.versie}</span>'
|
|
},
|
|
type : 'column',
|
|
name : verkorteVersies,
|
|
backgroundColor: '#e6e6e6',
|
|
data : scores
|
|
});
|
|
|
|
<?php } // foreach lijsten ?>
|
|
|
|
var extralijn = {
|
|
y: ambitiewaarde,
|
|
name: '',
|
|
};
|
|
ambities.unshift(extralijn);
|
|
ambities.push(extralijn);
|
|
var splinedata=[];
|
|
var xas = [];
|
|
if (balkGegevens[0]){
|
|
$.each(balkGegevens[0].data,function(i,p){
|
|
if (p.name=== '0') xas.push('');
|
|
else xas.push(p.name);
|
|
|
|
splinedata.push(ambitiewaarde)
|
|
});
|
|
}
|
|
lijnGegevens = ({
|
|
dataLabels: {
|
|
format: ''
|
|
},
|
|
type: 'spline',
|
|
name: verkorteVersies,
|
|
data: splinedata //ambities
|
|
});
|
|
|
|
balkGegevens.push(lijnGegevens);
|
|
// });
|
|
|
|
|
|
var ijkgrafiek;
|
|
ijkgrafiek = Highcharts.chart('chartSopIJk', {
|
|
chart:{
|
|
animation: false,
|
|
type: 'column',
|
|
backgroundColor: 'transparent',
|
|
options3d: {
|
|
enabled: true,
|
|
alpha: 15,
|
|
beta: 15,
|
|
depth: 50,
|
|
viewDistance: 25
|
|
}
|
|
},
|
|
title:{
|
|
text:''
|
|
},
|
|
credits: {
|
|
enabled: false
|
|
},
|
|
xAxis: {
|
|
type: 'category',
|
|
categories: xas,
|
|
labels:{
|
|
style:{
|
|
fontSize: '10px'
|
|
}
|
|
}
|
|
},
|
|
yAxis: {
|
|
min:0,
|
|
max: 100,
|
|
title: false,
|
|
labels:{
|
|
style:{
|
|
fontSize: '10px'
|
|
|
|
}
|
|
}
|
|
},
|
|
legend: {
|
|
enabled: false
|
|
},
|
|
plotOptions: {
|
|
column:{
|
|
pointPadding: 0.05,
|
|
borderWidth:0
|
|
},
|
|
series:{
|
|
groupPadding: 0.05,
|
|
animation: false,
|
|
dataLabels: {
|
|
enabled: true,
|
|
inside: true,
|
|
align: 'center',
|
|
verticalAlign: 'top',
|
|
color: '#404040',
|
|
style: {
|
|
textOutline: false
|
|
}
|
|
}
|
|
|
|
},
|
|
spline: {
|
|
color: 'grey',
|
|
pointStart: 0,
|
|
marker: {
|
|
enabled: false
|
|
}
|
|
}
|
|
},
|
|
series: balkGegevens,
|
|
showInLegend: false
|
|
});
|
|
|
|
}()
|
|
});
|
|
<?php } ?>
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|