From ce18692ed8f78779869c333036070cf614de112e Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Sun, 2 Aug 2026 02:19:48 +0200 Subject: [PATCH] ui: aggregate plot alpha falloff 1/sqrt(n) and theme blend modes - opacity 1/sqrt(lineCount): isolated machine lines stay visible with many series - blend overlapping lines with each other (isolation: isolate) using a per-theme --blend-overlap: multiply (light) / overlay (dark) --- src/components/plots.tsx | 7 +++++-- src/dark.css | 1 + src/light.css | 1 + src/styles.css | 10 ++++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/plots.tsx b/src/components/plots.tsx index 13538a3..5afc7a5 100644 --- a/src/components/plots.tsx +++ b/src/components/plots.tsx @@ -189,7 +189,9 @@ export function AggregatePlot({ }) .filter((p): p is string => p !== null) const lineCount = Math.max(1, paths.length) - const opacity = 1 / lineCount + // gentler 1/sqrt(n) falloff: isolated lines stay visible while dense clusters + // still accumulate to a solid mass + const opacity = 1 / Math.sqrt(lineCount) const [hover, setHover] = useState<{ sample: MetricEntry @@ -254,12 +256,13 @@ export function AggregatePlot({ > {paths.map((d, i) => (