@antv/g2plot
Version:
G2 Plot, a market of plots built with the Grammar of Graphics'
50 lines (49 loc) • 1.6 kB
TypeScript
import { LayerConfig } from '../../base/layer';
import ViewLayer, { ViewConfig } from '../../base/view-layer';
import { ElementOption, ICatAxis, ITimeAxis, IValueAxis } from '../../interface/config';
import './apply-responsive/theme';
import './component/label/column-label';
import './theme';
interface ColumnStyle {
opacity?: number;
lineDash?: number[];
}
export interface ColumnViewConfig extends ViewConfig {
type?: 'rect' | 'triangle' | 'round';
colorField?: string;
columnSize?: number;
maxWidth?: number;
minWidth?: number;
columnStyle?: ColumnStyle | ((...args: any[]) => ColumnStyle);
xAxis?: ICatAxis | ITimeAxis;
yAxis?: IValueAxis;
}
export interface ColumnLayerConfig extends ColumnViewConfig, LayerConfig {
}
export default class BaseColumnLayer<T extends ColumnLayerConfig = ColumnLayerConfig> extends ViewLayer<T> {
static getDefaultOptions(): any;
column: any;
type: string;
getOptions(props: T): any;
beforeInit(): void;
afterRender(): void;
protected geometryParser(dim: any, type: any): any;
protected scale(): void;
protected coord(): void;
protected adjustColumn(column: ElementOption): void;
protected addGeometry(): void;
protected animation(): void;
protected parseEvents(eventParser: any): void;
protected extractLabel(): any;
private applyResponsive;
getLabelOptionsByPosition(position: string): {
offset: number;
style: {
textBaseline: string;
};
} | {
offset: number;
style?: undefined;
};
}
export {};