| Server IP : 127.0.0.1 / Your IP : 192.168.99.1 Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9 System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64 User : Administrator ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /laragon/www/sop/application/views/report/ |
Upload File : |
<div class="container-fluid">
<!-- Page Heading -->
<h1 class="h3 mb-2 text-gray-800"><?= $title; ?></h1>
<p class="mb-4"><?= $title2; ?></a></p>
<form action="<?= base_url('report/chart'); ?>" method="post">
<div class="row mb-3">
<label class="ml-3">Select Year : </label>
<select id="selYear_sop" style="width: 100px" class="form-control ml-2" name="selYear_sop">
<?php
if (isset($_POST['selYear_sop'])){
echo '<option value='.$_POST['selYear_sop'].' selected>'.$_POST['selYear_sop'].'</option>';
}
foreach($tahun_act as $t){
?>
<option value="<?= $t['tahun']; ?>"><?php echo $t['tahun']; ?></option>
<?php } ?>
</select>
<input type="submit" value="Filter" class="ml-2">
</div>
</form>
<!-- Content Row -->
<div class="row">
<div class="col-xl-6 col-lg-6">
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Number of SOP Activity</h6>
</div>
<div class="card-body">
<div class="chart-bar">
<canvas id="chart1"></canvas>
</div>
<hr>
<code>Grafik jumlah Pengajuan Per Bulan</code>
</div>
</div>
</div>
<!-- Donut Chart -->
<div class="col-xl-6 col-lg-6">
<div class="card shadow mb-4">
<!-- Card Header - Dropdown -->
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Target SOP</h6>
</div>
<!-- Card Body -->
<div class="card-body" style="height: 418px">
<div class="chart-pie py-2">
<canvas id="chart2"></canvas>
</div>
<hr>
<code>Persentase Pencapaian Target SOP Pengajuan</code>
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</div>
<!-- End of Main Content -->
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
<script>
var ctx = document.getElementById('chart1').getContext('2d');
var chart = new Chart(ctx, {
type: 'bar',
data: {
labels: [
<?php
if (count($act_grafik)>0) {
foreach ($act_grafik as $data) {
echo "'" .$data['blth'] ."',";
}
}
?>
],
datasets: [{
label: 'SOP',
backgroundColor: '#4e73df',
borderColor: '#93C3D2',
data: [
<?php
if (count($act_grafik)>0) {
foreach ($act_grafik as $data) {
echo $data['jml'] . ", ";
}
}
?>
]
}]
},
});
var ctx = document.getElementById('chart2').getContext('2d');
var chart = new Chart(ctx, {
type: 'doughnut',
data: {
labels: [
<?php
if (count($act_grafik_t)>0) {
foreach ($act_grafik_t as $data2) {
echo "'" .$data2['STATUS'] ."',";
}
}
?>
],
datasets: [{
label: 'SOP',
backgroundColor: ['#58D68D', '#4e73df', '#e66022', '#8c807a'],
hoverBackgroundColor: ['#ABEBC6', '#96aceb', '#ed976f', '#d6cfcb'],
hoverBorderColor: "rgba(234, 236, 244, 1)",
data: [
<?php
if (count($act_grafik_t)>0) {
foreach ($act_grafik_t as $data2) {
echo $data2['total'] . ", ";
}
}
?>
]
}]
},
options: {
maintainAspectRatio: false,
tooltips: {
backgroundColor: "rgb(255,255,255)",
bodyFontColor: "#858796",
borderColor: '#dddfeb',
borderWidth: 1,
xPadding: 15,
yPadding: 15,
displayColors: false,
caretPadding: 10,
},
legend: {
display: true
},
cutoutPercentage: 70,
},
});
</script>