UNPKG

@antv/g2plot

Version:

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

57 lines (56 loc) 1.89 kB
import { LayerConfig } from '../../base/layer'; import ViewLayer, { ViewConfig } from '../../base/view-layer'; import { ICatAxis, ITimeAxis, IValueAxis } from '../../interface/config'; import Quadrant, { QuadrantConfig } from './components/quadrant'; import Trendline, { TrendlineConfig } from './components/trendline'; import './components/label/scatter-label'; export interface PointStyle { /** 圆边颜色 */ stroke: string; /** 圆边大小 */ lineWidth?: number; /** 圆边透明度 */ strokeOpacity?: number; /** 填充透明度 */ fillOpacity?: number; /** 整体透明度 */ opacity?: number; } export interface PointViewConfig extends ViewConfig { /** 散点样式 */ pointStyle?: PointStyle | ((...args: any) => PointStyle); /** 颜色字段 */ colorField?: string | string[]; /** x 轴配置 */ xAxis?: ICatAxis | ITimeAxis | IValueAxis; /** y 轴配置 */ yAxis?: IValueAxis; quadrant?: QuadrantConfig; trendline?: TrendlineConfig; } export interface ScatterViewConfig extends PointViewConfig { /** 散点大小 */ pointSize?: number | any; } export interface ScatterLayerConfig extends ScatterViewConfig, LayerConfig { } export default class ScatterLayer<T extends ScatterLayerConfig = ScatterLayerConfig> extends ViewLayer<T> { static getDefaultOptions(): any; type: string; points: any; protected quadrant: Quadrant; protected trendline: Trendline; afterRender(): void; destroy(): void; protected geometryParser(dim: any, type: any): any; protected scale(): void; protected coord(): void; protected annotation(): void; protected addGeometry(): void; protected animation(): void; protected parseEvents(eventParser: any): void; protected extractLabel(): any; protected extractTooltip(): { fields: string[]; }; }