%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/storage/framework/views/ |
Upload File : |
<?php
$valuesTotal = array_sum($values);
?>
<?php if($valuesTotal > 0): ?>
<div class="m-auto" style="height: <?php echo e($attributes['height']); ?>px; width: <?php echo e($attributes['width']); ?>px">
<canvas <?php echo e($attributes); ?>></canvas>
</div>
<script>
var ctx = document.getElementById("<?php echo e($attributes['id']); ?>");
var myChart = new Chart(ctx, {
type: 'pie',
data: {
labels: [
<?php $__currentLoopData = $labels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
"<?php echo e($label); ?>",
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
],
datasets: [
{
label: 'Dataset 1',
data: [
<?php $__currentLoopData = $values; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php echo e($value); ?>,
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
],
backgroundColor: [
<?php $__currentLoopData = $colors; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $color): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
"<?php echo e($color); ?>",
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
],
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
},
title: {
display: false,
text: 'Chart.js Pie Chart'
}
}
},
});
</script>
<?php else: ?>
<div class="text-center text-lightest p-20"
style="height: <?php echo e($attributes['height']); ?>px">
<i class="side-icon f-21 bi bi-pie-chart"></i>
<div class="f-15 mt-4">
- <?php echo app('translator')->get('messages.notEnoughData'); ?> -
</div>
</div>
<?php endif; ?>
<?php /**PATH /home/addictionfreeind/public_html/admin1/resources/views/components/pie-chart.blade.php ENDPATH**/ ?>