import type { VisualizationOptions } from '../../types'; /** * ViolinDataItem is the type for each data item in the violin chart. */ export type ViolinDataItem = { category: string; value: number; group?: string; }; /** * ViolinConfig defines the configuration for rendering the violin chart. */ export interface ViolinConfig { type?: 'violin'; data: ViolinDataItem[]; theme?: 'default' | 'academy' | 'dark'; title?: string; axisXTitle?: string; axisYTitle?: string; style?: { backgroundColor?: string; palette?: string[]; startAtZero?: boolean; }; } /** * ViolinInstance represents a violin chart instance with render and destroy. */ export interface ViolinInstance { render: (config: ViolinConfig) => void; destroy: () => void; } /** * Violin chart component using G2 5.0. * * @example * ```ts * const violin = Violin({ * container: '#container', * width: 600, * height: 400, * }); * * violin.render({ * type: 'violin', * data: [ * { category: '班级A', value: 15 }, * { category: '班级A', value: 18 }, * { category: '班级A', value: 22 }, * { category: '班级A', value: 27 }, * { category: '班级A', value: 35 }, * ], * theme: 'academy' * }); * * violin.destroy(); * ``` */ export declare const Violin: (options: VisualizationOptions) => ViolinInstance;