<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;

/* page/restaurant.html.twig */
class __TwigTemplate_909cb08503dd3a55b41d1b333578c0cac31731fe547c6451d4f6e75836f95e01 extends Template
{
    private $source;
    private $macros = [];

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

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

        $this->blocks = [
            'title' => [$this, 'block_title'],
            'stylesheets' => [$this, 'block_stylesheets'],
            'body' => [$this, 'block_body'],
            'javascripts' => [$this, 'block_javascripts'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "page/restaurant.html.twig"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "page/restaurant.html.twig"));

        $this->parent = $this->loadTemplate("base.html.twig", "page/restaurant.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 2
    public function block_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));

        // line 3
        echo "\tRestaurant
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

    }

    // line 6
    public function block_stylesheets($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));

        // line 7
        echo "\t<link rel=\"stylesheet\" href=\"";
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("css/dashboard.css"), "html", null, true);
        echo "\">
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

    }

    // line 9
    public function block_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));

        // line 10
        echo "\t<section
\t\tid=\"contents\" class=\"container-fluid\">
\t\t<!-- entete content -->
\t\t<div id=\"top-content\">
\t\t\t<div id=\"entete_fixed\">
\t\t\t\t<ul>
\t\t\t\t\t<li>
\t\t\t\t\t\t<a href=\"#\" id=\"btn_drop_side_menu\">
\t\t\t\t\t\t\t<i data-show=\"show-side-navigation1\" class=\"fa fa-bars show-side-btn\"></i>
\t\t\t\t\t\t</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li ";
        // line 21
        if ((0 === twig_compare((isset($context["hotel"]) || array_key_exists("hotel", $context) ? $context["hotel"] : (function () { throw new RuntimeError('Variable "hotel" does not exist.', 21, $this->source); })()), "royal_beach"))) {
            echo " class=\"logo_active\" ";
        }
        echo ">
\t\t\t\t\t\t<a href=\"";
        // line 22
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("royal_beach", ["current_page" => (isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 22, $this->source); })())]), "html", null, true);
        echo "\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<img src=\"";
        // line 24
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/hazo1.png"), "html", null, true);
        echo "\" alt=\"logo1\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li ";
        // line 28
        if ((0 === twig_compare((isset($context["hotel"]) || array_key_exists("hotel", $context) ? $context["hotel"] : (function () { throw new RuntimeError('Variable "hotel" does not exist.', 28, $this->source); })()), "calypso"))) {
            echo " class=\"logo_active\" ";
        }
        echo ">
\t\t\t\t\t\t<a href=\"";
        // line 29
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("calypso", ["current_page" => (isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 29, $this->source); })())]), "html", null, true);
        echo "\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<img src=\"";
        // line 31
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/hazo2.png"), "html", null, true);
        echo "\" alt=\"logo2\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li ";
        // line 35
        if ((0 === twig_compare((isset($context["hotel"]) || array_key_exists("hotel", $context) ? $context["hotel"] : (function () { throw new RuntimeError('Variable "hotel" does not exist.', 35, $this->source); })()), "baobab_tree"))) {
            echo " class=\"logo_active\" ";
        }
        echo ">
\t\t\t\t\t\t<a href=\"";
        // line 36
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("baobab_tree", ["current_page" => (isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 36, $this->source); })())]), "html", null, true);
        echo "\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<img src=\"";
        // line 38
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/hazo3.png"), "html", null, true);
        echo "\" alt=\"logo3\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li ";
        // line 42
        if ((0 === twig_compare((isset($context["hotel"]) || array_key_exists("hotel", $context) ? $context["hotel"] : (function () { throw new RuntimeError('Variable "hotel" does not exist.', 42, $this->source); })()), "vanila_hotel"))) {
            echo " class=\"logo_active\" ";
        }
        echo ">
\t\t\t\t\t\t<a href=\"";
        // line 43
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("vanila_hotel", ["current_page" => (isset($context["current_page"]) || array_key_exists("current_page", $context) ? $context["current_page"] : (function () { throw new RuntimeError('Variable "current_page" does not exist.', 43, $this->source); })())]), "html", null, true);
        echo "\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<img src=\"";
        // line 45
        echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("images/hazo4.png"), "html", null, true);
        echo "\" alt=\"logo4\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li id=\"log_out_entete\">
\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t<a href=\"";
        // line 51
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_logout");
        echo "\">
\t\t\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"fa fa-power-off fa-2x\"></span>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t</div>
\t\t\t\t\t</li>
\t\t\t\t</ul>
\t\t\t</div>

\t\t</div>

\t\t<!-- / entete content -->

