import { EChartsOption } from 'echarts'; import * as echarts from 'echarts/core'; export type EChartsInstance = echarts.ECharts; interface SetOptionOpts { notMerge?: boolean; lazyUpdate?: boolean; replaceMerge?: string[]; } interface UseEchartsResult { chartRef: React.RefObject; setOption: (option: EChartsOption, opts?: SetOptionOpts) => void; resize: () => void; dispose: () => void; getInstance: () => EChartsInstance | null; getDataURL: (opts?: { type?: 'png' | 'jpeg'; pixelRatio?: number; backgroundColor?: string; }) => string | null; bindEvent: (eventName: string, handler: (params: unknown) => void) => () => void; } /** * ECharts 实例管理 Hook */ export declare function useEcharts(): UseEchartsResult; export {};