<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;

/* suivi_pta/graph_global.html.twig */
class __TwigTemplate_e526ff5230d6322bb0daf312c43ee1a8 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'page_title' => [$this, 'block_page_title'],
            'page_content' => [$this, 'block_page_content'],
            'javascripts' => [$this, 'block_javascripts'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 1
        return "@AdminLTE/layout/suiodd-layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/layout/suiodd-layout.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("TEF Global", [], "messages");
        yield from [];
    }

    // line 6
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 7
        yield "
    ";
        // line 8
        if ((($tmp = ($context["barChart"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 9
            yield "    ";
            yield from $this->load("suivi_pta/graph_global.html.twig", 9, "35990089")->unwrap()->yield($context);
            // line 20
            yield "    ";
        }
        // line 21
        yield "
";
        yield from [];
    }

    // line 25
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 26
        yield "    <script>
        \$(function () {
            var barChartData = {
                labels  : ";
        // line 29
        if ((($tmp = ($context["barChart"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode((($_v0 = ($context["barChart"] ?? null)) && is_array($_v0) || $_v0 instanceof ArrayAccess ? ($_v0["labels"] ?? null) : null));
        }
        yield ",
                datasets: [
                    {
                        label               : 'TEF PTA',
                        backgroundColor     : '#0099ee', 
                        borderColor         : '#0099ee', 
                        borderWidth         : 1,
                        pointRadius         : false,
                        maxBarThickness     : 75,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : ";
        // line 42
        if ((($tmp = ($context["barChart"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode((($_v1 = ($context["barChart"] ?? null)) && is_array($_v1) || $_v1 instanceof ArrayAccess ? ($_v1["dataset1"] ?? null) : null));
        }
        yield ", //[15, 78, 75, 51],
                    },
                    {
                        label               : 'TEF OSC',
                        backgroundColor     : '#ff407e', 
                        borderColor         : '#ff407e', 
                        borderWidth         : 1,
                        pointRadius         : false,
                        maxBarThickness     : 75,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : ";
        // line 55
        if ((($tmp = ($context["barChart"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode((($_v2 = ($context["barChart"] ?? null)) && is_array($_v2) || $_v2 instanceof ArrayAccess ? ($_v2["dataset2"] ?? null) : null));
        }
        yield ",//[15, 78, 75, 51],
                    }
                 ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                scales: {
                    xAxes: [{
                        stacked: true,
                    }],
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        },
                        stacked: true,
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                       // backgroundColor: 'red',
\t\t\t\t\t\t//borderColor: 'white',
\t\t\t\t\t\t//borderRadius: 25,
\t\t\t\t\t\t//borderWidth: 2,
                        color: 'white',
                        font: {
                            weight: 'bold',
                            size: 12,
                        },
                        align: 'start',
\t\t\t\t\t\tanchor: 'end'
                    }
                }
            }
        
            var barChart = new Chart(barChartCanvas, {
                type: 'bar', 
                data: barChartData,
                options: barChartOptions
            })
      
        })
    </script>

    <script src=\"";
        // line 104
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/chart.js/Chart.min.js"), "html", null, true);
        yield "\"></script>
    <script src=\"";
        // line 105
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js"), "html", null, true);
        yield "\"></script>    
";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "suivi_pta/graph_global.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  194 => 105,  190 => 104,  136 => 55,  118 => 42,  100 => 29,  95 => 26,  88 => 25,  82 => 21,  79 => 20,  76 => 9,  74 => 8,  71 => 7,  64 => 6,  53 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "suivi_pta/graph_global.html.twig", "/var/www/html/templates/suivi_pta/graph_global.html.twig");
    }
}


/* suivi_pta/graph_global.html.twig */
class __TwigTemplate_e526ff5230d6322bb0daf312c43ee1a8___35990089 extends Template
{
    private Source $source;
    /**
     * @var array<string, Template>
     */
    private array $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'box_body' => [$this, 'block_box_body'],
        ];
    }

    protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
    {
        // line 9
        return "@AdminLTE/Widgets/box-widget.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $this->parent = $this->load("@AdminLTE/Widgets/box-widget.html.twig", 9);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 10
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 11
        yield "            <div class=\"row\">
                <div class=\"chart\" style=\"position: relative; height:80vh; width:100%\">
                    <canvas id=\"barChart\"></canvas>
                    <!--canvas id=\"myChart\" width=\"400\" height=\"400\"></canvas-->
                    <div id=\"bar-chart\" style=\"height: 300px;\"></div>
                </div>
            </div>
        ";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "suivi_pta/graph_global.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  272 => 11,  265 => 10,  254 => 9,  194 => 105,  190 => 104,  136 => 55,  118 => 42,  100 => 29,  95 => 26,  88 => 25,  82 => 21,  79 => 20,  76 => 9,  74 => 8,  71 => 7,  64 => 6,  53 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("", "suivi_pta/graph_global.html.twig", "/var/www/html/templates/suivi_pta/graph_global.html.twig");
    }
}
