| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- @extends('eep-hr.layout.master')
- @section('ptitle', 'EEP')
- @section('page_title', 'Dashboard')
- @section('subpage', 'Graph & Summary Report')
- @section('img_profile', asset($user->staffDetail->user_pic))
- @section('login_name', $user->staffDetail->name )
- @section('last_login', $user->last_login_at )
-
- @section('content')
- <div class="fluid">
-
- <!-- Donut -->
- <div class="widget grid4 chartWrapper">
- <div class="whead"><h6>Form's Statistics Overview</h6></div>
- <div class="body"><canvas id="pieChart1" width="400" height="400"></canvas></div>
- </div>
-
- <!-- Auto updating chart -->
- <div class="widget grid8 chartWrapper">
- <div class="whead"><h6>Form's Statistics by Month (2019)</h6></div>
- <div class="body"><center><canvas id="chart1" width="700" height="400"></canvas></center></div>
- </div>
-
- </div>
- @endsection
-
- @section('external_js')
- <script type="text/javascript">
-
- var total = <?php echo $total ?>;
- var rec = <?php echo $rec ?>;
- var dealer = <?php echo $dealer ?>;
- var normal = <?php echo $normal ?>;
- var rejected = <?php echo $rejected ?>;
-
- var ctx = document.getElementById('pieChart1');
- var data = {
- datasets: [{
- fill: true,
- backgroundColor: [
- 'Yellow',
- 'Green',
- 'Brown',
- 'Red',
- ],
- hoverBackgroundColor:[
- 'Yellow',
- 'Green',
- 'Brown',
- 'Red',
- ],
- data: [rec, dealer, normal, rejected]
- }],
- // These labels appear in the legend and in the tooltips when hovering different arcs
- labels: [
- 'Total Rectification ('+rec+')',
- 'Total Dealer ('+dealer+')',
- 'Total Non Dealer ('+normal+')',
- 'Total Rejected ('+rejected+')'
- ]
- };
- var options = {
- responsive: true,
- // title: {
- // display: true,
- // text: 'What happens when you lend your favorite t-shirt to a girl ?',
- // position: 'top'
- // },
- // rotation: -0.7 * Math.PI
- };
- var myPieChart = new Chart(ctx, {
- type: 'doughnut',
- data: data,
- options: options
- });
-
- /***************************************/
- var ctx2 = document.getElementById('chart1');
- var data = '';
- var myChart = new Chart(ctx2, {
- type: 'bar',
- data: {
- labels: ['January', 'Febuary', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
- datasets: [
- {
- label: '# of Forms Submitted (AEP)',
- data: <?php echo json_encode($finalD5) ?>,
- backgroundColor: [
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)',
- 'rgba(54, 162, 235, 0.2)'
- ],
- borderColor: [
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)',
- 'rgba(54, 162, 235, 1)'
- ],
- borderWidth: 1
- }]
- },
- options: {
- responsive: false,
- scales: {
- xAxes: [{
- ticks: {
- maxRotation: 90,
- minRotation: 80
- },
- }],
- yAxes: [{
- ticks: {
- beginAtZero: true
- },
- }]
- }
- }
- });
- </script>
- @endsection
|