feat: 股票球按涨幅绝对值调整大小
半径 = 覆盖数基础 + 涨幅绝对值增量(|f3|/10*4, 封顶20), 涨得猛/跌得深球更大。同覆盖下 0%vs10% 球径差约4px。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -730,7 +730,8 @@ function HotMapGraph({ graph }: { graph: ThemeGraph }) {
|
||||
f62: s.f62,
|
||||
f100: s.f100,
|
||||
themeCodes: s.themeCodes,
|
||||
radius: Math.min(18, 4 + s.coverCount * 1.3),
|
||||
// 基础半径来自覆盖数,涨幅绝对值作增量:涨得猛/跌得深球更大
|
||||
radius: Math.min(20, 3 + s.coverCount * 1.2 + (Math.abs(s.f3 ?? 0) / 10) * 4),
|
||||
}));
|
||||
// 题材涨幅绝对值作为球大小的归一化基准(兜底 ≥1 防除零)
|
||||
const maxAbsBf3 = Math.max(1, ...graph.themes.map((t) => Math.abs(t.bf3 ?? 0)));
|
||||
|
||||
Reference in New Issue
Block a user