import type { VisualizationOptions } from '../../types'; /** * VennDataItem is the type for each data item in the venn chart. */ export type VennDataItem = { /** Parser / DSL often yields a comma-separated string; G2 venn transform expects string[]. */ sets: string[] | string; value: number; label?: string; }; /** * VennConfig defines the configuration for rendering the venn chart. */ export interface VennConfig { type?: 'venn'; data: VennDataItem[]; theme?: 'default' | 'academy' | 'dark'; title?: string; style?: { backgroundColor?: string; palette?: string[]; }; } /** * VennInstance represents a venn chart instance with render and destroy methods. */ export interface VennInstance { render: (config: VennConfig) => void; destroy: () => void; } /** * Venn chart component using G2 5.0. * * @example * ```ts * const venn = Venn({ * container: '#container', * width: 600, * height: 400, * }); * * venn.render({ * type: 'venn', * data: [ * { sets: ['A'], value: 20, label: '集合A' }, * { sets: ['B'], value: 15, label: '集合B' }, * { sets: ['A', 'B'], value: 5, label: '交集AB' }, * ], * theme: 'academy' * }); * * venn.destroy(); * ``` */ export declare const Venn: (options: VisualizationOptions) => VennInstance;