diff --git a/src/features/grid/components/heatmap-grid.tsx b/src/features/grid/components/heatmap-grid.tsx index 440b5fa..b606af7 100644 --- a/src/features/grid/components/heatmap-grid.tsx +++ b/src/features/grid/components/heatmap-grid.tsx @@ -260,17 +260,17 @@ function TuileStat({ label, valeur, indice, couleur, icone: Icone }: { icone?: React.ComponentType<{ className?: string; style?: React.CSSProperties }>; }) { return ( -
-
+
+
{label}
-
- {Icone && } - +
+ {Icone && } + {valeur}
- {indice &&
{indice}
} + {indice &&
{indice}
}
); } @@ -300,12 +300,12 @@ function NetworkMonthlyModal({ row, onClose }: { row: ProductRow; onClose: () => : "—"; return ( - + - + {row.libelle1} -

+

Réseau · 12 mois glissants, mois en cours exclu

diff --git a/src/features/grid/components/network-charts.tsx b/src/features/grid/components/network-charts.tsx index 4ae2fce..aa2bd9d 100644 --- a/src/features/grid/components/network-charts.tsx +++ b/src/features/grid/components/network-charts.tsx @@ -135,7 +135,9 @@ export function NetworkLineChart({ } const W = 520; - const padL = 16, padR = 16, axeH = 18, enteteH = 15, ecart = 12; + // Bandeau et axe dimensionnés pour la typographie ci-dessous : agrandir les + // polices sans élargir ces bandes ferait chevaucher titres et courbes. + const padL = 16, padR = 16, axeH = 24, enteteH = 21, ecart = 14; const plotW = W - padL - padR; const H = facettes.reduce((t, f) => t + enteteH + f.hauteur + ecart, 0) - ecart + axeH; @@ -170,7 +172,7 @@ export function NetworkLineChart({ key={v} type="button" onClick={() => setVue(v)} - className="px-2.5 py-0.5 text-[10px] font-semibold rounded-md transition-colors capitalize" + className="px-3 py-1 text-[12px] font-semibold rounded-md transition-colors capitalize" style={vue === v ? { background: "var(--bg-surface)", color: "var(--text-primary)" } : { color: "var(--text-muted)" }} @@ -204,11 +206,11 @@ export function NetworkLineChart({ return ( {/* Bandeau de facette : repère coloré + titre + maximum, en encre neutre */} - - + + {f.titre} - + max {fmt(f.max, f.decimales ?? 0)}{f.unite ?? ""} @@ -242,14 +244,14 @@ export function NetworkLineChart({ // bandeau de la facette (constaté au rendu : « 58 » par-dessus // « Qté / magasin »). Dans ce cas elle bascule SOUS le point. const yPoint = f.y(f.valeurs[i]); - const dessus = yPoint - 8 >= f.haut + 8; + const dessus = yPoint - 11 >= f.haut + 8; return ( @@ -283,9 +285,9 @@ export function NetworkLineChart({ @@ -300,8 +302,8 @@ export function NetworkLineChart({ plus jamais. `pointerEvents=none` laisse passer le survol vers les cibles en dessous. */} {survol != null && (() => { - const largeur = 158; - const hauteur = 16 + disposees.length * 13 + 8; + const largeur = 196; + const hauteur = 22 + disposees.length * 17 + 8; // La bulle bascule à gauche du réticule quand elle déborderait à droite. const gauche = x(survol) + 10 + largeur > W - 4; const bx = gauche ? x(survol) - 10 - largeur : x(survol) + 10; @@ -311,18 +313,18 @@ export function NetworkLineChart({ x={bx} y={4} width={largeur} height={hauteur} rx={8} fill="var(--bg-elevated)" stroke="var(--border)" strokeWidth={1} /> - + {fmtMonthShort(labels[survol])} {disposees.map((f, k) => ( - - + + {f.titre} {fmt(f.valeurs[survol], f.decimales ?? 0)} @@ -353,7 +355,7 @@ export function NetworkLineChart({ du graphique et défile à l'intérieur : la carte garde sa taille, et aucune valeur n'est réservée au survol. */
- +
@@ -408,7 +410,7 @@ export function DualLineChart({
{series.map((s) => ( - + {s.name}
Mois