@zhouchangju/standard-chart
Version:
标准范式组件
48 lines (47 loc) • 1.37 kB
TypeScript
import { type SeriesModel } from 'echarts';
import type { ZRStyleProps } from 'echarts/types/src/util/types';
import type Element from 'zrender/lib/Element';
import type StandardChart from '../../core/StandardChart';
export type ModelAndView = {
model: SeriesModel;
view: unknown;
};
export type TimeLineHelperInitCfg = {
duration?: number;
delay?: number;
dataIndex?: number;
breathPoint?: {
show?: boolean;
shape?: {
r?: number;
};
style?: ZRStyleProps;
z: number;
};
verticalPointer?: {
show?: boolean;
style?: ZRStyleProps;
};
endLabel?: {
containLabel?: boolean;
};
dvDuring?: (percent: number, lineClipPath: Element, lineModelAndView: ModelAndView, lineModelsAndViews: ModelAndView[]) => void;
};
export type BoundingRect = {
x: number;
y: number;
width: number;
height: number;
};
export default class LineTimeLineHelper {
private _Chart;
private myChart;
private stateTransitionConfig;
lineModelsAndViews: ModelAndView[];
constructor(chart: StandardChart, transitionConfig?: TimeLineHelperInitCfg);
_init(): void;
prepareClip(): void;
start(dataIndex: number): void;
change(index: number, noAnimation?: boolean): void;
setTransitionConfig(config: TimeLineHelperInitCfg): void;
}