NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/@antv/g2/esm/facet/facet.d.ts

161 lines
4.1 KiB
TypeScript
Raw Normal View History

2023-09-14 14:47:11 +08:00
import { IGroup } from '../dependents';
import { AxisCfg, Condition, Datum, FacetCfg, FacetData, FacetDataFilter, Region } from '../interface';
import View from '../chart/view';
/**
* facet
* - 便 facet
* -
*
*
*
* init
* 1.
* 2.
*
* render
* 1. view
* 2. title
* 3. axis
*
* clear
* 1. view
*
* destroy
* 1. clear
* 2.
* 3. group
*/
export declare abstract class Facet<C extends FacetCfg<FacetData> = FacetCfg<FacetData>, F extends FacetData = FacetData> {
/** 分面所在的 view */
view: View;
/** 分面容器 */
container: IGroup;
/** 是否销毁 */
destroyed: boolean;
/** 分面的配置项 */
protected cfg: C;
/** 分面之后的所有分面数据结构 */
protected facets: F[];
constructor(view: View, cfg: C);
/**
*
*/
init(): void;
/**
* view
* - view
* -
* - title
*
*
*/
render(): void;
/**
* facet
*/
update(): void;
/**
* clear 使 init
*
*/
clear(): void;
/**
*
*/
destroy(): void;
/**
* facet view使
* @param facet
*/
protected facetToView(facet: F): View;
private createContainer;
/**
* view
*/
private renderViews;
/**
* view
*/
private createFacetViews;
/**
* view facetView
*/
private clearFacetViews;
/**
*
* @protected
* @param data
* @param field
* @return
*/
protected getFieldValues(data: Datum[], field: string): string[];
/**
* region
* @param rows row
* @param cols col
* @param xIndex x index
* @param yIndex y index
*/
protected getRegion(rows: number, cols: number, xIndex: number, yIndex: number): Region;
protected getDefaultCfg(): {
eachView: any;
showTitle: boolean;
padding: number;
fields: any[];
};
/**
* title title columnTitlerowTitle
*/
protected getDefaultTitleCfg(): {
style: {
fontSize: number;
fill: string;
fontFamily: any;
};
};
/**
* axis
* @param view
* @param facet
*/
protected processAxis(view: View, facet: F): void;
/**
*
* @param conditions
*/
protected getFacetDataFilter(conditions: Condition[]): FacetDataFilter;
/**
* @override eachView
* @param view
* @param facet
*/
protected abstract beforeEachView(view: View, facet: F): any;
/**
* @override eachView
* @param view
* @param facet
*/
protected abstract afterEachView(view: View, facet: F): any;
/**
* @override
* @param data
*/
protected abstract generateFacets(data: Datum[]): F[];
/**
* x
* @param x
* @param axes
* @param option
* @param facet
*/
protected abstract getXAxisOption(x: string, axes: any, option: AxisCfg, facet: F): object;
/**
* y
* @param y
* @param axes
* @param option
* @param facet
*/
protected abstract getYAxisOption(y: string, axes: any, option: AxisCfg, facet: F): object;
}