<?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;

/* graph/graph_global.html.twig */
class __TwigTemplate_2cc3ab52ce3d4a93fb01c4a16a56cbb4 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/mesodd-layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "graph/graph_global.html.twig"));

        $this->parent = $this->load("@AdminLTE/layout/mesodd-layout.html.twig", 1);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    // line 3
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_title"));

        yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("graph.global.title", [], "messages");
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 6
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_page_content(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content"));

        // line 7
        yield "    ";
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_MANAGER")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 8
            yield "        <div class=\"card card-default\">
            <div class=\"card-body\">
                ";
            // line 10
            yield             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 10, $this->source); })()), 'form_start');
            yield "
                    <div class=\"form-group row\">
                        <div class=\"col-sm-4\">
                             ";
            // line 13
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 13, $this->source); })()), "type", [], "any", false, false, false, 13), 'label', ["label_attr" => ["class" => "col-sm-12"]]);
            yield "
                            ";
            // line 14
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 14, $this->source); })()), "type", [], "any", false, false, false, 14), 'widget');
            yield "
                        </div>
                        <div class=\"col-sm-8\">
                             ";
            // line 17
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 17, $this->source); })()), "entite", [], "any", false, false, false, 17), 'label', ["label_attr" => ["class" => "col-sm-12"]]);
            yield "
                            ";
            // line 18
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 18, $this->source); })()), "entite", [], "any", false, false, false, 18), 'widget');
            yield "
                        </div>
                    </div>
                ";
            // line 21
            yield             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 21, $this->source); })()), 'form_end');
            yield "  
            </div>
        </div>
    ";
        }
        // line 25
        yield "    ";
        if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_DDD")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 26
            yield "        <div class=\"card card-default\">
            <div class=\"card-body\">
                ";
            // line 28
            yield             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 28, $this->source); })()), 'form_start');
            yield "
                    <div class=\"form-group row\">
                        <div class=\"col-sm-12\">
                             ";
            // line 31
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 31, $this->source); })()), "entite", [], "any", false, false, false, 31), 'label', ["label_attr" => ["class" => "col-sm-12"]]);
            yield "
                            ";
            // line 32
            yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 32, $this->source); })()), "entite", [], "any", false, false, false, 32), 'widget');
            yield "
                        </div>
                    </div>
                ";
            // line 35
            yield             $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 35, $this->source); })()), 'form_end');
            yield "  
            </div>
        </div>
    ";
        }
        // line 39
        yield "    ";
        if ((($tmp = (isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 39, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            // line 40
            yield "    ";
            yield from $this->load("graph/graph_global.html.twig", 40, "491850284")->unwrap()->yield($context);
            // line 56
            yield "    ";
        }
        // line 57
        yield "
";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 60
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_javascripts(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));

        // line 61
        yield "    <script>
        \$(function () {
            var barChartData = {
                labels  : ";
        // line 64
        if ((($tmp = (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 64, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 64, $this->source); })()), "labels", [], "array", false, false, false, 64));
        } else {
            yield " [] ";
        }
        yield ",
                datasets: [
                    {
                        backgroundColor     : ";
        // line 67
        if ((($tmp = (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 67, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 67, $this->source); })()), "bgColor", [], "array", false, false, false, 67));
        } else {
            yield " [] ";
        }
        yield ",
                        borderColor         : ";
        // line 68
        if ((($tmp = (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 68, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 68, $this->source); })()), "bgColor", [], "array", false, false, false, 68));
        } else {
            yield " [] ";
        }
        yield ",
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : ";
        // line 75
        if ((($tmp = (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 75, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 75, $this->source); })()), "values", [], "array", false, false, false, 75));
        } else {
            yield " [] ";
        }
        // line 76
        yield "                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        backgroundColor: ";
        // line 99
        if ((($tmp = (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 99, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
            yield json_encode(CoreExtension::getAttribute($this->env, $this->source, (isset($context["barChart"]) || array_key_exists("barChart", $context) ? $context["barChart"] : (function () { throw new RuntimeError('Variable "barChart" does not exist.', 99, $this->source); })()), "bgColor", [], "array", false, false, false, 99));
        } else {
            yield " [] ";
        }
        yield ",
\t\t\t\t\t\tborderColor: 'white',
\t\t\t\t\t\tborderRadius: 25,
\t\t\t\t\t\tborderWidth: 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 123
        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 124
        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>

";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  287 => 124,  283 => 123,  252 => 99,  227 => 76,  221 => 75,  207 => 68,  199 => 67,  189 => 64,  184 => 61,  174 => 60,  165 => 57,  162 => 56,  159 => 40,  156 => 39,  149 => 35,  143 => 32,  139 => 31,  133 => 28,  129 => 26,  126 => 25,  119 => 21,  113 => 18,  109 => 17,  103 => 14,  99 => 13,  93 => 10,  89 => 8,  86 => 7,  76 => 6,  59 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/mesodd-layout.html.twig' %}

{% block page_title %}{% trans %}graph.global.title{% endtrans %}{% endblock %}


{% block page_content %}
    {% if is_granted('ROLE_MANAGER')  %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        <div class=\"col-sm-4\">
                             {{ form_label(form.type, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                            {{ form_widget(form.type) }}
                        </div>
                        <div class=\"col-sm-8\">
                             {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                            {{ form_widget(form.entite) }}
                        </div>
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}
    {% if is_granted('ROLE_DDD')  %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        <div class=\"col-sm-12\">
                             {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                            {{ form_widget(form.entite) }}
                        </div>
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}
    {% if type %}
    {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
        {% block box_title %}
                <label class=\"col-sm-12 col-form-label\"><span style=\"color:red\">Sensibilité globale : {{global|number_format(2, ',', ' ')}} %</span></label>
        {% endblock %}
        {% block box_body %}
            <div class=\"row\">
                <div class=\"col-md-12\">
                    <div class=\"chart\" style=\"position: relative; height:63vh; width:100%\">
                        <canvas id=\"barChart\"></canvas>
                        <!--canvas id=\"myChart\" width=\"400\" height=\"400\"></canvas-->
                        <div id=\"bar-chart\" style=\"height: 300px;\"></div>
                    </div>
                </div>
            </div>
        {% endblock %}
    {% endembed %}
    {% endif %}

{% endblock %}

{% block javascripts %}
    <script>
        \$(function () {
            var barChartData = {
                labels  : {% if barChart %}{{ barChart['labels']|json_encode()|raw }}{% else %} [] {% endif %},
                datasets: [
                    {
                        backgroundColor     : {% if barChart %}{{ barChart['bgColor']|json_encode()|raw }}{% else %} [] {% endif %},
                        borderColor         : {% if barChart %}{{ barChart['bgColor']|json_encode()|raw }}{% else %} [] {% endif %},
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : {% if barChart %}{{ barChart['values']|json_encode()|raw }}{% else %} [] {% endif %}
                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        backgroundColor: {% if barChart %}{{ barChart['bgColor']|json_encode()|raw }}{% else %} [] {% endif %},
\t\t\t\t\t\tborderColor: 'white',
\t\t\t\t\t\tborderRadius: 25,
\t\t\t\t\t\tborderWidth: 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=\"{{ asset('plugins/chart.js/Chart.min.js') }}\"></script>
    <script src=\"{{ asset('plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js') }}\"></script>

{% endblock %}", "graph/graph_global.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/graph/graph_global.html.twig");
    }
}


/* graph/graph_global.html.twig */
class __TwigTemplate_2cc3ab52ce3d4a93fb01c4a16a56cbb4___491850284 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_title' => [$this, 'block_box_title'],
            'box_body' => [$this, 'block_box_body'],
        ];
    }

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

    protected function doDisplay(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "graph/graph_global.html.twig"));

        $this->parent = $this->load("@AdminLTE/Widgets/box-widget.html.twig", 40);
        yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

    }

    // line 41
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_title(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "box_title"));

        // line 42
        yield "                <label class=\"col-sm-12 col-form-label\"><span style=\"color:red\">Sensibilité globale : ";
        yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 42, $this->source); })()), 2, ",", " "), "html", null, true);
        yield " %</span></label>
        ";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

    // line 44
    /**
     * @return iterable<null|scalar|\Stringable>
     */
    public function block_box_body(array $context, array $blocks = []): iterable
    {
        $macros = $this->macros;
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "box_body"));

        // line 45
        yield "            <div class=\"row\">
                <div class=\"col-md-12\">
                    <div class=\"chart\" style=\"position: relative; height:63vh; width:100%\">
                        <canvas id=\"barChart\"></canvas>
                        <!--canvas id=\"myChart\" width=\"400\" height=\"400\"></canvas-->
                        <div id=\"bar-chart\" style=\"height: 300px;\"></div>
                    </div>
                </div>
            </div>
        ";
        
        $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);

        yield from [];
    }

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

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

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  525 => 45,  515 => 44,  504 => 42,  494 => 41,  477 => 40,  287 => 124,  283 => 123,  252 => 99,  227 => 76,  221 => 75,  207 => 68,  199 => 67,  189 => 64,  184 => 61,  174 => 60,  165 => 57,  162 => 56,  159 => 40,  156 => 39,  149 => 35,  143 => 32,  139 => 31,  133 => 28,  129 => 26,  126 => 25,  119 => 21,  113 => 18,  109 => 17,  103 => 14,  99 => 13,  93 => 10,  89 => 8,  86 => 7,  76 => 6,  59 => 3,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% extends '@AdminLTE/layout/mesodd-layout.html.twig' %}

