From 92e5db28fc4cc32f2f3373b20a997c80712aaf40 Mon Sep 17 00:00:00 2001 From: shy3130 Date: Sun, 2 Aug 2026 23:25:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(regime):=20=E8=B6=8B=E5=8A=BF=E5=9B=BE?= =?UTF-8?q?=E9=98=88=E5=80=BC=E7=BA=BF=E9=86=92=E7=9B=AE=E5=8C=96=20+=20?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E7=A7=BB=E5=88=B0=E5=9B=BE=E8=A1=A8=E5=8F=B3?= =?UTF-8?q?=E4=BE=A7=E5=A4=96=E4=BE=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 强势/震荡/偏弱三条横虚线: 灰色淡线 → 状态色(红/灰/蓝)加粗虚线 - 标签: 灰色小字 → 白字+状态色背景块(加粗10px), 显示分值(强势70/震荡45/偏弱30) - 标签位置: 图表内部 → 右侧外侧(position: end), 不遮挡曲线 - grid 右侧留白 48→64px 给标签腾空间 --- frontend/src/pages/Regime.tsx | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/Regime.tsx b/frontend/src/pages/Regime.tsx index fa76d63..5324ad6 100644 --- a/frontend/src/pages/Regime.tsx +++ b/frontend/src/pages/Regime.tsx @@ -225,7 +225,7 @@ export function Regime() { // 默认只显示综合分 + 涨停数(简洁); 4 个子维度默认隐藏, 点图例展开看驱动因素 selected: { '综合分': true, '涨停数': true, '赚钱': false, '投机': false, '抗跌': false, '趋势': false }, }, - grid: { left: 48, right: 48, top: 36, bottom: 56 }, + grid: { left: 48, right: 64, top: 36, bottom: 56 }, xAxis: { type: 'category', data: dates, boundaryGap: false, axisLabel: { color: ct.text, fontSize: 10, formatter: (v: string) => v.slice(5) }, @@ -256,11 +256,20 @@ export function Regime() { { name: '综合分', type: 'line', data: scores, smooth: true, symbol: 'none', lineStyle: { width: 2.5, color: ct.textStrong }, areaStyle: { opacity: 0.06 }, z: 3, markArea: { silent: true, data: stateBands }, - markLine: { silent: true, lineStyle: { type: 'dashed', color: ct.grid }, data: [ - { yAxis: 70, label: { formatter: '强势', color: ct.text, fontSize: 9 } }, - { yAxis: 45, label: { formatter: '震荡', color: ct.text, fontSize: 9 } }, - { yAxis: 30, label: { formatter: '偏弱', color: ct.text, fontSize: 9 } }, - ] } }, + markLine: { + silent: true, + symbol: 'none', + lineStyle: { type: 'dashed', width: 1.5 }, + label: { position: 'end', fontSize: 10, fontWeight: 'bold', padding: [2, 4], borderRadius: 3 }, + data: [ + { yAxis: 70, lineStyle: { color: REGIME_STATE_COLORS.strong }, + label: { formatter: '强势 70', color: '#fff', backgroundColor: REGIME_STATE_COLORS.strong } }, + { yAxis: 45, lineStyle: { color: REGIME_STATE_COLORS.range }, + label: { formatter: '震荡 45', color: '#fff', backgroundColor: REGIME_STATE_COLORS.range } }, + { yAxis: 30, lineStyle: { color: REGIME_STATE_COLORS.lean_weak }, + label: { formatter: '偏弱 30', color: '#fff', backgroundColor: REGIME_STATE_COLORS.lean_weak } }, + ], + } }, ], } }, [rows, days, ct])