@antv/g2plot
Version:
An interactive and responsive charting library
21 lines (20 loc) • 953 B
TypeScript
import { ShapeAttrs } from '@antv/g-base';
import { PatternOption } from '../utils/pattern/index';
import { Datum } from './common';
/** 图形属性 */
export declare type ShapeStyle = ShapeAttrs;
/** 颜色映射 */
export declare type ColorAttr = string | string[] | ((datum: Datum, defaultColor?: string) => string);
/** pattern 映射*/
export declare type PatternAttr = CanvasPattern | PatternOption | ((datum: Datum, color: string /** inherit color */) => PatternOption | CanvasPattern);
/** 尺寸大小映射 */
export declare type SizeAttr = number | [number, number] | ((datum: Datum) => number);
/** 图形 shape 映射 */
export declare type ShapeAttr = string | string[] | ((datum: Datum) => string);
/** 图形样式 style 映射 */
export declare type StyleAttr = ShapeStyle | ((datum: Datum) => ShapeStyle);
/** tooltip 的回调 */
export declare type TooltipAttr = (datum: Datum) => {
name: string;
value: string | number;
};