diff --git a/src/notion/publish/v2/publishStatsV2.ts b/src/notion/publish/v2/publishStatsV2.ts deleted file mode 100644 index e69de29..0000000 diff --git a/src/statistiques/v2/generales/mermaidDiagramStatsGeneralesMensuelles.ts b/src/statistiques/v2/generales/mermaidDiagramStatsGeneralesMensuelles.ts index 6c3b50f..1b7e3bd 100644 --- a/src/statistiques/v2/generales/mermaidDiagramStatsGeneralesMensuelles.ts +++ b/src/statistiques/v2/generales/mermaidDiagramStatsGeneralesMensuelles.ts @@ -8,6 +8,16 @@ export function mermaidDiagramStatsGeneralesMensuelles( statsEntries.length - 15, statsEntries.length ); + const maxY = Math.max( + ...entriesToDisplay.map(([, s]) => + Math.max( + s.nbFamillesResistantes, + s.nbFamillesExResistantes, + s.nbEntrees, + s.nbSorties + ) + ) + ); const periods = entriesToDisplay.map(([p]) => { const comp = p.split("-"); // Reformat month as MM/yy @@ -22,7 +32,7 @@ config: xychart-beta title "Familles: Résist.(bleu), Ex-Résist (gris), Entrées (vert), Sorties (rouge)" x-axis "Mois" [${periods}] - y-axis "Nb Familles" 0 --> 110 + y-axis "Nb Familles" 0 --> ${maxY + 10} line [${entriesToDisplay.map(([, s]) => s.nbFamillesResistantes)}] line [${entriesToDisplay.map(([, s]) => s.nbFamillesExResistantes)}] line [${entriesToDisplay.map(([, s]) => s.nbEntrees)}]