<?php
    $statGeneral = stats::countStatistiquesGenerale();
    $stat147 = stats::countStatistiquesByLieu("147");
    $statLyon = stats::countStatistiquesByLieu("LYON");
    $statPerol = stats::countStatistiquesByLieu("PEROLS");
    $statCambacere = stats::countStatistiquesByLieu("CAMBACERE");
    $statBlagnac = stats::countStatistiquesByLieu("BLAGNAC");
    $statBouchardo = stats::countStatistiquesByLieu("BOUCHARDO"); 
?>
<div class="row" style="margin-top: 20x;">
    
    <div class="col-md-10" style="margin-top: 30px;">
        <h6 class="bg-light p-2">Général</h6>
        <?php
        $config = array(
            "id" => "HommeFemme",
            "charts" => "doughnut",
            "label" => "Général",
            "data" => array(
                array("label" => "Femme", "nb" => $statGeneral["Femme"]),
                array("label" => "Homme", "nb" => $statGeneral["Homme"])
            )
        );

        chart::printCanvas($config);
        ?>  
    </div>
    
    <div class="col-md-5" style="margin-top: 30px;">
        <h6 class="bg-light p-2">Paris - 147</h6>
        <?php
        $config = array(
            "id" => "stat147HommeFemme",
            "charts" => "doughnut",
            "label" => "Paris - 147",
            "data" => array(
                array("label" => "Femme", "nb" => $stat147["Femme"]),
                array("label" => "Homme", "nb" => $stat147["Homme"])
            )
        );

        chart::printCanvas($config);
        ?>  
    </div>
    <div class="col-md-5" style="margin-top: 30px;">
        <h6 class="bg-light p-2">Lyon</h6>
        <?php
        $config = array(
            "id" => "statLyonHommeFemme",
            "charts" => "doughnut",
            "label" => "Lyon",
            "data" => array(
                array("label" => "Femme", "nb" => $statLyon["Femme"]),
                array("label" => "Homme", "nb" => $statLyon["Homme"])
            )
        );

        chart::printCanvas($config);
        ?>  
    </div>
    
    <div class="col-md-5" style="margin-top: 30px;">
        <h6 class="bg-light p-2">Montpellier - Pérols</h6>
        <?php
        $config = array(
            "id" => "statPerolHommeFemme",
            "charts" => "doughnut",
            "label" => "Montpellier - Pérols",
            "data" => array(
                array("label" => "Femme", "nb" => $statPerol["Femme"]),
                array("label" => "Homme", "nb" => $statPerol["Homme"])
            )
        );

        chart::printCanvas($config);
        ?>  
    </div>
    <div class="col-md-5" style="margin-top: 30px;">
        <h6 class="bg-light p-2">Paris - Cambacérès</h6>
        <?php
        $config = array(
            "id" => "statCambacereHommeFemme",
            "charts" => "doughnut",
            "label" => "Paris - Cambacérès",
            "data" => array(
                array("label" => "Femme", "nb" => $statCambacere["Femme"]),
                array("label" => "Homme", "nb" => $statCambacere["Homme"])
            )
        );

        chart::printCanvas($config);
        ?>  
    </div>
    
    <div class="col-md-5" style="margin-top: 30px;">
        <h6 class="bg-light p-2">Toulouse - Blagnac</h6>
        <?php
        $config = array(
            "id" => "statBlagnacHommeFemme",
            "charts" => "doughnut",
            "label" => "Toulouse - Blagnac",
            "data" => array(
                array("label" => "Femme", "nb" => $statBlagnac["Femme"]),
                array("label" => "Homme", "nb" => $statBlagnac["Homme"])
            )
        );

        chart::printCanvas($config);
        ?>  
    </div>
    <div class="col-md-5" style="margin-top: 30px;">
        <h6 class="bg-light p-2">Paris - Bouchardo</h6>
        <?php
        $config = array(
            "id" => "statBouchardoHommeFemme",
            "charts" => "doughnut",
            "label" => "Paris - Bouchardo",
            "data" => array(
                array("label" => "Femme", "nb" => $statBouchardo["Femme"]),
                array("label" => "Homme", "nb" => $statBouchardo["Homme"])
            )
        );

        chart::printCanvas($config);
        ?>  
    </div>
    
</div>