@antv/g2plot
Version:
G2 Plot, a market of plots built with the Grammar of Graphics'
42 lines (41 loc) • 1.39 kB
TypeScript
import { LayerConfig } from '../../base/layer';
import ViewLayer, { ViewConfig } from '../../base/view-layer';
import MatrixLegend, { MatrixLegendConfig } from './component/legend';
import './component/label';
import './component/legend';
export interface MatrixViewConfig extends ViewConfig {
forceSquare?: boolean;
sizeField?: string;
colorField?: string;
shapeSize?: number[];
shapeType?: string;
color?: string[];
legend?: MatrixLegendConfig;
}
export interface MatrixLayerConfig extends MatrixViewConfig, LayerConfig {
}
export default class MatrixLayer<T extends MatrixLayerConfig = MatrixLayerConfig> extends ViewLayer<T> {
static getDefaultOptions(): any;
type: string;
protected gridSize: number[];
protected matrixLegend: MatrixLegend;
afterInit(): void;
afterRender(): void;
changeShape(type: string): void;
mappingSize(field: string): void;
disableMappingSize(): void;
protected geometryParser(): string;
protected coord(): void;
protected legend(): void;
protected addGeometry(): void;
protected addRect(): any;
protected addCircle(): any;
protected extractLabel(): any;
private getGridSize;
private circleToRect;
private rectToCircle;
private rectSizeMapping;
private circleSizeMapping;
private circleDisableSizeMapping;
private rectDisableSizeMapping;
}