\t\t<!-- contenue nouveau client -->
\t\t<div id=\"hrs_content\">
\t\t\t<div>
\t\t\t\t<div class=\"col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12\">
\t\t\t\t\t<section class=\"section_part\" id=\"section_part_top\">
\t\t\t\t\t\t<div class=\"sous_titre\">
\t\t\t\t\t\t\t<h3>Restaurant
\t\t\t\t\t\t\t</h3>
\t\t\t\t\t\t</div>
\t\t\t\t\t</section>
\t\t\t\t</div>
\t\t\t\t<div
\t\t\t\t\tclass=\"col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12\">
\t\t\t\t\t<!-- debut chart 1 -->
\t\t\t\t\t<section class=\"section_part tab_content margin_tab\">
\t\t\t\t\t\t<div class=\"chart_title\">
\t\t\t\t\t\t\t<div class=\"chart_title-part\" id=\"div__1\">
\t\t\t\t\t\t\t\t<h4>Chiffre d'affaire</h4>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<form action=\"\" class=\"tri\">
\t\t\t\t\t\t\t\t<select name=\"\" id=\"mois_res_ca\">
\t\t\t\t\t\t\t\t\t<option selected=\"selected\" value=\"tous_les_mois\">Tous les mois</option>
\t\t\t\t\t\t\t\t\t<option value=\"01\">Janvier</option>
\t\t\t\t\t\t\t\t\t<option value=\"02\">Février</option>
\t\t\t\t\t\t\t\t\t<option value=\"03\">Mars</option>
\t\t\t\t\t\t\t\t\t<option value=\"04\">Avril</option>
\t\t\t\t\t\t\t\t\t<option value=\"05\">Mai</option>
\t\t\t\t\t\t\t\t\t<option value=\"06\">Juin</option>
\t\t\t\t\t\t\t\t\t<option value=\"07\">Juillet</option>
\t\t\t\t\t\t\t\t\t<option value=\"08\">Août</option>
\t\t\t\t\t\t\t\t\t<option value=\"09\">Septembre</option>
\t\t\t\t\t\t\t\t\t<option value=\"10\">Octobre</option>
\t\t\t\t\t\t\t\t\t<option value=\"11\">Novembre</option>
\t\t\t\t\t\t\t\t\t<option value=\"12\">Décembre</option>
\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t<select name=\"\" class=\"annee\" id=\"annee_res_ca\">
\t\t\t\t\t\t\t\t\t";
        // line 99
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["tab_annee"]) || array_key_exists("tab_annee", $context) ? $context["tab_annee"] : (function () { throw new RuntimeError('Variable "tab_annee" does not exist.', 99, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["a"]) {
            // line 100
            echo "\t\t\t\t\t\t\t\t\t\t<option value=\"";
            echo twig_escape_filter($this->env, $context["a"], "html", null, true);
            echo "\">";
            echo twig_escape_filter($this->env, $context["a"], "html", null, true);
            echo "</option>
\t\t\t\t\t\t\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['a'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 102
        echo "\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t</form>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t<canvas id=\"canvas_nc\"></canvas>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div id=\"chart-legends_nc\"></div>

\t\t\t\t\t</section>
\t\t\t\t\t<!-- fin chart 1 -->

\t\t\t\t\t<!-- debut chart 2 -->
\t\t\t\t\t<section class=\"section_part tab_content margin_tab\">
\t\t\t\t\t\t<div class=\"chart_title\">
\t\t\t\t\t\t\t<div class=\"chart_title-part\" id=\"div__3\">
\t\t\t\t\t\t\t\t<h4>Nombre de couvert</h4>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<form action=\"\" class=\"tri\">
\t\t\t\t\t\t\t\t<select name=\"\" id=\"mois_res_couvert\">
\t\t\t\t\t\t\t\t\t<option selected=\"selected\" value=\"tous_les_mois\">Tous les mois</option>
\t\t\t\t\t\t\t\t\t<option value=\"01\">Janvier</option>
\t\t\t\t\t\t\t\t\t<option value=\"02\">Février</option>
\t\t\t\t\t\t\t\t\t<option value=\"03\">Mars</option>
\t\t\t\t\t\t\t\t\t<option value=\"04\">Avril</option>
\t\t\t\t\t\t\t\t\t<option value=\"05\">Mai</option>
\t\t\t\t\t\t\t\t\t<option value=\"06\">Juin</option>
\t\t\t\t\t\t\t\t\t<option value=\"07\">Juillet</option>
\t\t\t\t\t\t\t\t\t<option value=\"08\">Août</option>
\t\t\t\t\t\t\t\t\t<option value=\"09\">Septembre</option>
\t\t\t\t\t\t\t\t\t<option value=\"10\">Octobre</option>
\t\t\t\t\t\t\t\t\t<option value=\"11\">Novembre</option>
\t\t\t\t\t\t\t\t\t<option value=\"12\">Décembre</option>
\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t<select name=\"\" class=\"annee\" id=\"annee_res_couvert\">
\t\t\t\t\t\t\t\t\t";
        // line 136
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["tab_annee"]) || array_key_exists("tab_annee", $context) ? $context["tab_annee"] : (function () { throw new RuntimeError('Variable "tab_annee" does not exist.', 136, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["a"]) {
            // line 137
            echo "\t\t\t\t\t\t\t\t\t\t<option value=\"";
            echo twig_escape_filter($this->env, $context["a"], "html", null, true);
            echo "\">";
            echo twig_escape_filter($this->env, $context["a"], "html", null, true);
            echo "</option>
\t\t\t\t\t\t\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['a'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 139
        echo "\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t</form>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t<canvas id=\"canvas_car\"></canvas>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div id=\"chart-legends_car\"></div>


\t\t\t\t\t</section>
\t\t\t\t\t<!-- fin chart2  -->

\t\t\t\t</div>


\t\t\t</div>
\t\t</div>
\t\t<!-- / contenue nouveau client -->
\t</section>

";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

    }

    // line 161
    public function block_javascripts($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));

        // line 162
        echo "    <script>
        \$(document).ready(function () {
                    function draw_chart1(my_data, my_labels) {

                        var ctx1 = document.getElementById('canvas_nc').getContext(\"2d\");


                        var gradientfill_1 = ctx1.createLinearGradient(0, 0, 0, 320);
                        gradientfill_1.addColorStop(0, '#d29e00');
                        gradientfill_1.addColorStop(1, 'transparent');

                        var gradientfill_2 = ctx1.createLinearGradient(0, 0, 0, 320);
                        gradientfill_2.addColorStop(0, '#55d8ff');
                        gradientfill_2.addColorStop(1, 'transparent');

                        var config1 = {
                            type: 'line',
                            data: {
                                datasets: [
                                    {
                                        label: \"Chiffre d'affaire\",
                                        fill: true,
                                        backgroundColor: gradientfill_1,
                                        borderColor: \"#d29e00\",

                                        /* insertion des données sur l'axe (ox) */

                                        data: my_data,

                                        /* insertion des données sur l'axe (ox) */

                                        pointStyle: 'circle',
                                        pointBackgroundColor: \"transparent\",
                                        pointBorderWidth: '2',
                                        radius: '5',
                                        hoverRadius: '5',
                                        borderWidth: 2

                                    }
                                ]
                            },
                            options: 
                            {
                                    legend: {
                                        display: false,
                                        align: 'start',
                                        position: 'bottom'

                                    },

                                    legendCallback: function (chart) {
                                        var text = [];
                                        text.push('<ul class=\"my_liste_legend ul_1\">');
                                        for (var i = 0; i < chart.data.datasets.length; i++) {
                                            console.log(chart.data.datasets[i]); // see what's inside the obj.
                                            text.push('<li>');
                                            text.push('<span data_leg = \"' + i + '\" style=\"background-color:' + chart.data.datasets[i].borderColor + '\">' + '</span><b data_leg = \"' + i + '\">' + chart.data.datasets[i].label + '</b>');
                                            text.push('</li>');
                                        }
                                        text.push('</ul>');
                                        return text.join(\"\");
                                    },
                                    responsive: true,
                                    title: {
                                        display: true,
                                        text: ''
                                    },
                                    tooltips: {
                                        mode: 'index',
                                        intersect: false
                                    },
                                    hover: {
                                        mode: 'nearest',
                                        intersect: true
                                    },

                                    scales: {

                                        xAxes: [
                                            {
                                                type: 'category',

                                                /* insertion des données sur l'axe (ox) */

                                                labels: my_labels,

                                                    /*  / insertion des données sur l'axe (ox) */

                                                gridLines: {
                                                    drawOnChartArea: true,
                                                    drawTicks: false,
                                                    color: \"#f0f2f4\"
                                                },

                                                ticks: {
                                                    padding: 20 // pour le marge % axe x
                                                }
                                            }
                                        ],
                                        yAxes: [
                                            {
                                                gridLines: {
                                                    drawOnChartArea: true,
                                                    drawTicks: false,
                                                    color: \"#dddfe1\"
                                                },
                                                ticks: {
                                                    padding: 20, // pour le marge % axe y
                                                    min: 0,
                                                    max: 100,
                                                    stepSize: 20,
                                                    callback: function (value) {
                                                        return value + \" M Ar\"
                                                    }
                                                },
                                                display: true,
                                                scaleLabel: {
                                                    display: true,
                                                    labelString: ''
                                            }
                                        }
                                    ]
                                }
                            }

                        };
                            // si on veut ajouter un marge bottom des legendes
                            // Chart.Legend.prototype.afterFit = function() {
                            //     this.height = this.height + 150;

                            // };
                        var myChart1 = new Chart(ctx1, config1);
                        // pour dire qu'on va utiliser notre propre légende html fenitra
                        document.getElementById('chart-legends_nc').innerHTML = myChart1.generateLegend();

                        // legende 1

                        var ev_click = false;
                        var tab_temp = [];
                        for (var i = 0; i < myChart1.data.datasets[0].data.length; i++) { // myChart1.data.datasets[0].data[i]= -10;
                            tab_temp[i] = myChart1.data.datasets[0].data[i];
                        }
                        \$(\"#chart-legends_nc\").on('click', \"li span[data_leg=0]\", function () {

                            if (ev_click == false) {
                                \$(\".ul_1 li span[data_leg=0]\").addClass(\"legende_click\");
                                for (var i = 0; i < myChart1.data.datasets[0].data.length; i++) {
                                    myChart1.data.datasets[0].data[i] = -10;
                                    }
                                myChart1.update();
                                ev_click = ! ev_click;
                                // alert(ev_click) ;
                            } else {
                                \$(\".ul_1 li span[data_leg=0]\").removeClass(\"legende_click\");
                                for (var i = 0; i < myChart1.data.datasets[0].data.length; i++) {
                                    myChart1.data.datasets[0].data[i] = tab_temp[i];
                                }
                                myChart1.update();
                                ev_click = ! ev_click;
                                // alert(ev_click) ;
                            }
                        });

                        // fin legende 1


                        // fin chart 1

                        return myChart1;
                    }


                    // debut chart  2


                    function draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_t, my_labels) {

                        var ctx2 = document.getElementById('canvas_car').getContext(\"2d\");


                        // var gradientstroke = ctx.createLinearGradient(700, 0, 0, 0);
                        // gradientstroke.addColorStop(0, '#00d8c0');
                        // gradientstroke.addColorStop(1, '#ff6a72');

                        var gradientfill_1 = ctx2.createLinearGradient(0, 0, 0, 320);
                        gradientfill_1.addColorStop(0, '#d29e00');
                        gradientfill_1.addColorStop(1, 'transparent');

                        var gradientfill_2 = ctx2.createLinearGradient(0, 0, 0, 320);
                        gradientfill_2.addColorStop(0, '#55d8ff');
                        gradientfill_2.addColorStop(1, 'transparent');

                        var gradientfill_3 = ctx2.createLinearGradient(0, 0, 0, 350);
                        gradientfill_3.addColorStop(0, '#3bc40a');
                        gradientfill_3.addColorStop(1, 'transparent');


                        var gradientfill_4 = ctx2.createLinearGradient(0, 0, 0, 350);
                        gradientfill_4.addColorStop(0, '#6e6e6e');
                        gradientfill_4.addColorStop(1, 'transparent');

                        var config2 = {
                            type: 'line',
                            data: {
                                datasets: [
                                {
                                    label: \"Petit déjeuner\",
                                    fill: true,
                                    backgroundColor: gradientfill_1,
                                    borderColor: \"#d29e00\",

                                    /* insertion des données sur l'axe (oy) */

                                    data: my_data_pd,

                                    /* / insertion des données sur l'axe (oy) */

                                        pointStyle: 'circle',
                                        pointBackgroundColor: \"transparent\",
                                        pointBorderWidth: '2',
                                        radius: '5',
                                        hoverRadius: '5',
                                        borderWidth: 2

                                    }, 
                                    {
                                        label: \"Déjeuner\",
                                        fill: true,
                                        backgroundColor: gradientfill_2,
                                        borderColor: \"#55d8ff\",

                                        /* insertion des données sur l'axe (oy) */

                                        data: my_data_d,

                                        /* /insertion des données sur l'axe (oy) */

                                            pointStyle: 'circle',
                                            pointBackgroundColor: \"transparent\",
                                            pointBorderWidth: '2',
                                            radius: '5',
                                            hoverRadius: '5',
                                            borderWidth: 2
                                        }, 
                                        {
                                            label: \"Dinner\",
                                            fill: true,
                                            backgroundColor: gradientfill_3,
                                            borderColor: \"#3bc40a\",

                                            /* insertion des données sur l'axe (oy) */

                                            data: my_data_di,

                                            /* insertion des données sur l'axe (oy) */

                                                pointStyle: 'circle',
                                                pointBackgroundColor: \"transparent\",
                                                pointBorderWidth: '2',
                                                radius: '5',
                                                hoverRadius: '5',
                                                borderWidth: 2
                                            }, 
                                            {
                                                label: \"Total\",
                                                fill: true,
                                                backgroundColor: gradientfill_4,
                                                borderColor: \"#6e6e6e\",

                                                /* insertion des données sur l'axe (oy) */

                                                data: my_data_t,

                                            /* / insertion des données sur l'axe (oy) */

                                            pointStyle: 'circle',
                                            pointBackgroundColor: \"transparent\",
                                            pointBorderWidth: '2',
                                            radius: '5',
                                            hoverRadius: '5',
                                            borderWidth: 2
                                            }
                                        ]
                                    },
                                    options: {
                                        legend: {
                                            display: false,
                                            align: 'start',
                                            position: 'bottom'

                                        },

                                        legendCallback: function (chart) {
                                            var text = [];
                                            text.push('<ul class=\"my_liste_legend ul_2\">');
                                            for (var i = 0; i < chart.data.datasets.length; i++) {
                                                console.log(chart.data.datasets[i]); // see what's inside the obj.
                                                text.push('<li>');
                                                text.push('<span data_leg = \"' + i + '\" style=\"background-color:' + chart.data.datasets[i].borderColor + '\">' + '</span><b data_leg = \"' + i + '\">' + chart.data.datasets[i].label + '</b>');
                                                text.push('</li>');
                                            }
                                            text.push('</ul>');
                                            return text.join(\"\");
                                        },
                                        responsive: true,
                                            title: {
                                                display: true,
                                                text: ''
                                            },
                                        tooltips: {
                                            mode: 'index',
                                            intersect: false
                                        },
                                        hover: {
                                            mode: 'nearest',
                                            intersect: true
                                        },

                                        scales: {

                                            xAxes: [
                                            {
                                                type: 'category',

                                                /* insertion des données sur l'axe (ox) */

                                                labels: my_labels,

                                                /* / insertion des données sur l'axe (ox) */

                                                gridLines: {
                                                    drawOnChartArea: true,
                                                    drawTicks: false,
                                                    color: \"#f0f2f4\"
                                                },

                                                ticks: {
                                                    padding: 20 // pour le marge % axe x
                                                }
                                            }
                                        ],
                                        yAxes: [
                                        {
                                            gridLines: {
                                                drawOnChartArea: true,
                                                drawTicks: false,
                                                color: \"#dddfe1\"
                                            },
                                            ticks: {
                                                padding: 20, // pour le marge % axe y
                                                min: 0,
                                                max: 300,
                                                stepSize : 50,
                                                callback: function (value) {
                                                    return value + \" Couverts\"
                                                }
                                            },
                                            display: true,
                                            scaleLabel: {
                                                display: true,
                                                labelString: ''
                                        }
                                    }
                                ]
                            }
                        }

                    };
                    // si on veut ajouter un marge bottom des legendes
                    // Chart.Legend.prototype.afterFit = function() {
                    //     this.height = this.height + 150;

                    // };
                    var myChart2 = new Chart(ctx2, config2);
                    // pour dire qu'on va utiliser notre propre légende html fenitra
                    document.getElementById('chart-legends_car').innerHTML = myChart2.generateLegend();

                    // legende 1

                    var ev_click = false;
                    var tab_temp = [];
                    for (var i = 0; i < myChart2.data.datasets[0].data.length; i++) { // myChart2.data.datasets[0].data[i]= -10;
                        tab_temp[i] = myChart2.data.datasets[0].data[i];
                    }
                    \$(\"#chart-legends_car\").on('click', \"li span[data_leg=0]\", function () {

                        if (ev_click == false) {
                                \$(\".ul_2 li span[data_leg=0]\").addClass(\"legende_click\");
                                for (var i = 0; i < myChart2.data.datasets[0].data.length; i++) {
                                    myChart2.data.datasets[0].data[i] = -10;
                                }
                                myChart2.update();
                                ev_click = ! ev_click;
                            // alert(ev_click) ;
                        } else {
                            \$(\".ul_2 li span[data_leg=0]\").removeClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[0].data.length; i++) {
                                myChart2.data.datasets[0].data[i] = tab_temp[i];
                            }
                            myChart2.update();
                            ev_click = ! ev_click;
                            // alert(ev_click) ;
                        }
                    });

                    // fin legende 1

                    // legende 2

                    var ev_click2 = false;
                    var tab_temp2 = [];
                    for (var i = 0; i < myChart2.data.datasets[1].data.length; i++) { // myChart2.data.datasets[0].data[i]= -10;
                        tab_temp2[i] = myChart2.data.datasets[1].data[i];
                    }
                    \$(\"#chart-legends_car\").on('click', \"li span[data_leg=1]\", function () {

                        if (ev_click2 == false) {
                            \$(\".ul_2 li span[data_leg=1]\").addClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[1].data.length; i++) {
                                myChart2.data.datasets[1].data[i] = -10;
                            }
                            myChart2.update();
                            ev_click2 = ! ev_click2;
                            // alert(ev_click2) ;
                        } else {
                        \$(\".ul_2 li span[data_leg=1]\").removeClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[1].data.length; i++) {
                                myChart2.data.datasets[1].data[i] = tab_temp2[i];
                            }
                            myChart2.update();
                            ev_click2 = ! ev_click2;
                            // alert(ev_click2) ;
                        }
                    });

                    // fin legende 2

                    // legende 3

                    var ev_click3 = false;
                    var tab_temp3 = [];
                    for (var i = 0; i < myChart2.data.datasets[2].data.length; i++) { // myChart2.data.datasets[0].data[i]= -10;
                        tab_temp3[i] = myChart2.data.datasets[2].data[i];
                    }
                    \$(\"#chart-legends_car\").on('click', \"li span[data_leg=2]\", function () {

                        if (ev_click3 == false) {
                            \$(\".ul_2 li span[data_leg=2]\").addClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[2].data.length; i++) {
                                myChart2.data.datasets[2].data[i] = -10;
                            }
                            myChart2.update();
                            ev_click3 = ! ev_click3;
                            // alert(ev_click3) ;
                        } else {
                        \$(\".ul_2 li span[data_leg=2]\").removeClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[2].data.length; i++) {
                                myChart2.data.datasets[2].data[i] = tab_temp3[i];
                            }
                            myChart2.update();
                            ev_click3 = ! ev_click3;
                            // alert(ev_click3) ;
                        }
                    });

                    // fin legende 3

                    // legende 4

                    var ev_click4 = false;
                    var tab_temp4 = [];
                    for (var i = 0; i < myChart2.data.datasets[3].data.length; i++) { // myChart2.data.datasets[0].data[i]= -10;
                        tab_temp4[i] = myChart2.data.datasets[3].data[i];
                    }
                    \$(\"#chart-legends_car\").on('click', \"li span[data_leg=3]\", function () {

                        if (ev_click4 == false) {
                            \$(\".ul_2 li span[data_leg=3]\").addClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[3].data.length; i++) {
                                myChart2.data.datasets[3].data[i] = -10;
                            }
                            myChart2.update();
                            ev_click4 = ! ev_click4;
                            // alert(ev_click4) ;
                        } else {
                        \$(\".ul_2 li span[data_leg=3]\").removeClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[3].data.length; i++) {
                                myChart2.data.datasets[3].data[i] = tab_temp4[i];
                            }
                            myChart2.update();
                            ev_click4 = ! ev_click4;
                            // alert(ev_click4) ;
                        }
                    });

                    // fin legende 4


                    return myChart2;
                }

                    // responsive pour les chart

                    function add_resp_heb(myChart1, myChart2) {
                        myChart1.options.scales.yAxes[0].ticks.fontSize = 7;
                        myChart1.options.scales.yAxes[0].ticks.padding = 10;
                        myChart1.options.scales.yAxes[0].ticks.stepSize = 20;
                        myChart1.options.scales.xAxes[0].ticks.stepSize = 0;
                        myChart1.options.scales.xAxes[0].ticks.fontSize = 8;

                        myChart2.options.scales.yAxes[0].ticks.fontSize = 7;
                        myChart2.options.scales.yAxes[0].ticks.padding = 10;
                        myChart2.options.scales.yAxes[0].ticks.stepSize = 20;
                        myChart2.options.scales.xAxes[0].ticks.stepSize = 0;
                        myChart2.options.scales.xAxes[0].ticks.fontSize = 8;
                        for (var i = myChart1.data.datasets.length - 1; i >= 0; i--) {
                            myChart1.data.datasets[i].radius = '3';
                        }
                        myChart1.update();
                        myChart2.options.scales.yAxes[0].ticks.fontSize = 7;
                        myChart2.options.scales.xAxes[0].ticks.fontSize = 7;
                        for (var i = myChart2.data.datasets.length - 1; i >= 0; i--) {
                            myChart2.data.datasets[i].radius = '3';
                        }
                        myChart2.update();
                    }

                // tracer
                    // tracer
\t\t\t\t\tvar my_data_ca = [
\t\t\t\t\t\t";
        // line 692
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["tab_res_ca"]) || array_key_exists("tab_res_ca", $context) ? $context["tab_res_ca"] : (function () { throw new RuntimeError('Variable "tab_res_ca" does not exist.', 692, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["t"]) {
            // line 693
            echo "\t\t\t\t\t\t\t";
            echo twig_escape_filter($this->env, $context["t"], "html", null, true);
            echo ",
\t\t\t\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['t'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 695
        echo "\t\t\t\t\t];

                    var my_data_pd = [
                        ";
        // line 698
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["tab_res_pd"]) || array_key_exists("tab_res_pd", $context) ? $context["tab_res_pd"] : (function () { throw new RuntimeError('Variable "tab_res_pd" does not exist.', 698, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["t"]) {
            // line 699
            echo "\t\t\t\t\t\t\t";
            echo twig_escape_filter($this->env, $context["t"], "html", null, true);
            echo ",
\t\t\t\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['t'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 701
        echo "                    ]

                    var my_data_d = [
                        ";
        // line 704
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["tab_res_d"]) || array_key_exists("tab_res_d", $context) ? $context["tab_res_d"] : (function () { throw new RuntimeError('Variable "tab_res_d" does not exist.', 704, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["t"]) {
            // line 705
            echo "\t\t\t\t\t\t\t";
            echo twig_escape_filter($this->env, $context["t"], "html", null, true);
            echo ",
\t\t\t\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['t'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 707
        echo "                    ]

                    var my_data_di = [
                        ";
        // line 710
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["tab_res_di"]) || array_key_exists("tab_res_di", $context) ? $context["tab_res_di"] : (function () { throw new RuntimeError('Variable "tab_res_di" does not exist.', 710, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["t"]) {
            // line 711
            echo "\t\t\t\t\t\t\t";
            echo twig_escape_filter($this->env, $context["t"], "html", null, true);
            echo ",
\t\t\t\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['t'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 713
        echo "                    ]

                    var my_data_total = [
                        ";
        // line 716
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["tab_res_total"]) || array_key_exists("tab_res_total", $context) ? $context["tab_res_total"] : (function () { throw new RuntimeError('Variable "tab_res_total" does not exist.', 716, $this->source); })()));
        foreach ($context['_seq'] as $context["_key"] => $context["t"]) {
            // line 717
            echo "\t\t\t\t\t\t\t";
            echo twig_escape_filter($this->env, $context["t"], "html", null, true);
            echo ",
\t\t\t\t\t\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['t'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 719
        echo "                    ]


\t\t\t\t\tvar my_labels = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"];

                
                    var w = \$(window).width();
                    if (w <= 768) {
                        var myChart1 = draw_chart1(my_data_ca, my_labels);
                        var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                        add_resp_heb(myChart1, myChart2);
                    } else {
                        var myChart1 = draw_chart1(my_data_ca, my_labels);
                        var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                    }
                
                /* tri graph res  */

                // triage chart res_ca
                    var pseudo_hotel = \"";
        // line 738
        echo twig_escape_filter($this->env, (isset($context["hotel"]) || array_key_exists("hotel", $context) ? $context["hotel"] : (function () { throw new RuntimeError('Variable "hotel" does not exist.', 738, $this->source); })()), "html", null, true);
        echo "\" ;

\t\t\t\t\t\$('#mois_res_ca').on('change', function(){
\t\t\t\t\t\t//alert('io')
\t\t\t\t\t\tvar mois = \$('#mois_res_ca').val();
\t\t\t\t\t\tvar annee = \$('#annee_res_ca').val();
                        var data = {'data' : mois+\"-\"+annee};
                        //alert(data.data);
\t\t\t\t\t\t\$.ajax({
\t\t\t\t\t\t\turl : \"/admin/filtre/graph/res_ca/\"+pseudo_hotel,
\t\t\t\t\t\t\ttype : \"POST\",
\t\t\t\t\t\t\tdata : data,
\t\t\t\t\t\t\tsuccess : function(response){
\t\t\t\t\t\t\t\tif(response){
\t\t\t\t\t\t\t\t\t//console.log(response);
\t\t\t\t\t\t\t\t\tif(mois != 'tous_les_mois'){

\t\t\t\t\t\t\t\t\t\tvar my_data = response;
\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"];

\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\tvar my_data = response;
\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"];
\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t}, 
\t\t\t\t\t\t\terror : function(error){
\t\t\t\t\t\t\t\talert('erreur server au niveau de triage chart res_ca mois '+pseudo_hotel)
\t\t\t\t\t\t\t}
\t\t\t\t\t\t})
\t\t\t\t\t})

\t\t\t\t\t\$('#annee_res_ca').on('change', function(){
\t\t\t\t\t\t//alert('io')
\t\t\t\t\t\tvar mois = \$('#mois_res_ca').val();
\t\t\t\t\t\tvar annee = \$('#annee_res_ca').val();
\t\t\t\t\t\tvar data = {'data' : mois+\"-\"+annee};
\t\t\t\t\t\t//alert(data.data);
\t\t\t\t\t\t\$.ajax({
\t\t\t\t\t\t\turl : \"/admin/filtre/graph/res_ca/\"+pseudo_hotel,
\t\t\t\t\t\t\ttype : \"POST\",
\t\t\t\t\t\t\tdata : data,
\t\t\t\t\t\t\tsuccess : function(response){
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\tif(response){
\t\t\t\t\t\t\t\t\t//console.log(response);
\t\t\t\t\t\t\t\t\tif(mois != 'tous_les_mois'){

\t\t\t\t\t\t\t\t\t\tvar my_data = response;
\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"];

\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\tvar my_data = response;
\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"];
\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t}, 
\t\t\t\t\t\t\terror : function(error){
\t\t\t\t\t\t\t\talert('erreur server au niveau de triage chart res_ca annee'+pseudo_hotel)
\t\t\t\t\t\t\t}
\t\t\t\t\t\t})
                    })
                    
                        /*  couverts */
\t
\t\t\t\t\t\t\$('#mois_res_couvert').on('change', function(){
\t\t\t\t\t\t\t//alert('io')
\t\t\t\t\t\t\tvar mois = \$('#mois_res_couvert').val();
\t\t\t\t\t\t\tvar annee = \$('#annee_res_couvert').val();
\t                        var data = {'data' : mois+\"-\"+annee};
\t                        //alert(data.data);
\t\t\t\t\t\t\t\$.ajax({
\t\t\t\t\t\t\t\turl : \"/admin/filtre/graph/res_couvert/\"+pseudo_hotel,
\t\t\t\t\t\t\t\ttype : \"POST\",
\t\t\t\t\t\t\t\tdata : data,
\t\t\t\t\t\t\t\tsuccess : function(response){
\t\t\t\t\t\t\t\t\tif(response){
\t\t\t\t\t\t\t\t\t    console.log(response);
\t\t\t\t\t\t\t\t\t\tif(mois != 'tous_les_mois'){
\t
\t\t\t\t\t\t\t\t\t\t\tvar my_data_pd = response[0];
                                            var my_data_d = response[1];
                                            var my_data_di = response[2];
                                            var my_data_total = response[3];
\t\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"];
\t
\t\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
                                                
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            } else {
 
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            }
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\t\tvar my_data_pd = response[0];
                                            var my_data_d = response[1];
                                            var my_data_di = response[2];
                                            var my_data_total = response[3];
\t\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"];
\t\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
                                                
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            } else {
 
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            }
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}, 
\t\t\t\t\t\t\t\terror : function(error){
\t\t\t\t\t\t\t\t\talert('erreur server au niveau de triage chart res_couvert mois '+pseudo_hotel)
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t})
\t\t\t\t\t\t})
\t
\t\t\t\t\t\t\$('#annee_res_couvert').on('change', function(){
\t\t\t\t\t\t\t//alert('io')
\t\t\t\t\t\t\tvar mois = \$('#mois_res_couvert').val();
\t\t\t\t\t\t\tvar annee = \$('#annee_res_couvert').val();
\t                        var data = {'data' : mois+\"-\"+annee};
\t                        //alert(data.data);
\t\t\t\t\t\t\t\$.ajax({
\t\t\t\t\t\t\t\turl : \"/admin/filtre/graph/res_couvert/\"+pseudo_hotel,
\t\t\t\t\t\t\t\ttype : \"POST\",
\t\t\t\t\t\t\t\tdata : data,
\t\t\t\t\t\t\t\tsuccess : function(response){
\t\t\t\t\t\t\t\t\tif(response){
\t\t\t\t\t\t\t\t\t    console.log(response);
\t\t\t\t\t\t\t\t\t\tif(mois != 'tous_les_mois'){
\t
\t\t\t\t\t\t\t\t\t\t\tvar my_data_pd = response[0];
                                            var my_data_d = response[1];
                                            var my_data_di = response[2];
                                            var my_data_total = response[3];
\t\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"];
\t
\t\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
                                                
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            } else {
 
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            }
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\t\tvar my_data_pd = response[0];
                                            var my_data_d = response[1];
                                            var my_data_di = response[2];
                                            var my_data_total = response[3];
\t\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"];
\t\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
                                                
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            } else {
 
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            }
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}, 
\t\t\t\t\t\t\t\terror : function(error){
\t\t\t\t\t\t\t\t\talert('erreur server au niveau de triage chart res_couvert mois '+pseudo_hotel)
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t})
\t\t\t\t\t\t})


        })
\t</script>


";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

    }

    public function getTemplateName()
    {
        return "page/restaurant.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  997 => 738,  976 => 719,  967 => 717,  963 => 716,  958 => 713,  949 => 711,  945 => 710,  940 => 707,  931 => 705,  927 => 704,  922 => 701,  913 => 699,  909 => 698,  904 => 695,  895 => 693,  891 => 692,  359 => 162,  349 => 161,  319 => 139,  308 => 137,  304 => 136,  268 => 102,  257 => 100,  253 => 99,  202 => 51,  193 => 45,  188 => 43,  182 => 42,  175 => 38,  170 => 36,  164 => 35,  157 => 31,  152 => 29,  146 => 28,  139 => 24,  134 => 22,  128 => 21,  115 => 10,  105 => 9,  92 => 7,  82 => 6,  71 => 3,  61 => 2,  38 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% extends \"base.html.twig\" %}
{% block title %}
\tRestaurant
{% endblock %}

{% block stylesheets %}
\t<link rel=\"stylesheet\" href=\"{{ asset('css/dashboard.css')}}\">
{% endblock %}
{% block body %}
\t<section
\t\tid=\"contents\" class=\"container-fluid\">
\t\t<!-- entete content -->
\t\t<div id=\"top-content\">
\t\t\t<div id=\"entete_fixed\">
\t\t\t\t<ul>
\t\t\t\t\t<li>
\t\t\t\t\t\t<a href=\"#\" id=\"btn_drop_side_menu\">
\t\t\t\t\t\t\t<i data-show=\"show-side-navigation1\" class=\"fa fa-bars show-side-btn\"></i>
\t\t\t\t\t\t</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li {% if hotel == \"royal_beach\" %} class=\"logo_active\" {% endif %}>
\t\t\t\t\t\t<a href=\"{{ path('royal_beach', {'current_page' : current_page }) }}\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<img src=\"{{asset('images/hazo1.png')}}\" alt=\"logo1\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li {% if hotel == \"calypso\" %} class=\"logo_active\" {% endif %}>
\t\t\t\t\t\t<a href=\"{{ path('calypso', {'current_page' : current_page }) }}\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<img src=\"{{ asset('images/hazo2.png') }}\" alt=\"logo2\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li {% if hotel == \"baobab_tree\" %} class=\"logo_active\" {% endif %}>
\t\t\t\t\t\t<a href=\"{{ path('baobab_tree', {'current_page' : current_page }) }}\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<img src=\"{{ asset('images/hazo3.png') }}\" alt=\"logo3\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li {% if hotel == \"vanila_hotel\" %} class=\"logo_active\" {% endif %}>
\t\t\t\t\t\t<a href=\"{{ path('vanila_hotel', {'current_page' : current_page }) }}\">
\t\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t\t<img src=\"{{ asset('images/hazo4.png') }}\" alt=\"logo4\">
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t</a>
\t\t\t\t\t</li>
\t\t\t\t\t<li id=\"log_out_entete\">
\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t<a href=\"{{ path('app_logout') }}\">
\t\t\t\t\t\t\t\t<span aria-hidden=\"true\" class=\"fa fa-power-off fa-2x\"></span>
\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t</div>
\t\t\t\t\t</li>
\t\t\t\t</ul>
\t\t\t</div>

\t\t</div>

\t\t<!-- / entete content -->

\t\t<!-- contenue nouveau client -->
\t\t<div id=\"hrs_content\">
\t\t\t<div>
\t\t\t\t<div class=\"col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12\">
\t\t\t\t\t<section class=\"section_part\" id=\"section_part_top\">
\t\t\t\t\t\t<div class=\"sous_titre\">
\t\t\t\t\t\t\t<h3>Restaurant
\t\t\t\t\t\t\t</h3>
\t\t\t\t\t\t</div>
\t\t\t\t\t</section>
\t\t\t\t</div>
\t\t\t\t<div
\t\t\t\t\tclass=\"col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12\">
\t\t\t\t\t<!-- debut chart 1 -->
\t\t\t\t\t<section class=\"section_part tab_content margin_tab\">
\t\t\t\t\t\t<div class=\"chart_title\">
\t\t\t\t\t\t\t<div class=\"chart_title-part\" id=\"div__1\">
\t\t\t\t\t\t\t\t<h4>Chiffre d'affaire</h4>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<form action=\"\" class=\"tri\">
\t\t\t\t\t\t\t\t<select name=\"\" id=\"mois_res_ca\">
\t\t\t\t\t\t\t\t\t<option selected=\"selected\" value=\"tous_les_mois\">Tous les mois</option>
\t\t\t\t\t\t\t\t\t<option value=\"01\">Janvier</option>
\t\t\t\t\t\t\t\t\t<option value=\"02\">Février</option>
\t\t\t\t\t\t\t\t\t<option value=\"03\">Mars</option>
\t\t\t\t\t\t\t\t\t<option value=\"04\">Avril</option>
\t\t\t\t\t\t\t\t\t<option value=\"05\">Mai</option>
\t\t\t\t\t\t\t\t\t<option value=\"06\">Juin</option>
\t\t\t\t\t\t\t\t\t<option value=\"07\">Juillet</option>
\t\t\t\t\t\t\t\t\t<option value=\"08\">Août</option>
\t\t\t\t\t\t\t\t\t<option value=\"09\">Septembre</option>
\t\t\t\t\t\t\t\t\t<option value=\"10\">Octobre</option>
\t\t\t\t\t\t\t\t\t<option value=\"11\">Novembre</option>
\t\t\t\t\t\t\t\t\t<option value=\"12\">Décembre</option>
\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t<select name=\"\" class=\"annee\" id=\"annee_res_ca\">
\t\t\t\t\t\t\t\t\t{% for a in tab_annee %}
\t\t\t\t\t\t\t\t\t\t<option value=\"{{ a }}\">{{ a }}</option>
\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t</form>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t<canvas id=\"canvas_nc\"></canvas>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div id=\"chart-legends_nc\"></div>

\t\t\t\t\t</section>
\t\t\t\t\t<!-- fin chart 1 -->

\t\t\t\t\t<!-- debut chart 2 -->
\t\t\t\t\t<section class=\"section_part tab_content margin_tab\">
\t\t\t\t\t\t<div class=\"chart_title\">
\t\t\t\t\t\t\t<div class=\"chart_title-part\" id=\"div__3\">
\t\t\t\t\t\t\t\t<h4>Nombre de couvert</h4>
\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t<form action=\"\" class=\"tri\">
\t\t\t\t\t\t\t\t<select name=\"\" id=\"mois_res_couvert\">
\t\t\t\t\t\t\t\t\t<option selected=\"selected\" value=\"tous_les_mois\">Tous les mois</option>
\t\t\t\t\t\t\t\t\t<option value=\"01\">Janvier</option>
\t\t\t\t\t\t\t\t\t<option value=\"02\">Février</option>
\t\t\t\t\t\t\t\t\t<option value=\"03\">Mars</option>
\t\t\t\t\t\t\t\t\t<option value=\"04\">Avril</option>
\t\t\t\t\t\t\t\t\t<option value=\"05\">Mai</option>
\t\t\t\t\t\t\t\t\t<option value=\"06\">Juin</option>
\t\t\t\t\t\t\t\t\t<option value=\"07\">Juillet</option>
\t\t\t\t\t\t\t\t\t<option value=\"08\">Août</option>
\t\t\t\t\t\t\t\t\t<option value=\"09\">Septembre</option>
\t\t\t\t\t\t\t\t\t<option value=\"10\">Octobre</option>
\t\t\t\t\t\t\t\t\t<option value=\"11\">Novembre</option>
\t\t\t\t\t\t\t\t\t<option value=\"12\">Décembre</option>
\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t\t<select name=\"\" class=\"annee\" id=\"annee_res_couvert\">
\t\t\t\t\t\t\t\t\t{% for a in tab_annee %}
\t\t\t\t\t\t\t\t\t\t<option value=\"{{ a }}\">{{ a }}</option>
\t\t\t\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t\t\t\t</select>
\t\t\t\t\t\t\t</form>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div>
\t\t\t\t\t\t\t<canvas id=\"canvas_car\"></canvas>
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div id=\"chart-legends_car\"></div>


\t\t\t\t\t</section>
\t\t\t\t\t<!-- fin chart2  -->

\t\t\t\t</div>


\t\t\t</div>
\t\t</div>
\t\t<!-- / contenue nouveau client -->
\t</section>

{% endblock %}

{% block javascripts %}
    <script>
        \$(document).ready(function () {
                    function draw_chart1(my_data, my_labels) {

                        var ctx1 = document.getElementById('canvas_nc').getContext(\"2d\");


                        var gradientfill_1 = ctx1.createLinearGradient(0, 0, 0, 320);
                        gradientfill_1.addColorStop(0, '#d29e00');
                        gradientfill_1.addColorStop(1, 'transparent');

                        var gradientfill_2 = ctx1.createLinearGradient(0, 0, 0, 320);
                        gradientfill_2.addColorStop(0, '#55d8ff');
                        gradientfill_2.addColorStop(1, 'transparent');

                        var config1 = {
                            type: 'line',
                            data: {
                                datasets: [
                                    {
                                        label: \"Chiffre d'affaire\",
                                        fill: true,
                                        backgroundColor: gradientfill_1,
                                        borderColor: \"#d29e00\",

                                        /* insertion des données sur l'axe (ox) */

                                        data: my_data,

                                        /* insertion des données sur l'axe (ox) */

                                        pointStyle: 'circle',
                                        pointBackgroundColor: \"transparent\",
                                        pointBorderWidth: '2',
                                        radius: '5',
                                        hoverRadius: '5',
                                        borderWidth: 2

                                    }
                                ]
                            },
                            options: 
                            {
                                    legend: {
                                        display: false,
                                        align: 'start',
                                        position: 'bottom'

                                    },

                                    legendCallback: function (chart) {
                                        var text = [];
                                        text.push('<ul class=\"my_liste_legend ul_1\">');
                                        for (var i = 0; i < chart.data.datasets.length; i++) {
                                            console.log(chart.data.datasets[i]); // see what's inside the obj.
                                            text.push('<li>');
                                            text.push('<span data_leg = \"' + i + '\" style=\"background-color:' + chart.data.datasets[i].borderColor + '\">' + '</span><b data_leg = \"' + i + '\">' + chart.data.datasets[i].label + '</b>');
                                            text.push('</li>');
                                        }
                                        text.push('</ul>');
                                        return text.join(\"\");
                                    },
                                    responsive: true,
                                    title: {
                                        display: true,
                                        text: ''
                                    },
                                    tooltips: {
                                        mode: 'index',
                                        intersect: false
                                    },
                                    hover: {
                                        mode: 'nearest',
                                        intersect: true
                                    },

                                    scales: {

                                        xAxes: [
                                            {
                                                type: 'category',

                                                /* insertion des données sur l'axe (ox) */

                                                labels: my_labels,

                                                    /*  / insertion des données sur l'axe (ox) */

                                                gridLines: {
                                                    drawOnChartArea: true,
                                                    drawTicks: false,
                                                    color: \"#f0f2f4\"
                                                },

                                                ticks: {
                                                    padding: 20 // pour le marge % axe x
                                                }
                                            }
                                        ],
                                        yAxes: [
                                            {
                                                gridLines: {
                                                    drawOnChartArea: true,
                                                    drawTicks: false,
                                                    color: \"#dddfe1\"
                                                },
                                                ticks: {
                                                    padding: 20, // pour le marge % axe y
                                                    min: 0,
                                                    max: 100,
                                                    stepSize: 20,
                                                    callback: function (value) {
                                                        return value + \" M Ar\"
                                                    }
                                                },
                                                display: true,
                                                scaleLabel: {
                                                    display: true,
                                                    labelString: ''
                                            }
                                        }
                                    ]
                                }
                            }

                        };
                            // si on veut ajouter un marge bottom des legendes
                            // Chart.Legend.prototype.afterFit = function() {
                            //     this.height = this.height + 150;

                            // };
                        var myChart1 = new Chart(ctx1, config1);
                        // pour dire qu'on va utiliser notre propre légende html fenitra
                        document.getElementById('chart-legends_nc').innerHTML = myChart1.generateLegend();

                        // legende 1

                        var ev_click = false;
                        var tab_temp = [];
                        for (var i = 0; i < myChart1.data.datasets[0].data.length; i++) { // myChart1.data.datasets[0].data[i]= -10;
                            tab_temp[i] = myChart1.data.datasets[0].data[i];
                        }
                        \$(\"#chart-legends_nc\").on('click', \"li span[data_leg=0]\", function () {

                            if (ev_click == false) {
                                \$(\".ul_1 li span[data_leg=0]\").addClass(\"legende_click\");
                                for (var i = 0; i < myChart1.data.datasets[0].data.length; i++) {
                                    myChart1.data.datasets[0].data[i] = -10;
                                    }
                                myChart1.update();
                                ev_click = ! ev_click;
                                // alert(ev_click) ;
                            } else {
                                \$(\".ul_1 li span[data_leg=0]\").removeClass(\"legende_click\");
                                for (var i = 0; i < myChart1.data.datasets[0].data.length; i++) {
                                    myChart1.data.datasets[0].data[i] = tab_temp[i];
                                }
                                myChart1.update();
                                ev_click = ! ev_click;
                                // alert(ev_click) ;
                            }
                        });

                        // fin legende 1


                        // fin chart 1

                        return myChart1;
                    }


                    // debut chart  2


                    function draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_t, my_labels) {

                        var ctx2 = document.getElementById('canvas_car').getContext(\"2d\");


                        // var gradientstroke = ctx.createLinearGradient(700, 0, 0, 0);
                        // gradientstroke.addColorStop(0, '#00d8c0');
                        // gradientstroke.addColorStop(1, '#ff6a72');

                        var gradientfill_1 = ctx2.createLinearGradient(0, 0, 0, 320);
                        gradientfill_1.addColorStop(0, '#d29e00');
                        gradientfill_1.addColorStop(1, 'transparent');

                        var gradientfill_2 = ctx2.createLinearGradient(0, 0, 0, 320);
                        gradientfill_2.addColorStop(0, '#55d8ff');
                        gradientfill_2.addColorStop(1, 'transparent');

                        var gradientfill_3 = ctx2.createLinearGradient(0, 0, 0, 350);
                        gradientfill_3.addColorStop(0, '#3bc40a');
                        gradientfill_3.addColorStop(1, 'transparent');


                        var gradientfill_4 = ctx2.createLinearGradient(0, 0, 0, 350);
                        gradientfill_4.addColorStop(0, '#6e6e6e');
                        gradientfill_4.addColorStop(1, 'transparent');

                        var config2 = {
                            type: 'line',
                            data: {
                                datasets: [
                                {
                                    label: \"Petit déjeuner\",
                                    fill: true,
                                    backgroundColor: gradientfill_1,
                                    borderColor: \"#d29e00\",

                                    /* insertion des données sur l'axe (oy) */

                                    data: my_data_pd,

                                    /* / insertion des données sur l'axe (oy) */

                                        pointStyle: 'circle',
                                        pointBackgroundColor: \"transparent\",
                                        pointBorderWidth: '2',
                                        radius: '5',
                                        hoverRadius: '5',
                                        borderWidth: 2

                                    }, 
                                    {
                                        label: \"Déjeuner\",
                                        fill: true,
                                        backgroundColor: gradientfill_2,
                                        borderColor: \"#55d8ff\",

                                        /* insertion des données sur l'axe (oy) */

                                        data: my_data_d,

                                        /* /insertion des données sur l'axe (oy) */

                                            pointStyle: 'circle',
                                            pointBackgroundColor: \"transparent\",
                                            pointBorderWidth: '2',
                                            radius: '5',
                                            hoverRadius: '5',
                                            borderWidth: 2
                                        }, 
                                        {
                                            label: \"Dinner\",
                                            fill: true,
                                            backgroundColor: gradientfill_3,
                                            borderColor: \"#3bc40a\",

                                            /* insertion des données sur l'axe (oy) */

                                            data: my_data_di,

                                            /* insertion des données sur l'axe (oy) */

                                                pointStyle: 'circle',
                                                pointBackgroundColor: \"transparent\",
                                                pointBorderWidth: '2',
                                                radius: '5',
                                                hoverRadius: '5',
                                                borderWidth: 2
                                            }, 
                                            {
                                                label: \"Total\",
                                                fill: true,
                                                backgroundColor: gradientfill_4,
                                                borderColor: \"#6e6e6e\",

                                                /* insertion des données sur l'axe (oy) */

                                                data: my_data_t,

                                            /* / insertion des données sur l'axe (oy) */

                                            pointStyle: 'circle',
                                            pointBackgroundColor: \"transparent\",
                                            pointBorderWidth: '2',
                                            radius: '5',
                                            hoverRadius: '5',
                                            borderWidth: 2
                                            }
                                        ]
                                    },
                                    options: {
                                        legend: {
                                            display: false,
                                            align: 'start',
                                            position: 'bottom'

                                        },

                                        legendCallback: function (chart) {
                                            var text = [];
                                            text.push('<ul class=\"my_liste_legend ul_2\">');
                                            for (var i = 0; i < chart.data.datasets.length; i++) {
                                                console.log(chart.data.datasets[i]); // see what's inside the obj.
                                                text.push('<li>');
                                                text.push('<span data_leg = \"' + i + '\" style=\"background-color:' + chart.data.datasets[i].borderColor + '\">' + '</span><b data_leg = \"' + i + '\">' + chart.data.datasets[i].label + '</b>');
                                                text.push('</li>');
                                            }
                                            text.push('</ul>');
                                            return text.join(\"\");
                                        },
                                        responsive: true,
                                            title: {
                                                display: true,
                                                text: ''
                                            },
                                        tooltips: {
                                            mode: 'index',
                                            intersect: false
                                        },
                                        hover: {
                                            mode: 'nearest',
                                            intersect: true
                                        },

                                        scales: {

                                            xAxes: [
                                            {
                                                type: 'category',

                                                /* insertion des données sur l'axe (ox) */

                                                labels: my_labels,

                                                /* / insertion des données sur l'axe (ox) */

                                                gridLines: {
                                                    drawOnChartArea: true,
                                                    drawTicks: false,
                                                    color: \"#f0f2f4\"
                                                },

                                                ticks: {
                                                    padding: 20 // pour le marge % axe x
                                                }
                                            }
                                        ],
                                        yAxes: [
                                        {
                                            gridLines: {
                                                drawOnChartArea: true,
                                                drawTicks: false,
                                                color: \"#dddfe1\"
                                            },
                                            ticks: {
                                                padding: 20, // pour le marge % axe y
                                                min: 0,
                                                max: 300,
                                                stepSize : 50,
                                                callback: function (value) {
                                                    return value + \" Couverts\"
                                                }
                                            },
                                            display: true,
                                            scaleLabel: {
                                                display: true,
                                                labelString: ''
                                        }
                                    }
                                ]
                            }
                        }

                    };
                    // si on veut ajouter un marge bottom des legendes
                    // Chart.Legend.prototype.afterFit = function() {
                    //     this.height = this.height + 150;

                    // };
                    var myChart2 = new Chart(ctx2, config2);
                    // pour dire qu'on va utiliser notre propre légende html fenitra
                    document.getElementById('chart-legends_car').innerHTML = myChart2.generateLegend();

                    // legende 1

                    var ev_click = false;
                    var tab_temp = [];
                    for (var i = 0; i < myChart2.data.datasets[0].data.length; i++) { // myChart2.data.datasets[0].data[i]= -10;
                        tab_temp[i] = myChart2.data.datasets[0].data[i];
                    }
                    \$(\"#chart-legends_car\").on('click', \"li span[data_leg=0]\", function () {

                        if (ev_click == false) {
                                \$(\".ul_2 li span[data_leg=0]\").addClass(\"legende_click\");
                                for (var i = 0; i < myChart2.data.datasets[0].data.length; i++) {
                                    myChart2.data.datasets[0].data[i] = -10;
                                }
                                myChart2.update();
                                ev_click = ! ev_click;
                            // alert(ev_click) ;
                        } else {
                            \$(\".ul_2 li span[data_leg=0]\").removeClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[0].data.length; i++) {
                                myChart2.data.datasets[0].data[i] = tab_temp[i];
                            }
                            myChart2.update();
                            ev_click = ! ev_click;
                            // alert(ev_click) ;
                        }
                    });

                    // fin legende 1

                    // legende 2

                    var ev_click2 = false;
                    var tab_temp2 = [];
                    for (var i = 0; i < myChart2.data.datasets[1].data.length; i++) { // myChart2.data.datasets[0].data[i]= -10;
                        tab_temp2[i] = myChart2.data.datasets[1].data[i];
                    }
                    \$(\"#chart-legends_car\").on('click', \"li span[data_leg=1]\", function () {

                        if (ev_click2 == false) {
                            \$(\".ul_2 li span[data_leg=1]\").addClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[1].data.length; i++) {
                                myChart2.data.datasets[1].data[i] = -10;
                            }
                            myChart2.update();
                            ev_click2 = ! ev_click2;
                            // alert(ev_click2) ;
                        } else {
                        \$(\".ul_2 li span[data_leg=1]\").removeClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[1].data.length; i++) {
                                myChart2.data.datasets[1].data[i] = tab_temp2[i];
                            }
                            myChart2.update();
                            ev_click2 = ! ev_click2;
                            // alert(ev_click2) ;
                        }
                    });

                    // fin legende 2

                    // legende 3

                    var ev_click3 = false;
                    var tab_temp3 = [];
                    for (var i = 0; i < myChart2.data.datasets[2].data.length; i++) { // myChart2.data.datasets[0].data[i]= -10;
                        tab_temp3[i] = myChart2.data.datasets[2].data[i];
                    }
                    \$(\"#chart-legends_car\").on('click', \"li span[data_leg=2]\", function () {

                        if (ev_click3 == false) {
                            \$(\".ul_2 li span[data_leg=2]\").addClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[2].data.length; i++) {
                                myChart2.data.datasets[2].data[i] = -10;
                            }
                            myChart2.update();
                            ev_click3 = ! ev_click3;
                            // alert(ev_click3) ;
                        } else {
                        \$(\".ul_2 li span[data_leg=2]\").removeClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[2].data.length; i++) {
                                myChart2.data.datasets[2].data[i] = tab_temp3[i];
                            }
                            myChart2.update();
                            ev_click3 = ! ev_click3;
                            // alert(ev_click3) ;
                        }
                    });

                    // fin legende 3

                    // legende 4

                    var ev_click4 = false;
                    var tab_temp4 = [];
                    for (var i = 0; i < myChart2.data.datasets[3].data.length; i++) { // myChart2.data.datasets[0].data[i]= -10;
                        tab_temp4[i] = myChart2.data.datasets[3].data[i];
                    }
                    \$(\"#chart-legends_car\").on('click', \"li span[data_leg=3]\", function () {

                        if (ev_click4 == false) {
                            \$(\".ul_2 li span[data_leg=3]\").addClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[3].data.length; i++) {
                                myChart2.data.datasets[3].data[i] = -10;
                            }
                            myChart2.update();
                            ev_click4 = ! ev_click4;
                            // alert(ev_click4) ;
                        } else {
                        \$(\".ul_2 li span[data_leg=3]\").removeClass(\"legende_click\");
                            for (var i = 0; i < myChart2.data.datasets[3].data.length; i++) {
                                myChart2.data.datasets[3].data[i] = tab_temp4[i];
                            }
                            myChart2.update();
                            ev_click4 = ! ev_click4;
                            // alert(ev_click4) ;
                        }
                    });

                    // fin legende 4


                    return myChart2;
                }

                    // responsive pour les chart

                    function add_resp_heb(myChart1, myChart2) {
                        myChart1.options.scales.yAxes[0].ticks.fontSize = 7;
                        myChart1.options.scales.yAxes[0].ticks.padding = 10;
                        myChart1.options.scales.yAxes[0].ticks.stepSize = 20;
                        myChart1.options.scales.xAxes[0].ticks.stepSize = 0;
                        myChart1.options.scales.xAxes[0].ticks.fontSize = 8;

                        myChart2.options.scales.yAxes[0].ticks.fontSize = 7;
                        myChart2.options.scales.yAxes[0].ticks.padding = 10;
                        myChart2.options.scales.yAxes[0].ticks.stepSize = 20;
                        myChart2.options.scales.xAxes[0].ticks.stepSize = 0;
                        myChart2.options.scales.xAxes[0].ticks.fontSize = 8;
                        for (var i = myChart1.data.datasets.length - 1; i >= 0; i--) {
                            myChart1.data.datasets[i].radius = '3';
                        }
                        myChart1.update();
                        myChart2.options.scales.yAxes[0].ticks.fontSize = 7;
                        myChart2.options.scales.xAxes[0].ticks.fontSize = 7;
                        for (var i = myChart2.data.datasets.length - 1; i >= 0; i--) {
                            myChart2.data.datasets[i].radius = '3';
                        }
                        myChart2.update();
                    }

                // tracer
                    // tracer
\t\t\t\t\tvar my_data_ca = [
\t\t\t\t\t\t{% for t in tab_res_ca %}
\t\t\t\t\t\t\t{{ t }},
\t\t\t\t\t\t{% endfor %}
\t\t\t\t\t];

                    var my_data_pd = [
                        {% for t in tab_res_pd %}
\t\t\t\t\t\t\t{{ t }},
\t\t\t\t\t\t{% endfor %}
                    ]

                    var my_data_d = [
                        {% for t in tab_res_d %}
\t\t\t\t\t\t\t{{ t }},
\t\t\t\t\t\t{% endfor %}
                    ]

                    var my_data_di = [
                        {% for t in tab_res_di %}
\t\t\t\t\t\t\t{{ t }},
\t\t\t\t\t\t{% endfor %}
                    ]

                    var my_data_total = [
                        {% for t in tab_res_total %}
\t\t\t\t\t\t\t{{ t }},
\t\t\t\t\t\t{% endfor %}
                    ]


\t\t\t\t\tvar my_labels = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"];

                
                    var w = \$(window).width();
                    if (w <= 768) {
                        var myChart1 = draw_chart1(my_data_ca, my_labels);
                        var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                        add_resp_heb(myChart1, myChart2);
                    } else {
                        var myChart1 = draw_chart1(my_data_ca, my_labels);
                        var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                    }
                
                /* tri graph res  */

                // triage chart res_ca
                    var pseudo_hotel = \"{{ hotel }}\" ;

\t\t\t\t\t\$('#mois_res_ca').on('change', function(){
\t\t\t\t\t\t//alert('io')
\t\t\t\t\t\tvar mois = \$('#mois_res_ca').val();
\t\t\t\t\t\tvar annee = \$('#annee_res_ca').val();
                        var data = {'data' : mois+\"-\"+annee};
                        //alert(data.data);
\t\t\t\t\t\t\$.ajax({
\t\t\t\t\t\t\turl : \"/admin/filtre/graph/res_ca/\"+pseudo_hotel,
\t\t\t\t\t\t\ttype : \"POST\",
\t\t\t\t\t\t\tdata : data,
\t\t\t\t\t\t\tsuccess : function(response){
\t\t\t\t\t\t\t\tif(response){
\t\t\t\t\t\t\t\t\t//console.log(response);
\t\t\t\t\t\t\t\t\tif(mois != 'tous_les_mois'){

\t\t\t\t\t\t\t\t\t\tvar my_data = response;
\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"];

\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\tvar my_data = response;
\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"];
\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t}, 
\t\t\t\t\t\t\terror : function(error){
\t\t\t\t\t\t\t\talert('erreur server au niveau de triage chart res_ca mois '+pseudo_hotel)
\t\t\t\t\t\t\t}
\t\t\t\t\t\t})
\t\t\t\t\t})

\t\t\t\t\t\$('#annee_res_ca').on('change', function(){
\t\t\t\t\t\t//alert('io')
\t\t\t\t\t\tvar mois = \$('#mois_res_ca').val();
\t\t\t\t\t\tvar annee = \$('#annee_res_ca').val();
\t\t\t\t\t\tvar data = {'data' : mois+\"-\"+annee};
\t\t\t\t\t\t//alert(data.data);
\t\t\t\t\t\t\$.ajax({
\t\t\t\t\t\t\turl : \"/admin/filtre/graph/res_ca/\"+pseudo_hotel,
\t\t\t\t\t\t\ttype : \"POST\",
\t\t\t\t\t\t\tdata : data,
\t\t\t\t\t\t\tsuccess : function(response){
\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\tif(response){
\t\t\t\t\t\t\t\t\t//console.log(response);
\t\t\t\t\t\t\t\t\tif(mois != 'tous_les_mois'){

\t\t\t\t\t\t\t\t\t\tvar my_data = response;
\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"];

\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\tvar my_data = response;
\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"];
\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t} else {
\t\t\t\t\t\t\t\t\t\t\tvar myChart1 = draw_chart1(my_data, my_labels);
\t\t\t\t\t\t\t\t\t\t\tmyChart1.update();
\t\t\t\t\t\t\t\t\t\t\t//add_resp_heb(myChart1, myChart1);
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t}, 
\t\t\t\t\t\t\terror : function(error){
\t\t\t\t\t\t\t\talert('erreur server au niveau de triage chart res_ca annee'+pseudo_hotel)
\t\t\t\t\t\t\t}
\t\t\t\t\t\t})
                    })
                    
                        /*  couverts */
\t
\t\t\t\t\t\t\$('#mois_res_couvert').on('change', function(){
\t\t\t\t\t\t\t//alert('io')
\t\t\t\t\t\t\tvar mois = \$('#mois_res_couvert').val();
\t\t\t\t\t\t\tvar annee = \$('#annee_res_couvert').val();
\t                        var data = {'data' : mois+\"-\"+annee};
\t                        //alert(data.data);
\t\t\t\t\t\t\t\$.ajax({
\t\t\t\t\t\t\t\turl : \"/admin/filtre/graph/res_couvert/\"+pseudo_hotel,
\t\t\t\t\t\t\t\ttype : \"POST\",
\t\t\t\t\t\t\t\tdata : data,
\t\t\t\t\t\t\t\tsuccess : function(response){
\t\t\t\t\t\t\t\t\tif(response){
\t\t\t\t\t\t\t\t\t    console.log(response);
\t\t\t\t\t\t\t\t\t\tif(mois != 'tous_les_mois'){
\t
\t\t\t\t\t\t\t\t\t\t\tvar my_data_pd = response[0];
                                            var my_data_d = response[1];
                                            var my_data_di = response[2];
                                            var my_data_total = response[3];
\t\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"];
\t
\t\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
                                                
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            } else {
 
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            }
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\t\tvar my_data_pd = response[0];
                                            var my_data_d = response[1];
                                            var my_data_di = response[2];
                                            var my_data_total = response[3];
\t\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"];
\t\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
                                                
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            } else {
 
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            }
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}, 
\t\t\t\t\t\t\t\terror : function(error){
\t\t\t\t\t\t\t\t\talert('erreur server au niveau de triage chart res_couvert mois '+pseudo_hotel)
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t})
\t\t\t\t\t\t})
\t
\t\t\t\t\t\t\$('#annee_res_couvert').on('change', function(){
\t\t\t\t\t\t\t//alert('io')
\t\t\t\t\t\t\tvar mois = \$('#mois_res_couvert').val();
\t\t\t\t\t\t\tvar annee = \$('#annee_res_couvert').val();
\t                        var data = {'data' : mois+\"-\"+annee};
\t                        //alert(data.data);
\t\t\t\t\t\t\t\$.ajax({
\t\t\t\t\t\t\t\turl : \"/admin/filtre/graph/res_couvert/\"+pseudo_hotel,
\t\t\t\t\t\t\t\ttype : \"POST\",
\t\t\t\t\t\t\t\tdata : data,
\t\t\t\t\t\t\t\tsuccess : function(response){
\t\t\t\t\t\t\t\t\tif(response){
\t\t\t\t\t\t\t\t\t    console.log(response);
\t\t\t\t\t\t\t\t\t\tif(mois != 'tous_les_mois'){
\t
\t\t\t\t\t\t\t\t\t\t\tvar my_data_pd = response[0];
                                            var my_data_d = response[1];
                                            var my_data_di = response[2];
                                            var my_data_total = response[3];
\t\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\",\"24\",\"25\",\"26\",\"27\",\"28\",\"29\",\"30\",\"31\"];
\t
\t\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
                                                
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            } else {
 
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            }
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t\telse{
\t\t\t\t\t\t\t\t\t\t\tvar my_data_pd = response[0];
                                            var my_data_d = response[1];
                                            var my_data_di = response[2];
                                            var my_data_total = response[3];
\t\t\t\t\t\t\t\t\t\t\t//console.log(my_data);
\t\t\t\t\t\t\t\t\t\t\tvar my_labels = [\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sept\",\"Oct\",\"Nov\",\"Dec\"];
\t\t\t\t\t\t\t\t\t\t\tvar w = \$(window).width();
\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t\t\tif (w <= 768) {
                                                
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            } else {
 
                                                var myChart2 = draw_chart2(my_data_pd, my_data_d, my_data_di, my_data_total, my_labels);
                                                myChart2.update();
                                            }
\t\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t\t}, 
\t\t\t\t\t\t\t\terror : function(error){
\t\t\t\t\t\t\t\t\talert('erreur server au niveau de triage chart res_couvert mois '+pseudo_hotel)
\t\t\t\t\t\t\t\t}
\t\t\t\t\t\t\t})
\t\t\t\t\t\t})


        })
\t</script>


{% endblock %}
", "page/restaurant.html.twig", "F:\\Projet_symfony\\sounds\\templates\\page\\restaurant.html.twig");
    }
}
