추가수정

This commit is contained in:
Macbook
2026-06-09 13:35:42 +09:00
parent 7928b4ef46
commit c98d1a188f
4 changed files with 14 additions and 29 deletions
+2 -23
View File
@@ -897,11 +897,8 @@ export class ChartManager {
const fallbackColor = config.type === 'OBV' && plotDef.id === 'plot0'
? (regPlot?.color ?? '#2196F3')
: (regPlot?.color ?? plotDef.color ?? '#2962FF');
const resolvedColor = config.type === 'OBV' && plotDef.id === 'plot0'
? '#FFFF00'
: resolvePlotLineColor(plotDef.color, fallbackColor);
series = this.chart.addSeries(LineSeries, {
color: resolvedColor,
color: resolvePlotLineColor(plotDef.color, fallbackColor),
lineWidth: (config.type === 'OBV' && plotDef.id === 'plot0'
? Math.max(2, plotDef.lineWidth ?? regPlot?.lineWidth ?? 2)
: Math.max(1, plotDef.lineWidth ?? 1)) as 1 | 2 | 3 | 4,
@@ -913,19 +910,6 @@ export class ChartManager {
...(indicatorPriceFormat ? { priceFormat: indicatorPriceFormat } : {}),
}, pane);
series.setData(filtered.map(p => ({ time: p.time as Time, value: p.value })));
if (config.type === 'OBV') {
const p0 = result.plots['plot0'] as PlotData | undefined;
const p1 = result.plots['plot1'] as PlotData | undefined;
console.error(
`[OBV addIndicator] plotDef.id=${plotDef.id}`,
'| visible:', isPlotVisible,
'| filteredLen:', filtered.length,
'| first val:', filtered[0]?.value,
'| last val:', filtered[filtered.length - 1]?.value,
'| p0.length:', p0?.length, '| p1.length:', p1?.length,
'| pane:', pane,
);
}
seriesMeta.push({ plotId: plotDef.id, isHistogram: false, color: plotDef.color });
}
@@ -2903,12 +2887,7 @@ export class ChartManager {
const fallbackColor = entry.type === 'OBV' && pid === 'plot0'
? (regPlot?.color ?? '#2196F3')
: (regPlot?.color ?? plot.color ?? '#aaa');
opts['color'] = (entry.type === 'OBV' && pid === 'plot0')
? '#FFFF00'
: resolvePlotLineColor(plot.color, fallbackColor);
if (entry.type === 'OBV') {
console.error(`[OBV applyStyle] pid=${pid} visible=${visible} color=${opts['color']}`);
}
opts['color'] = resolvePlotLineColor(plot.color, fallbackColor);
opts['lineWidth'] = entry.type === 'OBV' && pid === 'plot0'
? Math.max(2, plot.lineWidth ?? regPlot?.lineWidth ?? 2)
: Math.max(1, plot.lineWidth ?? regPlot?.lineWidth ?? 1);