<?php $__env->startSection('content'); ?>
<main class="py-4" style="flex: 1;">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-md-6 py-4">
                <div class="card">
                    <div class="card-header"><?php echo e(__('การเช้าใช้งาน')); ?></div>

                    <div class="card-body bg-white" style="display: flex; width: 100%; height: 450px; justify-content: center; align-items: center;">
                        <canvas id="myChart"></canvas>
                    </div>
                </div>
            </div>
            <div class="col-md-6 py-4">
                <div class="card">
                    <div class="card-header"><?php echo e(__('ประเภทเกมยอดนิยม')); ?></div>

                    <div class="card-body bg-white" style="display: flex; width: 100%; height: 450px; justify-content: center; align-items: center;">
                        <canvas id="myChart1"></canvas>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
    const chartDataLine = JSON.parse(<?php echo json_encode($data_line, 15, 512) ?>);

    const ctx = document.getElementById('myChart').getContext('2d');
    new Chart(ctx, {
        type: 'line',
        data: chartDataLine,
        options: {
            responsive: true,
            scales: {
                y: {
                    beginAtZero: true
                }
            }
        }
    });

    const chartData = JSON.parse(<?php echo json_encode($chartData, 15, 512) ?>);

    const ctx1 = document.getElementById('myChart1').getContext('2d');
    new Chart(ctx1, {
        type: 'polarArea',
        data: chartData,
        options: {}
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\quiz-game\resources\views/dashboard.blade.php ENDPATH**/ ?>