cms.stats-femmes-hommes.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <div class="row" style="margin-top: 20x;">
  2. <div class="col-md-10" style="margin-top: 30px;">
  3. <h6 class="bg-light p-2">Général</h6>
  4. <?php
  5. $config = array(
  6. "id" => "HommeFemme",
  7. "charts" => "doughnut",
  8. "label" => "Général",
  9. "data" => array(
  10. array("label" => "Femme", "nb" => $statGeneral["Femme"]),
  11. array("label" => "Homme", "nb" => $statGeneral["Homme"])
  12. )
  13. );
  14. chart::printCanvas($config);
  15. ?>
  16. </div>
  17. <?php
  18. foreach ($statGeneral["Lieux"] as $keyLieu => $valueLieu) {
  19. if($valueLieu["Femme"] > 0 OR $valueLieu["Homme"] > 0){
  20. ?>
  21. <div class="col-md-5" style="margin-top: 30px;">
  22. <h6 class="bg-light p-2"><?= $keyLieu ?></h6>
  23. <?php
  24. $config = array(
  25. "id" => "FemmeHomme-".md5($keyLieu),
  26. "charts" => "doughnut",
  27. "label" => $keyLieu,
  28. "data" => array(
  29. array("label" => "Femme", "nb" => $valueLieu["Femme"]),
  30. array("label" => "Homme", "nb" => $valueLieu["Homme"])
  31. )
  32. );
  33. chart::printCanvas($config);
  34. ?>
  35. </div>
  36. <?php
  37. }
  38. }
  39. ?>
  40. </div>