|
|
@ -92,13 +92,10 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Area Chart --> |
|
|
|
|
|
|
|
<div class="col-xl-8 col-lg-7"> |
|
|
|
<div class="col-xl-8 col-lg-7"> |
|
|
|
<div class="card shadow mb-4"> |
|
|
|
<div class="card shadow mb-4"> |
|
|
|
<!-- Card Header - Dropdown --> |
|
|
|
|
|
|
|
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> |
|
|
|
<div class="card-header py-3 d-flex flex-row align-items-center justify-content-between"> |
|
|
|
<h6 class="m-0 font-weight-bold text-primary">Grafik Peminjaman VS Pengembalian |
|
|
|
<h6 class="m-0 font-weight-bold text-primary">Grafik Peminjaman VS Pengembalian</h6> |
|
|
|
</h6> |
|
|
|
|
|
|
|
<div class="dropdown no-arrow"> |
|
|
|
<div class="dropdown no-arrow"> |
|
|
|
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" |
|
|
|
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" |
|
|
|
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
|
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
@ -114,17 +111,18 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- Card Body --> |
|
|
|
@php |
|
|
|
|
|
|
|
$chartData = app('App\Http\Controllers\HomeController')->generateChartData(); |
|
|
|
|
|
|
|
@endphp |
|
|
|
|
|
|
|
|
|
|
|
<div class="card-body"> |
|
|
|
<div class="card-body"> |
|
|
|
<div class="chart-bar"> |
|
|
|
<canvas id="ChartAssetStatus" style="max-height: 500px;"></canvas> <!-- Atur tinggi chart --> |
|
|
|
<canvas id="ChartAssetStatus"></canvas> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Pie Chart --> |
|
|
|
<!-- Pie Chart --> |
|
|
|
<div class="col-xl-4 col-lg-5"> |
|
|
|
<div class="col-xl-4 col-lg-5"> |
|
|
|
<div class="card shadow mb-4"> |
|
|
|
<div class="card shadow mb-4"> |
|
|
@ -169,23 +167,23 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
@push('script') |
|
|
|
@push('script') |
|
|
|
{{-- <script> |
|
|
|
<script> |
|
|
|
document.addEventListener('DOMContentLoaded', function() { |
|
|
|
document.addEventListener('DOMContentLoaded', function() { |
|
|
|
var ctx = document.getElementById('ChartAssetStatus').getContext('2d'); |
|
|
|
var ctx = document.getElementById('ChartAssetStatus').getContext('2d'); |
|
|
|
|
|
|
|
|
|
|
|
var myChart = new Chart(ctx, { |
|
|
|
var myChart = new Chart(ctx, { |
|
|
|
type: 'bar', // Atur jenis grafik sesuai kebutuhan Anda |
|
|
|
type: 'bar', |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
labels: {!! json_encode($chartData['months']) !!}, |
|
|
|
labels: {!! json_encode($chartData['monthNames']) !!}, |
|
|
|
datasets: [{ |
|
|
|
datasets: [{ |
|
|
|
label: 'Exit Pic', |
|
|
|
label: 'Peminjaman', |
|
|
|
data: {!! json_encode($chartData['exitPicData']) !!}, |
|
|
|
data: {!! json_encode($chartData['exitData']) !!}, |
|
|
|
backgroundColor: 'rgba(75, 192, 192, 0.2)', |
|
|
|
backgroundColor: 'rgba(75, 192, 192, 0.2)', |
|
|
|
borderColor: 'rgba(75, 192, 192, 1)', |
|
|
|
borderColor: 'rgba(75, 192, 192, 1)', |
|
|
|
borderWidth: 1 |
|
|
|
borderWidth: 1 |
|
|
|
}, { |
|
|
|
}, { |
|
|
|
label: 'Enter Pic', |
|
|
|
label: 'Pengembalian', |
|
|
|
data: {!! json_encode($chartData['enterPicData']) !!}, |
|
|
|
data: {!! json_encode($chartData['enterData']) !!}, |
|
|
|
backgroundColor: 'rgba(255, 159, 64, 0.2)', |
|
|
|
backgroundColor: 'rgba(255, 159, 64, 0.2)', |
|
|
|
borderColor: 'rgba(255, 159, 64, 1)', |
|
|
|
borderColor: 'rgba(255, 159, 64, 1)', |
|
|
|
borderWidth: 1 |
|
|
|
borderWidth: 1 |
|
|
@ -200,6 +198,6 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
</script> --}} |
|
|
|
</script> |
|
|
|
@endpush |
|
|
|
@endpush |
|
|
|
@endsection |
|
|
|
@endsection |
|
|
|