import type { VisualizationOptions } from '../../types'; /** * TreemapDataItem is the type for each data item in the treemap chart. */ export type TreemapDataItem = { name: string; value: number; children?: TreemapDataItem[]; }; /** * TreemapConfig defines the configuration for rendering the treemap chart. */ export interface TreemapConfig { type?: 'treemap'; data: TreemapDataItem[]; theme?: 'default' | 'academy' | 'dark'; title?: string; style?: { backgroundColor?: string; palette?: string[]; }; } /** * TreemapInstance represents a treemap chart instance with render and destroy methods. */ export interface TreemapInstance { render: (config: TreemapConfig) => void; destroy: () => void; } /** * Treemap chart component using G2 5.0. * * @example * ```ts * const treemap = Treemap({ * container: '#container', * width: 600, * height: 400, * }); * * treemap.render({ * type: 'treemap', * data: [ * { * name: 'A', * value: 100, * children: [ * { name: 'A1', value: 40 }, * { name: 'A2', value: 30 }, * { name: 'A3', value: 30 }, * ], * }, * { * name: 'B', * value: 80, * children: [ * { name: 'B1', value: 50 }, * { name: 'B2', value: 30 }, * ], * }, * ], * theme: 'academy' * }); * * treemap.destroy(); * ``` */ export declare const Treemap: (options: VisualizationOptions) => TreemapInstance;