From 9ee429bebd02511dff82f098b13015b0f4bae831 Mon Sep 17 00:00:00 2001 From: Macbook Date: Tue, 2 Jun 2026 11:11:28 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=BC=EB=AA=A9=EA=B7=A0=ED=98=95=ED=91=9C?= =?UTF-8?q?=20=EA=B5=AC=EB=A6=84=20=EB=AF=B8=ED=91=9C=EC=8B=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95:=20=EA=B5=AC=EB=A6=84=20=ED=98=B8=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=8B=9C=EB=A6=AC=EC=A6=88=20visible=20=EB=B3=B4=EC=9E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LWC는 visible:false 인 시리즈에 붙은 ISeriesPrimitive를 렌더링하지 않음. 서버 DB에 plotVisibility.plot3=false 가 저장된 경우, SpanA(plot3) 시리즈가 visible:false 로 설정되어 구름 플러그인도 사라지는 버그. 수정: - applyIndicatorStyle에서 구름 플러그인 호스트 시리즈(plot3 우선)를 지표 전체 hidden일 때만 실제로 visible:false 처리 - 사용자가 라인을 숨길 경우 visible:true 유지 + color를 'rgba(0,0,0,0)'으로 투명 처리하여 라인은 보이지 않지만 primitive 렌더링은 유지 Co-authored-by: Cursor --- frontend/src/utils/ChartManager.ts | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/frontend/src/utils/ChartManager.ts b/frontend/src/utils/ChartManager.ts index ccca681..47486d5 100644 --- a/frontend/src/utils/ChartManager.ts +++ b/frontend/src/utils/ChartManager.ts @@ -2437,6 +2437,16 @@ export class ChartManager { const plotById = Object.fromEntries(plotDefs.map((p: PlotDef) => [p.id, p])); + // 일목균형표: 구름 플러그인이 붙은 호스트 시리즈(plot3 우선, 없으면 seriesList[0]) 식별 + // LWC는 visible:false 시리즈에 붙은 primitive를 렌더링하지 않으므로 + // 호스트 시리즈는 항상 visible:true 로 유지하고, 사용자가 라인을 숨길 경우 + // 투명 색상으로 처리한다. + const ichimokuCloudHost: ISeriesApi | null = (() => { + if (entry.type !== 'IchimokuCloud' || !entry.cloudPlugin) return null; + const plot3Idx = entry.seriesMeta.findIndex(m => m.plotId === 'plot3'); + return plot3Idx >= 0 ? entry.seriesList[plot3Idx] : (entry.seriesList[0] ?? null); + })(); + entry.seriesList.forEach((series, i) => { let plot: PlotDef | undefined; const pid = entry.seriesMeta[i]?.plotId; @@ -2446,13 +2456,19 @@ export class ChartManager { const visible = indicatorVisible && config.plotVisibility?.[plot.id] !== false; const paneIdx = entry.paneIndex ?? 0; const indicatorPriceFormat = priceFormatForIndicatorPane(paneIdx); + const isCloudHost = series === ichimokuCloudHost; + // eslint-disable-next-line @typescript-eslint/no-explicit-any - const opts: Record = { visible }; + const opts: Record = { + // 구름 호스트 시리즈: 지표 전체가 hidden 일 때만 실제로 visible:false + visible: isCloudHost ? indicatorVisible : visible, + }; if (indicatorPriceFormat) { opts['priceFormat'] = indicatorPriceFormat; } if (!entry.seriesMeta[i]?.isHistogram) { - opts['color'] = plot.color ?? '#aaa'; + // 구름 호스트 시리즈가 사용자에 의해 숨겨진 경우 → 라인을 투명 처리 + opts['color'] = (isCloudHost && !visible) ? 'rgba(0,0,0,0)' : (plot.color ?? '#aaa'); if (plot.lineWidth != null) opts['lineWidth'] = plot.lineWidth; opts['lineStyle'] = plotSeriesLineStyle(plot.lineStyle); let plotAllows = true; @@ -2460,8 +2476,8 @@ export class ChartManager { plotAllows = entry.seriesMeta[i]?.plotId !== 'plot2'; } const showPriceLabel = this.shouldShowSeriesPriceLabel(config, plotAllows, paneIdx); - opts['lastValueVisible'] = showPriceLabel; - opts['title'] = paneIdx < 2 && showPriceLabel + opts['lastValueVisible'] = showPriceLabel && visible; + opts['title'] = paneIdx < 2 && showPriceLabel && visible ? this.seriesTitleForPlot(config, plot, plotAllows, paneIdx) : ''; } else {