zz-chart
Version:
Alauda Chart components by Alauda Frontend Team
45 lines (44 loc) • 1.09 kB
TypeScript
import { Action } from '../interaction/action/action.js';
import { ChartEvent as TriggerType } from './chart.js';
export interface InteractionSteps {
/**
* 交互开始
*/
start?: InteractionStep[];
/**
* 交互结束
*/
end?: InteractionStep[];
}
export interface ActionObject {
action: Action;
methodName: string;
}
export interface InteractionStep {
/**
* 触发事件,支持 view,chart 的各种事件
*/
trigger: string | TriggerType;
/**
* @private
* 存储 action callback
*/
actionObject?: ActionObject;
/**
* action 名称 (组件:动作)
*/
action: string | ActionType;
/**
* 回调函数,action 执行后执行
*/
callback?: (context: unknown) => void;
}
export declare enum ActionType {
TOOLTIP_SHOW = "tooltip:show",
TOOLTIP_HIDE = "tooltip:hide",
ELEMENT_ACTIVE = "element-active:active",
ELEMENT_RESET = "element-active:reset",
LEGEND_TOGGLE = "legend:toggle",
BRUSH_X_START = "brush-x:start",
BRUSH_X_END = "brush-x:end"
}