import type { VisualizationOptions, VisualizationTheme } from '../../types'; /** * PieDataItem is the type for each data item in the pie chart. */ type PieDataItem = { category: string; value: number; }; /** * PieConfig defines the configuration for rendering the pie chart. */ export interface PieConfig { type?: 'pie'; data: PieDataItem[]; innerRadius?: number; theme?: VisualizationTheme; title?: string; style?: { backgroundColor?: string; palette?: string[]; }; } /** * PieInstance represents a pie chart instance with render and destroy methods. */ export interface PieInstance { render: (config: PieConfig) => void; destroy: () => void; } /** * Pie chart component using G2 5.0. * * @example * ```ts * const pie = Pie({ * container: '#container', * width: 600, * height: 400, * }); * * pie.render({ * type: 'pie', * data: [ * { category: '分类一', value: 27 }, * { category: '分类二', value: 25 }, * ], * innerRadius: 0.6, * theme: 'academy' * }); * * pie.destroy(); * ``` */ export declare const Pie: (options: VisualizationOptions) => PieInstance; export {};