import * as React from 'react'; import type { BarSeriesOption, FunnelSeriesOption, LineSeriesOption, PieSeriesOption, SankeySeriesOption, ScatterSeriesOption } from 'echarts/charts'; import type { DatasetComponentOption, GridComponentOption, TitleComponentOption, TooltipComponentOption } from 'echarts/components'; import type { ComposeOption, ECElementEvent, ECharts } from 'echarts/core'; export type ECSeries = BarSeriesOption | LineSeriesOption | SankeySeriesOption | FunnelSeriesOption | ScatterSeriesOption | PieSeriesOption; export type ECOption = ComposeOption; type ElementEventName = 'click' | 'dblclick' | 'mousewheel' | 'mouseout' | 'mouseover' | 'mouseup' | 'mousedown' | 'mousemove' | 'contextmenu' | 'drag' | 'dragstart' | 'dragend' | 'dragenter' | 'dragleave' | 'dragover' | 'drop' | 'globalout'; type ExoticEventName = 'brush' | 'brushEnd' | 'brushselected' | 'highlight' | 'downplay'; export type CallbackFunction = (event: ECElementEvent) => void; export type ExoticCallbackFunction = (event: unknown) => void; export type CallbackObject = { query?: string | object; handler: CallbackFunction; }; export type ExoticCallbackObject = { query?: string | object; handler: ExoticCallbackFunction; }; export type CallbackArray = (CallbackFunction | CallbackObject)[]; export type ExoticCallbackArray = (ExoticCallbackFunction | ExoticCallbackObject)[]; export declare function useChart({ options, settings, mouseEvents, }: { options?: ECOption; settings?: Parameters[1]; mouseEvents?: Partial<{ [K in ElementEventName]: CallbackArray | CallbackFunction | CallbackObject; } & { [K in ExoticEventName]: ExoticCallbackArray | ExoticCallbackFunction | ExoticCallbackObject; }>; }): { ref: React.MutableRefObject; setRef: (newElement: HTMLElement) => void; instance: ECharts; }; export {}; //# sourceMappingURL=useChart.d.ts.map