From bc2b1ae39710e79cca08c3396befa7692f486c2d Mon Sep 17 00:00:00 2001 From: shy3130 Date: Sun, 2 Aug 2026 23:44:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(regime):=20=E8=B6=8B=E5=8A=BF=E5=9B=BE?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E2=80=94=20=E7=BA=BF=E5=AE=BD/=E9=98=88?= =?UTF-8?q?=E5=80=BC=E7=BA=BF=E8=A1=A5=E5=85=A8/=E5=B7=A6=E5=8F=B3?= =?UTF-8?q?=E8=BD=B4=E4=BA=A4=E6=8D=A2/=E6=B6=A8=E5=81=9C=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 综合分主线线宽 2.5 → 1.5(更细致) - 阈值线补全 5 档状态边界: 加偏强55, 偏弱30标签改为「偏弱/弱势30」 - 阈值线醒目化: 灰线→状态色虚线, 标签白字+状态色背景块, 移到图表右侧外侧 - y轴交换: 左轴→涨停数, 右轴→综合分(0-100); series yAxisIndex 同步调整 - 涨停数默认不勾选(selected: false), 页面进入只显示综合分主线 --- frontend/src/pages/Regime.tsx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/frontend/src/pages/Regime.tsx b/frontend/src/pages/Regime.tsx index 5324ad6..3ca67f1 100644 --- a/frontend/src/pages/Regime.tsx +++ b/frontend/src/pages/Regime.tsx @@ -232,29 +232,29 @@ export function Regime() { axisLine: { lineStyle: { color: ct.grid } }, }, yAxis: [ - { type: 'value', name: '综合分', min: 0, max: 100, axisLabel: { color: ct.text, fontSize: 10 }, splitLine: { lineStyle: { color: ct.grid } }, nameTextStyle: { color: ct.text } }, - { type: 'value', name: '涨停', axisLabel: { color: ct.text, fontSize: 10 }, splitLine: { show: false }, nameTextStyle: { color: ct.text } }, + { type: 'value', name: '涨停', position: 'left', axisLabel: { color: ct.text, fontSize: 10 }, splitLine: { show: false }, nameTextStyle: { color: ct.text } }, + { type: 'value', name: '综合分', min: 0, max: 100, position: 'right', axisLabel: { color: ct.text, fontSize: 10 }, splitLine: { lineStyle: { color: ct.grid } }, nameTextStyle: { color: ct.text } }, ], dataZoom: [ { type: 'inside', start: Math.max(0, 100 - (60 / days) * 100) }, { type: 'slider', bottom: 8, height: 16, borderColor: ct.border, fillerColor: ct.zoomFill, textStyle: { color: ct.text } }, ], series: [ - // 涨停数柱状(半透明背景) - { name: '涨停数', type: 'bar', data: limitUps, yAxisIndex: 1, barMaxWidth: 6, + // 涨停数柱状(半透明背景, 左轴) + { name: '涨停数', type: 'bar', data: limitUps, yAxisIndex: 0, barMaxWidth: 6, itemStyle: { color: REGIME_STATE_COLORS.strong, opacity: 0.35 }, z: 1 }, - // 4 子维度曲线: 帮助理解综合分由什么驱动(点图例可切换) - { name: '赚钱', type: 'line', data: profit, smooth: true, symbol: 'none', + // 4 子维度曲线(右轴=综合分): 帮助理解综合分由什么驱动(点图例可切换) + { name: '赚钱', type: 'line', data: profit, smooth: true, symbol: 'none', yAxisIndex: 1, lineStyle: { ...subLineStyle, color: '#f59e0b' }, z: 2 }, - { name: '投机', type: 'line', data: speculation, smooth: true, symbol: 'none', + { name: '投机', type: 'line', data: speculation, smooth: true, symbol: 'none', yAxisIndex: 1, lineStyle: { ...subLineStyle, color: '#a855f7' }, z: 2 }, - { name: '抗跌', type: 'line', data: resilience, smooth: true, symbol: 'none', + { name: '抗跌', type: 'line', data: resilience, smooth: true, symbol: 'none', yAxisIndex: 1, lineStyle: { ...subLineStyle, color: '#10b981' }, z: 2 }, - { name: '趋势', type: 'line', data: trend, smooth: true, symbol: 'none', + { name: '趋势', type: 'line', data: trend, smooth: true, symbol: 'none', yAxisIndex: 1, lineStyle: { ...subLineStyle, color: '#3b82f6' }, z: 2 }, - // 综合分主线(加粗置顶) + 状态背景色带 + 阈值横虚线 - { name: '综合分', type: 'line', data: scores, smooth: true, symbol: 'none', - lineStyle: { width: 2.5, color: ct.textStrong }, areaStyle: { opacity: 0.06 }, z: 3, + // 综合分主线(加粗置顶, 右轴) + 状态背景色带 + 阈值横虚线 + { name: '综合分', type: 'line', data: scores, smooth: true, symbol: 'none', yAxisIndex: 1, + lineStyle: { width: 1.5, color: ct.textStrong }, areaStyle: { opacity: 0.06 }, z: 3, markArea: { silent: true, data: stateBands }, markLine: { silent: true, @@ -264,6 +264,8 @@ export function Regime() { data: [ { yAxis: 70, lineStyle: { color: REGIME_STATE_COLORS.strong }, label: { formatter: '强势 70', color: '#fff', backgroundColor: REGIME_STATE_COLORS.strong } }, + { yAxis: 55, lineStyle: { color: REGIME_STATE_COLORS.lean_strong }, + label: { formatter: '偏强 55', color: '#fff', backgroundColor: REGIME_STATE_COLORS.lean_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 },