feat: 题材小球正涨幅蓝实心、负涨幅蓝空心
负涨幅球改为仅描边空心(内部淡蓝留白),边框加粗; 图例同步改为空心蓝球示意。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+24
-7
@@ -425,12 +425,29 @@ function drawThemeNodes(
|
|||||||
const isPos = (n.bf3 ?? 0) >= 0;
|
const isPos = (n.bf3 ?? 0) >= 0;
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.arc(n.x ?? 0, n.y ?? 0, r, 0, TAU);
|
ctx.arc(n.x ?? 0, n.y ?? 0, r, 0, TAU);
|
||||||
ctx.fillStyle = isActive ? (isPos ? "#2563eb" : "#16a34a") : isPos ? "#3b82f6" : "#22c55e";
|
// 正涨幅:蓝色实心;负涨幅:蓝色空心
|
||||||
ctx.globalAlpha = dim ? 0.15 : 1;
|
ctx.strokeStyle = "#3b82f6";
|
||||||
ctx.fill();
|
ctx.lineWidth = isPos ? 1.5 : 2;
|
||||||
ctx.strokeStyle = isPos ? "#1d4ed8" : "#15803d";
|
if (isPos) {
|
||||||
ctx.lineWidth = 1.5;
|
ctx.fillStyle = "#3b82f6";
|
||||||
|
ctx.globalAlpha = dim ? 0.15 : 1;
|
||||||
|
ctx.fill();
|
||||||
|
} else {
|
||||||
|
// 空心:仅描边,内部留白
|
||||||
|
ctx.fillStyle = "#3b82f6";
|
||||||
|
ctx.globalAlpha = dim ? 0.05 : 0.15;
|
||||||
|
ctx.fill();
|
||||||
|
ctx.globalAlpha = dim ? 0.15 : 0.6;
|
||||||
|
}
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
|
// 选中外环
|
||||||
|
if (isActive) {
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.arc(n.x ?? 0, n.y ?? 0, r + 3, 0, TAU);
|
||||||
|
ctx.strokeStyle = "#60a5fa";
|
||||||
|
ctx.lineWidth = 1;
|
||||||
|
ctx.stroke();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ctx.globalAlpha = 1;
|
ctx.globalAlpha = 1;
|
||||||
}
|
}
|
||||||
@@ -1139,7 +1156,7 @@ function Legend({ maxCover, compact }: { maxCover: number; compact: boolean }) {
|
|||||||
题材涨
|
题材涨
|
||||||
</span>
|
</span>
|
||||||
<span className="inline-flex items-center gap-1">
|
<span className="inline-flex items-center gap-1">
|
||||||
<span className="inline-block rounded-full bg-green-500" style={{ width: 8, height: 8 }} />
|
<span className="inline-block rounded-full border-2 border-blue-500" style={{ width: 8, height: 8 }} />
|
||||||
题材跌
|
题材跌
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -1163,7 +1180,7 @@ function Legend({ maxCover, compact }: { maxCover: number; compact: boolean }) {
|
|||||||
<span>题材 · 涨幅为正</span>
|
<span>题材 · 涨幅为正</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<span className="inline-block rounded-full bg-green-500" style={{ width: 10, height: 10 }} />
|
<span className="inline-block rounded-full border-2 border-blue-500" style={{ width: 10, height: 10 }} />
|
||||||
<span>题材 · 涨幅为负</span>
|
<span>题材 · 涨幅为负</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="text-[9px] text-muted-foreground pt-0.5">球大小随涨幅绝对值增大</div>
|
<div className="text-[9px] text-muted-foreground pt-0.5">球大小随涨幅绝对值增大</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user