<?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_ind/graph_indicator.html.twig */
class __TwigTemplate_873a161a2b1b5f7c3ea8e164456b1a34 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("Graphique Indicateur", [], "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
        yield from $this->load("suivi_ind/graph_indicator.html.twig", 8, 866722690)->unwrap()->yield($context);
        // line 15
        yield "
    ";
        // line 16
        if ((($tmp = ($context["barChart"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 17
            yield "    ";
            yield from $this->load("suivi_ind/graph_indicator.html.twig", 17, 1693140930)->unwrap()->yield($context);
            // line 31
            yield "    ";
        }
        // line 32
        yield "
";
        yield from [];
    }

    // line 36
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 37
        yield "    <script>
        \$(function () {
            var barChartData = {
                labels  : ";
        // line 40
        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               : \"";
        // line 43
        yield (((($tmp = ($context["indicator"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["indicator"] ?? null), "code", [], "any", false, false, false, 43), "html", null, true)) : (""));
        yield "- ";
        yield (((($tmp = ($context["indicator"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["indicator"] ?? null), "name", [], "any", false, false, false, 43), "html", null, true)) : (""));
        yield "\",
                        backgroundColor     : ";
        // line 44
        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["bgColor"] ?? null) : null));
        }
        yield ",
                        borderColor         : ";
        // line 45
        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["bgColor"] ?? null) : null));
        }
        yield ",
                        borderWidth         : 1,
                        maxBarThickness     : 75,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : ";
        // line 53
        if ((($tmp = ($context["barChart"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode((($_v3 = ($context["barChart"] ?? null)) && is_array($_v3) || $_v3 instanceof ArrayAccess ? ($_v3["values"] ?? null) : null));
        }
        // line 54
        yield "                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        //backgroundColor: ";
        // line 74
        if ((($tmp = ($context["barChart"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode((($_v4 = ($context["barChart"] ?? null)) && is_array($_v4) || $_v4 instanceof ArrayAccess ? ($_v4["bgColor"] ?? null) : null));
        }
        yield ",
\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 98
        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 99
        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_ind/graph_indicator.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  197 => 99,  193 => 98,  164 => 74,  142 => 54,  138 => 53,  125 => 45,  119 => 44,  113 => 43,  105 => 40,  100 => 37,  93 => 36,  87 => 32,  84 => 31,  81 => 17,  79 => 16,  76 => 15,  74 => 8,  71 => 7,  64 => 6,  53 => 3,  42 => 1,);
    }

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


/* suivi_ind/graph_indicator.html.twig */
class __TwigTemplate_873a161a2b1b5f7c3ea8e164456b1a34___866722690 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 8
        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", 8);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 9
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 10
        yield "            ";
        yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_start');
        yield "
                ";
        // line 11
        yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(($context["form"] ?? null), 'widget');
        yield "
            ";
        // line 12
        yield         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock(($context["form"] ?? null), 'form_end');
        yield "    
        ";
        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  284 => 12,  280 => 11,  275 => 10,  268 => 9,  257 => 8,  197 => 99,  193 => 98,  164 => 74,  142 => 54,  138 => 53,  125 => 45,  119 => 44,  113 => 43,  105 => 40,  100 => 37,  93 => 36,  87 => 32,  84 => 31,  81 => 17,  79 => 16,  76 => 15,  74 => 8,  71 => 7,  64 => 6,  53 => 3,  42 => 1,);
    }

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


/* suivi_ind/graph_indicator.html.twig */
class __TwigTemplate_873a161a2b1b5f7c3ea8e164456b1a34___1693140930 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 17
        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", 17);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
    }

    // line 18
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        // line 19
        yield "            <div class=\"row text-right\">
            </div>
            <hr>
            <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_ind/graph_indicator.html.twig";
    }

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  362 => 19,  355 => 18,  344 => 17,  284 => 12,  280 => 11,  275 => 10,  268 => 9,  257 => 8,  197 => 99,  193 => 98,  164 => 74,  142 => 54,  138 => 53,  125 => 45,  119 => 44,  113 => 43,  105 => 40,  100 => 37,  93 => 36,  87 => 32,  84 => 31,  81 => 17,  79 => 16,  76 => 15,  74 => 8,  71 => 7,  64 => 6,  53 => 3,  42 => 1,);
    }

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