수정3
This commit is contained in:
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user