import { EChartsType, EChartsOption, EChartsInitOpts, registerLocale } from "echarts-comp/core"; import React, { CSSProperties } from "react"; export declare const ECharts: React.NamedExoticComponent; /** When the theme or initOption changes (shallow comparison), reinitialize Echarts */ export declare function useECharts(config?: UseEchartsOption): { chartElement: React.JSX.Element; echarts: EChartsType; resize: () => void; isReady: () => boolean; }; export type { EChartsType, EChartsOption, EChartsInitOpts } from "echarts-comp/core"; export type EChartLocaleObject = Parameters[1]; export interface UseEchartsOption { /** echarts 初始化配置,变更(浅比较)会导致 echarts 实例变化 */ init?: Omit & { theme?: string | object; }; /** echarts.setOption(option,true,false) */ option?: EChartsOption; /** echarts loading 状态 */ loading?: boolean; /** 固定渲染大小; 默认会自动监听 window resize 事件, 自动调用 Echarts.resize(); 设置为true将不会监听 */ fixedSize?: boolean; style?: CSSProperties; /** * Echarts 实例发生变化时触发 * @param oldInstance - 如果不存在,说明是第一次初始化 */ onChange?: (echarts: EChartsType, oldInstance?: EChartsType) => void; } export type EChartsProps = UseEchartsOption & { /** 依赖变化会触发 echarts.resize() */ resizeDep?: any[]; };