UNPKG

@antv/g2plot

Version:

G2 Plot, a market of plots built with the Grammar of Graphics'

61 lines (60 loc) 1.41 kB
import { Group } from '@antv/g'; import { View } from '@antv/g2'; interface ILabel { position?: string; text: string[] | Function; offset?: number | Function; style?: any; } export interface QuadrantConfig { visible?: boolean; xBaseline?: number; yBaseline?: number; regionStyle: any[] | any; lineStyle?: any; label: ILabel; } export interface IQuadrant extends QuadrantConfig { view: View; plotOptions: any; } export default class Quadrant { options: IQuadrant; protected view: View; protected xBaseline: number; protected yBaseline: number; protected quadrantGroups: Group[]; protected container: Group; protected regionData: any[]; protected lineData: any[]; constructor(cfg: IQuadrant); init(): void; render(): void; clear(): void; destroy(): void; protected getDefaultStyle(): { line: { stroke: string; lineWidth: number; }; region_2: { fill: string; opacity: number; }[]; region_4: { fill: string; opacity: number; }[]; label: { position: string; offset: number; style: { fontSize: number; fill: string; }; }; }; private getRegionStyle; private getLabelConfig; } export {};