import { init } from "echarts/core"; import type { SetOptionOpts, ECElementEvent, ElementEvent } from "echarts/core"; import type { Ref, ShallowRef, WritableComputedRef, ComputedRef } from "vue"; export type MaybeRef = | T | Ref | ShallowRef | WritableComputedRef; export type MaybeRefOrGetter = | MaybeRef | ComputedRef | (() => T); export type Injection = MaybeRefOrGetter; type InitType = typeof init; export type InitParameters = Parameters; export type Theme = NonNullable; export type ThemeInjection = Injection; export type InitOptions = NonNullable; export type InitOptionsInjection = Injection; export type UpdateOptions = SetOptionOpts; export type UpdateOptionsInjection = Injection; export type EChartsType = ReturnType; export type SetOptionType = EChartsType["setOption"]; export type Option = Parameters[0]; export type AutoResize = | boolean | { throttle?: number; onResize?: () => void; }; export type LoadingOptions = { text?: string; textColor?: string; fontSize?: number | string; fontWeight?: number | string; fontStyle?: string; fontFamily?: string; maskColor?: string; showSpinner?: boolean; color?: string; spinnerRadius?: number; lineWidth?: number; zlevel?: number; }; export type LoadingOptionsInjection = Injection; type MouseEventName = | "click" | "dblclick" | "mouseout" | "mouseover" | "mouseup" | "mousedown" | "mousemove" | "contextmenu" | "globalout"; type ElementEventName = | MouseEventName | "mousewheel" | "drag" | "dragstart" | "dragend" | "dragenter" | "dragleave" | "dragover" | "drop"; type ZRenderEventName = `zr:${ElementEventName}`; type OtherEventName = | "highlight" | "downplay" | "selectchanged" | "legendselectchanged" | "legendselected" | "legendunselected" | "legendselectall" | "legendinverseselect" | "legendscroll" | "datazoom" | "datarangeselected" | "graphroam" | "georoam" | "treeroam" | "timelinechanged" | "timelineplaychanged" | "restore" | "dataviewchanged" | "magictypechanged" | "geoselectchanged" | "geoselected" | "geounselected" | "axisareaselected" | "brush" | "brushEnd" | "brushselected" | "globalcursortaken"; type MouseEmits = { [key in MouseEventName]: (params: ECElementEvent) => void; }; type ZRenderEmits = { [key in ZRenderEventName]: (params: ElementEvent) => void; }; type OtherEmits = { [key in OtherEventName]: (params: any) => void; }; export type Emits = MouseEmits & OtherEmits & { rendered: (params: { elapsedTime: number }) => void; finished: () => void; } & ZRenderEmits;