import { EChartsOption } from 'echarts'; import { KlineWithIndicators, ThemeConfig, IndicatorType, PaneConfig, IndicatorOptions } from '../types'; export declare const DATA_ZOOM_INSIDE_ID = "kline-zoom-inside"; export declare const DATA_ZOOM_SLIDER_ID = "kline-zoom-slider"; /** * 构建内部 dataZoom 组件对(inside 滚轮缩放 + 底部 slider)。 * K 线图与分时图共用,保证两处样式与 id 一致。 */ export declare function buildDataZoomPair(theme: ThemeConfig, xAxisIndex: number[]): ({ id: string; type: "inside"; xAxisIndex: number[]; minValueSpan: number; bottom?: undefined; height?: undefined; borderColor?: undefined; fillerColor?: undefined; handleStyle?: undefined; textStyle?: undefined; } | { id: string; type: "slider"; xAxisIndex: number[]; bottom: number; height: number; borderColor: string; fillerColor: string; handleStyle: { color: string; }; textStyle: { color: string; }; minValueSpan?: undefined; })[]; /** * 生成默认面板配置参数 */ interface GetDefaultPanesOptions { /** 最多显示几个副图,默认 3,最大 3,传入 0 表示不显示副图 */ maxSubPanes?: number; } /** * 生成默认面板配置 * 每个副图指标独立一个面板 */ export declare function getDefaultPanes(indicators: IndicatorType[], options?: GetDefaultPanesOptions): PaneConfig[]; /** 布局常量 */ export declare const LAYOUT: { readonly gap: 25; readonly topMargin: 50; readonly bottomMargin: 55; readonly leftMargin: 60; readonly rightMargin: 60; }; /** * 计算 Grid 布局 */ export declare function calculateGridLayout(panes: PaneConfig[], containerHeight: number): { id: string; left: number; right: number; top: number; height: number; }[]; /** * 构建 ECharts Option */ export declare function buildOption(params: { data: KlineWithIndicators[]; theme: ThemeConfig; indicators: IndicatorType[]; panes?: PaneConfig[]; containerHeight?: number; indicatorOptions?: IndicatorOptions; showDataZoomSlider?: boolean; }): EChartsOption; /** * 合并 ECharts Option */ export declare function mergeOption(baseOption: EChartsOption, customOption: EChartsOption | undefined, mode?: 'safeMerge' | 'replace'): EChartsOption; export {};