Viewing file: 9359f2b6b01491781147a4dfe6c4662642b8e66e.php (1.65 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<div class="card">
<div class="card-header">
<h5 class="font-weight-600 c-gray-5"><?php echo e(__('ORDER STATUS THIS MONTH')); ?></h5>
</div>
<div class="card-block h-360">
<?php if(max($orderStatus['count'])): ?>
<canvas id="chart-donut-1" class="w-100 h-300px"></canvas>
<?php else: ?>
<h6 class="text-secondary"><?php echo e(__('No data found.')); ?></h6>
<?php endif; ?>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
var bar = document.getElementById("chart-donut-1").getContext('2d');
var data = {
labels: <?php echo json_encode($orderStatus['status'] ?? null, 15, 512) ?>,
datasets: [{
data: <?php echo json_encode($orderStatus['count'] ?? 0, 15, 512) ?>,
backgroundColor: [
"#fcca19",
"#FFA826",
"#E393FF",
"#00DFFF",
"#33C172"
],
hoverBackgroundColor: [
"#fcca19",
"#FFA826",
"#E393FF",
"#00DFFF",
"#33C172"
]
}]
};
var myPieChart = new Chart(bar, {
type: 'doughnut',
data: data,
responsive: true,
options: {
maintainAspectRatio: false,
}
});
});
</script>
<?php /**PATH /home/picotech/domains/ecom1.picotech.app/public_html/resources/views/admin/dashboxes/donut-chart.blade.php ENDPATH**/ ?>
|