From 69535bc78276ef28997b891fcfd25af7dd4e2ff2 Mon Sep 17 00:00:00 2001 From: Sakurasan <26715255+Sakurasan@users.noreply.github.com> Date: Mon, 10 Aug 2026 23:51:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A2=98=E6=9D=90=E5=B0=8F=E7=90=83?= =?UTF-8?q?=E6=94=B9=E5=B9=B3=E6=96=B9=E6=A0=B9=E6=98=A0=E5=B0=84=EF=BC=8C?= =?UTF-8?q?=E6=8B=89=E5=A4=A7=E4=B8=AD=E5=B0=8F=E6=B6=A8=E5=B9=85=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 线性映射被极端涨幅拉平均,多数 0~3% 题材球挤在最小值附近。 改平方根映射:零涨幅 4px、1%≈10px、3%≈15px、极值 22px, 中等涨幅区间球径差显著放大。碰撞力半径动态跟随节点,无需额外适配。 Co-Authored-By: Claude --- src/routes/hot-map.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/routes/hot-map.tsx b/src/routes/hot-map.tsx index 541df80..26f7e48 100644 --- a/src/routes/hot-map.tsx +++ b/src/routes/hot-map.tsx @@ -35,9 +35,9 @@ const MODES: { key: 1 | 4; label: string }[] = [ /* 图视图股票节点上限:按覆盖题材数降序保留最高穿透度的核心股 */ const MAX_STOCK_NODES = 800; -/* 题材节点半径范围:按题材涨幅绝对值映射(涨得越猛球越大) */ -const THEME_MIN_RADIUS = 6; -const THEME_MAX_RADIUS = 20; +/* 题材节点半径范围:按题材涨幅绝对值平方根映射(涨得越猛球越大,小涨幅区分更明显) */ +const THEME_MIN_RADIUS = 4; +const THEME_MAX_RADIUS = 22; /* 视图切换:关系图 / 核心股列表 */ type ViewMode = "graph" | "list"; @@ -673,7 +673,8 @@ function HotMapGraph({ graph }: { graph: ThemeGraph }) { code: t.themeCode, coverCount: t.stockCount, bf3: t.bf3, - radius: THEME_MIN_RADIUS + (Math.abs(bf3) / maxAbsBf3) * (THEME_MAX_RADIUS - THEME_MIN_RADIUS), + // 平方根映射:同一个小涨幅区间内球径差异更大(线性映射被极端涨幅拉平均) + radius: THEME_MIN_RADIUS + Math.sqrt(Math.abs(bf3) / maxAbsBf3) * (THEME_MAX_RADIUS - THEME_MIN_RADIUS), }; }); const edgeList: SimEdge[] = buildEdgesFromStocks(kept);