Skip to content

Commit

Permalink
feat(types): improve Geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Jul 6, 2020
1 parent 64211ea commit 9075b46
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions types/Geometry.d.ts
Expand Up @@ -151,12 +151,17 @@ export interface Geometry<
): this;

/**
* 将数据值映射到图形的形状上的方法
* 将数据值映射到内置的图形的形状上的方法
*/
shape(kind: GeometryShapeKind<TGeometryKind>): this;

/**
* 将数据值映射到图形的形状上的方法。
* 将数据值映射到自定义的图形的形状上的方法。
*/
shape(kind: string): this;

/**
* 将数据值映射到内置的图形的形状上的方法。
*/
shape<TField extends DataField<TRecord>>(
field: TField,
Expand All @@ -166,6 +171,14 @@ export interface Geometry<
| ((value: TRecord[TField]) => GeometryShapeKind<TGeometryKind>),
): this;

/**
* 将数据值映射到自定义的图形的形状上的方法。
*/
shape<TField extends DataField<TRecord>>(
field: TField,
kind?: string | string[] | ((value: TRecord[TField]) => string),
): this;

/**
* 将数据值映射到图形的大小上的方法。
*/
Expand Down

0 comments on commit 9075b46

Please sign in to comment.