mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-11 17:26:32 +02:00
Merge: tooltip tendance + lots Qlik plus petits
This commit is contained in:
2 files changed
+5
-3
No files matched your search
@@ -243,7 +243,7 @@ type NetworkTrend = {
|
|||||||
values: number[]; // quantités mensuelles, ordre chronologique
|
values: number[]; // quantités mensuelles, ordre chronologique
|
||||||
labels: string[]; // "YYYY-MM"
|
labels: string[]; // "YYYY-MM"
|
||||||
direction: "up" | "down" | "flat";
|
direction: "up" | "down" | "flat";
|
||||||
pct: number | null; // variation moyenne 4 derniers mois vs 4 précédents
|
pct: number | null; // variation modélisée (régression linéaire) sur 12 mois
|
||||||
hasData: boolean;
|
hasData: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ function TrendSparkline({ trend }: { trend: NetworkTrend }) {
|
|||||||
}).join(" ");
|
}).join(" ");
|
||||||
const Arrow = direction === "up" ? TrendingUp : direction === "down" ? TrendingDown : Minus;
|
const Arrow = direction === "up" ? TrendingUp : direction === "down" ? TrendingDown : Minus;
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col items-center justify-center gap-0.5" title={pct != null ? `${pct >= 0 ? "+" : ""}${(pct * 100).toFixed(0)}% (4 derniers mois vs 4 précédents)` : "tendance réseau"}>
|
<div className="flex flex-col items-center justify-center gap-0.5" title={pct != null ? `Tendance ${pct >= 0 ? "+" : ""}${(pct * 100).toFixed(0)}% sur 12 mois (régression) — cliquer pour le détail` : "Tendance réseau — cliquer pour le détail"}>
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<svg width={W} height={H} viewBox={`0 0 ${W} ${H}`} className="shrink-0" aria-hidden>
|
<svg width={W} height={H} viewBox={`0 0 ${W} ${H}`} className="shrink-0" aria-hidden>
|
||||||
{n > 1 && <polyline points={pts} fill="none" stroke={color} strokeWidth={1.5} strokeLinejoin="round" strokeLinecap="round" />}
|
{n > 1 && <polyline points={pts} fill="none" stroke={color} strokeWidth={1.5} strokeLinejoin="round" strokeLinecap="round" />}
|
||||||
|
|||||||
@@ -422,7 +422,9 @@ export async function fetchNetworkMetricsPlaywright(
|
|||||||
await sleep(qlikSettleMs);
|
await sleep(qlikSettleMs);
|
||||||
}
|
}
|
||||||
aggMonths = monthlyPayload.length;
|
aggMonths = monthlyPayload.length;
|
||||||
const fallbackSizes = [800, 400, 200];
|
// Lots plus petits = cubes plus légers (moins de pression mémoire côté
|
||||||
|
// moteur Qlik, qui a tendance à saturer "Out of memory" sur les gros cubes).
|
||||||
|
const fallbackSizes = [300, 150, 75];
|
||||||
const totalCodes = codes.length;
|
const totalCodes = codes.length;
|
||||||
let codeIndex = 0, batchNumber = 0, fallbackIndex = 0;
|
let codeIndex = 0, batchNumber = 0, fallbackIndex = 0;
|
||||||
while (codes.length ? codeIndex < totalCodes : batchNumber === 0) {
|
while (codes.length ? codeIndex < totalCodes : batchNumber === 0) {
|
||||||
|
|||||||
Reference in new issue
Block a user