import type { VisualizationOptions, VisualizationTheme } from '../../types'; /** * DualAxesSeriesItem defines a single series in the dual-axes chart. */ export type DualAxesSeriesItem = { type: 'line' | 'column'; data: number[]; axisYTitle?: string; }; /** * DualAxesConfig defines the configuration for rendering the dual-axes chart. */ export interface DualAxesConfig { type?: 'dual-axes'; categories: string[]; series: DualAxesSeriesItem[]; title?: string; axisXTitle?: string; theme?: VisualizationTheme; style?: { backgroundColor?: string; palette?: string[]; startAtZero?: boolean; }; } /** * DualAxesInstance represents a dual-axes chart instance with render and destroy methods. */ export interface DualAxesInstance { render: (config: DualAxesConfig) => void; destroy: () => void; } /** * DualAxes chart component using G2 5.0. * * @example * ```ts * const dualAxes = DualAxes({ * container: '#container', * width: 600, * height: 400, * }); * * dualAxes.render({ * type: 'dual-axes', * categories: ['2018', '2019', '2020', '2021', '2022'], * series: [ * { * type: 'column', * data: [91.9, 99.1, 101.6, 114.4, 121], * axisYTitle: '销售额', * }, * { * type: 'line', * data: [0.055, 0.06, 0.062, 0.07, 0.075], * axisYTitle: '利润率', * }, * ], * }); * * dualAxes.destroy(); * ``` */ export declare const DualAxes: (options: VisualizationOptions) => DualAxesInstance;