<div class="col-4">
    <div class="card h-charts mt-2">
        <div class="card-header d-flex justify-content-between">
            <span class="text-header-chart">Intervention</span>
            
            <a href="<?php echo e(url("dashboardscreening/intervention?")); ?>

            <?php
            if(isset($_GET['start_date']))
            {echo "start_date=".$_GET['start_date'];}
            if(isset($_GET['end_date']))
            {echo "&end_date=".$_GET['end_date'];}
            if(isset($_GET['province']))
            {echo "&province=".$_GET['province'];}
            if(isset($_GET['hospital']))
            {echo "&hospital=".$_GET['hospital'];}
            ?>
            " class="btn btn-light">Show all</a>
        </div>
        <div class="card-body p-0 mt-4">
            <div id="bar_intervention" data-colors='["--vz-success"]' class="apex-charts" dir="ltr"></div>
        </div>

    </div>
</div>



<script>
    var options = {
          series: [{
          data: [
            <?php $__currentLoopData = $procedure_sub; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php echo e($val); ?>,
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
          ]
        }],
          chart: {
          type: 'bar',
          height: 200,
          width: '100%',
        },
        plotOptions: {
            bar: {
                borderRadius: 4,
                horizontal: true,
                dataLabels: {
                    position: 'center',
                }
            }
        },
        dataLabels: {
            enabled: true,
            textAnchor: 'start',
            style: {
                colors: ['#fff']
            },
            formatter: function (val, opt) {
                return val
            },
            offsetX: 0
        },
        fill: {
            colors:['#0ab39c'],
        },
        xaxis: {
          categories: [
            <?php $__currentLoopData = $procedure_sub; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    '<?php echo e($key); ?>',
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
          ],
          labels: {formatter: function (value) {return Math.floor(value);}}
        }
        };

        var chart = new ApexCharts(document.querySelector("#bar_intervention"), options);
        chart.render();
</script>
<?php /**PATH D:\laragon\htdocs\screening\resources\views/dashboardscreening/11_intervention.blade.php ENDPATH**/ ?>