{% block page_title %}{% trans %}graph.global.title{% endtrans %}{% endblock %}


{% block page_content %}
    {% if is_granted('ROLE_MANAGER')  %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        <div class=\"col-sm-4\">
                             {{ form_label(form.type, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                            {{ form_widget(form.type) }}
                        </div>
                        <div class=\"col-sm-8\">
                             {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                            {{ form_widget(form.entite) }}
                        </div>
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}
    {% if is_granted('ROLE_DDD')  %}
        <div class=\"card card-default\">
            <div class=\"card-body\">
                {{ form_start(form) }}
                    <div class=\"form-group row\">
                        <div class=\"col-sm-12\">
                             {{ form_label(form.entite, null, {'label_attr': {'class': 'col-sm-12'}}) }}
                            {{ form_widget(form.entite) }}
                        </div>
                    </div>
                {{ form_end(form) }}  
            </div>
        </div>
    {% endif %}
    {% if type %}
    {% embed '@AdminLTE/Widgets/box-widget.html.twig' %}
        {% block box_title %}
                <label class=\"col-sm-12 col-form-label\"><span style=\"color:red\">Sensibilité globale : {{global|number_format(2, ',', ' ')}} %</span></label>
        {% endblock %}
        {% block box_body %}
            <div class=\"row\">
                <div class=\"col-md-12\">
                    <div class=\"chart\" style=\"position: relative; height:63vh; width:100%\">
                        <canvas id=\"barChart\"></canvas>
                        <!--canvas id=\"myChart\" width=\"400\" height=\"400\"></canvas-->
                        <div id=\"bar-chart\" style=\"height: 300px;\"></div>
                    </div>
                </div>
            </div>
        {% endblock %}
    {% endembed %}
    {% endif %}

{% endblock %}

{% block javascripts %}
    <script>
        \$(function () {
            var barChartData = {
                labels  : {% if barChart %}{{ barChart['labels']|json_encode()|raw }}{% else %} [] {% endif %},
                datasets: [
                    {
                        backgroundColor     : {% if barChart %}{{ barChart['bgColor']|json_encode()|raw }}{% else %} [] {% endif %},
                        borderColor         : {% if barChart %}{{ barChart['bgColor']|json_encode()|raw }}{% else %} [] {% endif %},
                        borderWidth         : 1,
                        pointRadius         : false,
                        pointColor          : '#3b8bba',
                        pointStrokeColor    : 'rgba(60,141,188,1)',
                        pointHighlightFill  : '#fff',
                        pointHighlightStroke: 'rgba(60,141,188,1)',
                        data                : {% if barChart %}{{ barChart['values']|json_encode()|raw }}{% else %} [] {% endif %}
                    },
                ]
            }

            var barChartCanvas = document.getElementById('barChart').getContext('2d');
      
            var barChartOptions = {
                responsive              : true,
                maintainAspectRatio     : false,
                datasetFill             : false,
                legend: {
                        display: false
                    },
                scales: {
                    yAxes: [{
                        ticks: {
                            beginAtZero: true
                        }
                    }]
                },
                plugins: {
                    // Change options for ALL labels of THIS CHART
                    datalabels: {
                        backgroundColor: {% if barChart %}{{ barChart['bgColor']|json_encode()|raw }}{% else %} [] {% endif %},
\t\t\t\t\t\tborderColor: 'white',
\t\t\t\t\t\tborderRadius: 25,
\t\t\t\t\t\tborderWidth: 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=\"{{ asset('plugins/chart.js/Chart.min.js') }}\"></script>
    <script src=\"{{ asset('plugins/chartjs-plugin-datalabels/chartjs-plugin-datalabels.min.js') }}\"></script>

{% endblock %}", "graph/graph_global.html.twig", "/var/www/vhosts/sigodd.gouv.bj/httpdocs/templates/graph/graph_global.html.twig");
    }
}
