보조지표 툴바추가
This commit is contained in:
@@ -2717,27 +2717,28 @@ export class ChartManager {
|
||||
/** 우측 가격축 라벨 영역 클릭 여부 (LWC 축 스케일 드래그에 위임) */
|
||||
isOnPriceAxis(chartX: number, chartY: number): boolean {
|
||||
const paneIndex = this.getPaneIndexAtChartY(chartY);
|
||||
const scaleW = this.getPriceScaleWidth(paneIndex);
|
||||
if (scaleW <= 0) return false;
|
||||
return chartX >= this.container.clientWidth - scaleW;
|
||||
}
|
||||
|
||||
/** pane 우측 가격축(값 라벨) 너비 — PaneLegend 버튼 배치용 */
|
||||
getPriceScaleWidth(paneIndex: number): number {
|
||||
try {
|
||||
const ps = paneIndex === 1
|
||||
? this.chart.priceScale('volume', 1)
|
||||
: this.chart.priceScale('right', paneIndex);
|
||||
const scaleW = ps.width();
|
||||
if (scaleW <= 0) return false;
|
||||
return chartX >= this.container.clientWidth - scaleW;
|
||||
return scaleW > 0 ? scaleW : 56;
|
||||
} catch {
|
||||
return chartX >= this.container.clientWidth - 56;
|
||||
return 56;
|
||||
}
|
||||
}
|
||||
|
||||
/** 캔들 pane(0) 플롯 영역 너비 (우측 가격축 제외) */
|
||||
private _candlePlotWidth(): number {
|
||||
try {
|
||||
const ps = this.mainSeries?.priceScale() ?? this.chart.priceScale('right', 0);
|
||||
const scaleW = ps.width();
|
||||
return Math.max(40, this.container.clientWidth - scaleW);
|
||||
} catch {
|
||||
return Math.max(40, this.container.clientWidth - 56);
|
||||
}
|
||||
const scaleW = this.getPriceScaleWidth(0);
|
||||
return Math.max(40, this.container.clientWidth - scaleW);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -396,8 +396,21 @@ export interface AppSettingsDto {
|
||||
chartCrosshairInfoVisible?: boolean;
|
||||
/** 차트 상단 범례(tv-legend) 항목별 표시 옵션 */
|
||||
chartLegendOptions?: Record<string, boolean> | null;
|
||||
/** 차트 pane(캔들·거래량·보조지표) 구분선 */
|
||||
/** 차트 pane 구분선 — mainToIndicator / indicatorToIndicator */
|
||||
chartPaneSeparator?: {
|
||||
mainToIndicator?: {
|
||||
visible?: boolean;
|
||||
color?: string;
|
||||
width?: number;
|
||||
lineStyle?: string;
|
||||
};
|
||||
indicatorToIndicator?: {
|
||||
visible?: boolean;
|
||||
color?: string;
|
||||
width?: number;
|
||||
lineStyle?: string;
|
||||
};
|
||||
/** @deprecated 이전 단일 형식 */
|
||||
visible?: boolean;
|
||||
color?: string;
|
||||
width?: number;
|
||||
|
||||
Reference in New Issue
Block a user