Files
growup-crm/storage/framework/views/519c1b7909e3ba8de0a02909068db720.php
2026-02-02 15:31:15 -03:00

69 lines
2.0 KiB
PHP
Executable File

<v-charts-doughnut <?php echo e($attributes); ?>></v-charts-doughnut>
<?php if (! $__env->hasRenderedOnce('f3013e83-e69b-4a08-b739-f04830f0e8d6')): $__env->markAsRenderedOnce('f3013e83-e69b-4a08-b739-f04830f0e8d6');
$__env->startPush('scripts'); ?>
<!-- SEO Vue Component Template -->
<script
type="text/x-template"
id="v-charts-doughnut-template"
>
<canvas
:id="$.uid + '_chart'"
class="flex w-full max-w-full items-end"
></canvas>
</script>
<script type="module">
app.component('v-charts-doughnut', {
template: '#v-charts-doughnut-template',
props: {
labels: {
type: Array,
default: [],
},
datasets: {
type: Array,
default: true,
},
},
data() {
return {
chart: undefined,
}
},
mounted() {
this.prepare();
},
methods: {
prepare() {
if (this.chart) {
this.chart.destroy();
}
this.chart = new Chart(document.getElementById(this.$.uid + '_chart'), {
type: 'doughnut',
data: {
labels: this.labels,
datasets: this.datasets,
},
options: {
plugins: {
legend: {
display: false
},
},
}
});
}
}
});
</script>
<?php $__env->stopPush(); endif; ?><?php /**PATH /var/www/html/packages/Webkul/Admin/src/Resources/views/components/charts/doughnut.blade.php ENDPATH**/ ?>