12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- import type {AxisPointerComponentOption, ECharts, LineSeriesOption} from 'echarts';
- import type ReactEchartsCore from 'echarts-for-react/lib/core';
- export type SeriesDataUnit = {
- value: number;
- name: string | number;
- onClick?: (series: Series, instance: ECharts) => void;
- itemStyle?: {
- color?: string;
- };
- };
- export type Series = {
- seriesName: string;
- data: SeriesDataUnit[];
- color?: string;
- areaStyle?: {
- color: string;
- opacity: number;
- };
- lineStyle?: AxisPointerComponentOption['lineStyle'];
- stack?: string;
- z?: number;
- markLine?: LineSeriesOption['markLine'];
- };
- export type ReactEchartsRef = ReactEchartsCore & {
- getEchartsInstance: () => ECharts;
- };
- export type EChartEventHandler<P> = (params: P, instance: ECharts) => void;
- export type EChartChartReadyHandler = (instance: ECharts) => void;
- export type EChartHighlightHandler = EChartEventHandler<any>;
- export type EChartMouseOverHandler = EChartEventHandler<any>;
- export type EChartClickHandler = EChartEventHandler<any>;
- export type EChartDataZoomHandler = EChartEventHandler<{
- type: 'datazoom';
-
- start: number;
-
- end: number;
-
- startValue?: number;
-
- endValue?: number;
- }>;
- export type EChartRestoreHandler = EChartEventHandler<{type: 'restore'}>;
- export type EChartFinishedHandler = EChartEventHandler<{}>;
- export type EChartRenderedHandler = EChartEventHandler<{}>;
|