<?php $__env->startSection('title', 'Categorie - Vizualizari #' . $category->id); ?>

<?php $__env->startSection('content_header', 'Categorie <small>vizualizari categorie 30 de zile</small>'); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">
        <section class="col-lg-12">
            <div class="nav-tabs-custom">
                <?php echo $__env->make('admin.categories._partials.tabs', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <div class="tab-content">
                    <div class="tab-pane active">
                        <div class="chart">
                            <canvas id="viewsChart" height="400"></canvas>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('bottom_scripts'); ?>
    <script>
        $(function () {
            var categoryStatsData = {
                labels: ["<?php echo implode('","', array_keys($statistics['daily'])); ?>"],
                datasets: [
                    {
                        label: "Views for last 15 days",
                        fillColor: "rgba(151,187,205,0.2)",
                        strokeColor: "rgba(151,187,205,1)",
                        pointColor: "rgba(151,187,205,1)",
                        pointStrokeColor: "#fff",
                        pointHighlightFill: "#fff",
                        pointHighlightStroke: "rgba(151,187,205,1)",
                        data: [<?php echo e(implode(',', array_values($statistics['daily']))); ?>]
                    }
                ]
            };

            var viewsChartOptions = {
                showScale: true,
                scaleShowGridLines: false,
                scaleGridLineColor: "rgba(0,0,0,.05)",
                scaleGridLineWidth: 1,
                scaleShowHorizontalLines: true,
                scaleShowVerticalLines: true,
                bezierCurve: true,
                bezierCurveTension: 0.3,
                pointDot: true,
                pointDotRadius: 4,
                pointDotStrokeWidth: 1,
                pointHitDetectionRadius: 20,
                datasetStroke: true,
                datasetStrokeWidth: 2,
                datasetFill: false,
                legendTemplate: "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].lineColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%><%}%></li><%}%></ul>",
                maintainAspectRatio: false,
                responsive: true
            };

            var viewsChartCanvas = $("#viewsChart").get(0).getContext("2d");
            var viewsChart = new Chart(viewsChartCanvas);
            viewsChart.Line(categoryStatsData, viewsChartOptions);
        });
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>