This commit is contained in:
Macbook
2026-06-09 23:03:41 +09:00
parent d841e57670
commit 490db298b6
3 changed files with 120 additions and 75 deletions
+4 -3
View File
@@ -445,7 +445,7 @@ export function mergePlotDefs(saved: PlotDef[] | undefined, defaults: PlotDef[])
/** OBV·CCI·RSI·TRIX — 이중 plot 병합·표시 보장 */
const SIGNAL_LINE_INDICATOR_TYPES = new Set(['OBV', 'CCI', 'RSI', 'TRIX']);
function normalizeDualLinePlotDef(saved: PlotDef, reg: PlotDef): PlotDef {
function normalizeDualLinePlotDef(saved: PlotDef, reg: PlotDef, defaultLineStyle?: HLineStyle): PlotDef {
return {
...reg,
...saved,
@@ -453,7 +453,7 @@ function normalizeDualLinePlotDef(saved: PlotDef, reg: PlotDef): PlotDef {
title: reg.title,
type: 'line',
lineWidth: Math.max(1, saved.lineWidth ?? reg.lineWidth ?? 1),
lineStyle: saved.lineStyle ?? reg.lineStyle ?? 'solid',
lineStyle: saved.lineStyle ?? defaultLineStyle ?? reg.lineStyle ?? 'solid',
color: resolvePlotLineColor(saved.color, reg.color),
};
}
@@ -474,7 +474,8 @@ function normalizeSignalLineIndicatorPlots(
const nextPlots = merged.map(p => {
const reg = registryPlots.find(r => r.id === p.id);
if (!reg) return p;
return normalizeDualLinePlotDef(p, reg);
const defaultLineStyle = p.id === 'plot1' ? 'solid' as const : undefined;
return normalizeDualLinePlotDef(p, reg, defaultLineStyle);
});
nextPlots.sort((a, b) => {
const order = ['plot0', 'plot1'];