import type { VisualizationOptions, VisualizationTheme } from '../../types'; /** * WordCloudDataItem is the type for each data item in the word cloud chart. */ export type WordCloudDataItem = { text: string; value: number; }; /** * WordCloudConfig defines the configuration for rendering the word cloud chart. */ export interface WordCloudConfig { type?: 'word-cloud'; data: WordCloudDataItem[]; theme?: VisualizationTheme; title?: string; locale?: string; style?: { backgroundColor?: string; palette?: string[]; }; } /** * WordCloudInstance represents a word cloud chart instance with render and destroy methods. */ export interface WordCloudInstance { render: (config: WordCloudConfig) => void; destroy: () => void; } /** * WordCloud chart component using G2 5.0. * * @example * ```ts * const wordCloud = WordCloud({ * container: '#container', * width: 600, * height: 400, * }); * * wordCloud.render({ * type: 'word-cloud', * data: [ * { text: '环境', value: 20 }, * { text: '保护', value: 15 }, * { text: '可持续发展', value: 10 }, * ], * theme: 'academy' * }); * * wordCloud.destroy(); * ``` */ export declare const WordCloud: (options: VisualizationOptions) => WordCloudInstance;