@antv/g2
Version:
the Grammar of Graphics in Javascript
47 lines (46 loc) • 1.12 kB
TypeScript
import { Point } from '../../../dependents';
import { FilterCondition } from '../../../interface';
import { View } from '../../../chart';
import Action from '../base';
/**
* 范围过滤的 Action
* @ignore
*/
declare class RangeFilter extends Action {
/** 允许外部传入 dims */
protected cfgFields: ['dims'];
/**
* 范围过滤生效的字段/维度,可以是 x, y
*/
protected dims: string[];
/** 起始点 */
protected startPoint: Point;
private isStarted;
private hasDim;
/**
* 开始范围过滤,记录范围过滤的起点
*/
start(): void;
/**
* 过滤,以开始的点和当前点对数据进行过滤
*/
filter(): void;
/**
* 结束
*/
end(): void;
/**
* 取消同当前 Action 相关的过滤,指定的 x,y
*/
reset(): void;
/**
* 对 view 进行过滤
*/
protected filterView(view: View, field: string, filter: FilterCondition): void;
/**
* 重新渲染
* @param view
*/
protected reRender(view: View): void;
}
export default RangeFilter;