@antv/g2plot
Version:
G2 Plot, a market of plots built with the Grammar of Graphics'
48 lines (47 loc) • 1.6 kB
TypeScript
import { LayerConfig } from '../../base/layer';
import ViewLayer, { ViewConfig } from '../../base/view-layer';
import './geometry/shape/liquid';
import './animation/liquid-move-in';
import { DataItem } from '../../interface/config';
export interface LiquidStyle {
}
export interface LiquidViewConfig extends Partial<ViewConfig> {
statistic?: {
visible?: boolean;
adjustColor?: boolean;
style?: {};
formatter?: (value: any) => string;
};
min: number;
max: number;
value: number;
liquidStyle?: LiquidStyle | ((...args: any[]) => LiquidStyle);
}
export interface LiquidLayerConfig extends LiquidViewConfig, LayerConfig {
data: DataItem[];
}
export default class LiquidLayer<T extends LiquidLayerConfig = LiquidLayerConfig> extends ViewLayer<T> {
static getDefaultOptions(): Partial<LiquidViewConfig>;
liquid: any;
type: string;
private shouldFadeInAnnotation;
init(): void;
protected coord(): void;
protected scale(): void;
protected axis(): void;
protected adjustLiquid(liquid: any): void;
protected addGeometry(): void;
protected animation(): void;
protected geometryParser(dim: string, type: string): string;
protected annotation(): void;
protected extractStatistic(): any;
afterRender(): void;
protected processData(data?: DataItem[]): DataItem[] | undefined;
changeValue(value: number): void;
protected fadeInAnnotation(): void;
protected calcAnnotationColorStyle(): {
fill: any;
shadowColor: any;
};
updateConfig(cfg: Partial<T>): void;
}