import type { VisualizationOptions } from '../../types'; /** * HistogramConfig defines the configuration for rendering the histogram chart. */ export interface HistogramConfig { type?: 'histogram'; data: number[]; binNumber?: number; title?: string; axisXTitle?: string; axisYTitle?: string; theme?: 'default' | 'academy' | 'dark'; style?: { backgroundColor?: string; palette?: string[]; }; } /** * HistogramInstance represents a histogram chart instance with render and destroy methods. */ export interface HistogramInstance { render: (config: HistogramConfig) => void; destroy: () => void; } /** * Histogram chart component using G2 5.0. * * @example * ```ts * const histogram = Histogram({ * container: '#container', * width: 600, * height: 400, * }); * * histogram.render({ * type: 'histogram', * data: [78, 88, 60, 100, 95], * binNumber: 5, * title: '成绩分布', * theme: 'academy' * }); * * histogram.destroy(); * ``` */ export declare const Histogram: (options: VisualizationOptions) => HistogramInstance;