[(#REM)
/*******************************************************************************\
* BIODIV, plugin et squelette pour SPIP - https://www.spip.net/ *
* dédié à la gestion d'observations naturalistes *
* *
* Copyright (C) 2008-2025 Renaud LAURETTE *
* *
* BIODIV a été développé initialement pour le projet Biodiv.Balma de l'APCVEB *
* (Association de Protection du Cadre de Vie et de l'Environnement balmanais) *
* voir Biodiv.Balma : https://balma.biodiv.fr/ *
* voir APCVEB : https://apcveb.fr/ *
* *
* Ce programme est un logiciel libre distribué sous licence GNU/GPL. *
* Pour plus de détails voir les fichiers COPYING.txt et LICENCE-BIODIV.md *
\*******************************************************************************/
]
"#CLE" => #VALEUR
);
if(count($data) == 0) {
echo "\n";
} else {
$amin = $amax = $vmin = $vmax = $count =0;
// Mise à jour des min/max
foreach($data as $key => $value) {
// Extraction de l'année
preg_match('/x(\d{4})/',$key,$matches);
$annee = intval($matches[1]);
$count += $value;
if($i==0) {
$amin = $annee; $amax = $annee;
$i=1;
} else {
$amin = ($annee < $amin)?$annee:$amin;
$amax = ($annee > $amax)?$annee:$amax;
}
}
// Dimensionnement des axes
$da = $amax - $amin +1;
$height = $da*10;
$yview = $height + 20;
// Graphique des années-mois
echo "\n";
}
?>