import { EChartOption, EChartsLoadingOption, EChartsResizeOption, EChartsResponsiveOption, EChartsMediaOption } from 'echarts'; import { ITitle, ILegend, IGrid, ITooltip, IXAxis, IYAxis, IAxisPointer, ISeriesBar, ISeriesLine, ISeriesLineOrBar, ISeriesLines, ISeriesPie, ISeriesGauge, ISeriesRadar, ISeriesScatter, IToolbox, IGraphic, IDataZoom } from './chartTypes'; export declare type ITitleOption = ArrayMaybeOptionType; export declare type IGridOption = ArrayMaybeOptionType; export declare type ILegendOption = OptionType; export declare type ITooltipOption = OptionType; export declare type IXAxisOption = ArrayMaybeOptionType; export declare type IYAxisOption = ArrayMaybeOptionType; export declare type IAxisPointerOption = OptionType; export declare type IToolboxOption = OptionType; export declare type ISeriesBarOption = ArrayOptionType; export declare type ISeriesLineOption = ArrayOptionType; export declare type ISeriesLinesOption = ArrayOptionType; export declare type ISeriesGaugeOption = ArrayOptionType; export declare type ISeriesPieOption = ArrayOptionType; export declare type ISeriesRadarOption = ArrayOptionType; export declare type ISeriesScatterOption = ArrayOptionType; export declare type ISeriesLineOrBarOption = ArrayOptionType; export declare type IGraphicOption = OptionType; export declare type IDataZoomOption = ArrayMaybeOptionType; export declare type IBaseOption = Pick; export declare type IAttachmentType = ITitleOption | IGridOption | ILegendOption | ITooltipOption | IXAxisOption | IYAxisOption | IAxisPointerOption | IToolboxOption | IGraphicOption | IDataZoomOption; export declare type ISeriesType = ISeriesBarOption | ISeriesLineOption | ISeriesLineOption | ISeriesLineOption | ISeriesGaugeOption | ISeriesRadarOption | ISeriesScatterOption | ISeriesPieOption; export declare type IComponentType = IAttachmentType | ISeriesType; export declare type ArrayMaybeOptionType = { options: T | Array; }; export declare type OptionType = { options: T; }; export declare type ArrayOptionType = { options: Array; }; export { ITitle, ILegend, IGrid, ITooltip, IXAxis, IYAxis, IAxisPointer, ISeriesBar, ISeriesLine, ISeriesLines, ISeriesPie, ISeriesGauge, ISeriesRadar, ISeriesScatter, ISeriesLineOrBar, IToolbox, IGraphic, IDataZoom }; /** * */ export interface EchartsMouseEventParams { /** * 当前点击的图形元素所属的组件名称,其值如 'series'、'markLine'、'markPoint'、'timeLine' 等。 */ componentType: string; /** * 系列类型。值可能为:'line'、'bar'、'pie' 等。当 componentType 为 'series' 时有意义。 */ seriesType: string; /** * 系列在传入的 option.series 中的 index。当 componentType 为 'series' 时有意义。 */ seriesIndex: number; /** * 系列名称。当 componentType 为 'series' 时有意义。 */ seriesName: string; /** * 数据名,类目名 */ name: string; /** * 数据在传入的 data 数组中的 index */ dataIndex: number; /** * 传入的原始数据项 */ data: any; /** * sankey、graph 等图表同时含有 nodeData 和 edgeData 两种 data, * dataType 的值会是 'node' 或者 'edge',表示当前点击在 node 还是 edge 上。 * 其他大部分图表中只有一种 data,dataType 无意义。 */ dataType: string; /** * 传入的数据值 */ value: number | Array; /** * 数据图形的颜色。当 componentType 为 'series' 时有意义。 */ color?: string; /** * 用户自定义的数据。只在 graphic component 和自定义系列(custom series)中生效,如果节点定义上设置了如:{type: 'circle', info: {some: 123}}。 */ info: any; [propName: string]: any; } export interface IMouseEvent { type: 'click' | 'dblclick' | 'mousedown' | 'mousemove' | 'mouseup' | 'mouseover' | 'mouseout' | 'globalout' | 'contextmenu'; handler: (params: EchartsMouseEventParams) => void; } export interface ILegendEvent { type: 'legendselectchanged' | 'legendselected' | 'legendunselected' | 'legendselectall' | 'legendinverseselect' | 'legendscroll'; handler: Function; } export interface IOtherEvent { type: 'datazoom' | 'datarangeselected' | 'timelineplaychanged' | 'restore' | 'dataviewchanged' | 'magictypechanged' | 'geoselectchanged' | 'geoselected' | 'geounselected' | 'pieselectchanged' | 'pieselected' | 'pieunselected' | 'mapselectchanged' | 'mapselected' | 'mapunselected' | 'axisareaselected' | 'focusnodeadjacency' | 'unfocusNodeAdjacency' | 'brush' | 'brushEnd' | 'brushselected' | 'globalcursortaken' | 'rendered' | 'finished'; handler: Function; } export declare type IEventType = IMouseEvent | ILegendEvent | IOtherEvent; export declare type ITooltipFormatter = EChartOption.Tooltip.Formatter; export declare type IFormatter = Function | string; export declare type ILoadingOption = EChartsLoadingOption; export declare type IResizeOption = EChartsResizeOption; export declare type IResponsiveOption = EChartsResponsiveOption; export declare type IMediaOption = EChartsMediaOption;