Skip to content

Commit 5b17368

Browse files
committed
fix(base): rawFields 添加回调,对 geometry color shape 进行了区分 -2
1 parent 2566e3b commit 5b17368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/adaptor/geometries/base.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ export function getMappingField(
7474
tileMappingField: string;
7575
} {
7676
const { type, xField, yField, colorField, shapeField, sizeField, styleField } = o;
77-
let { rawFields = [] } = o;
77+
let { rawFields } = o;
7878

7979
let fields = [];
80-
rawFields = isFunction(rawFields) ? rawFields(type, field) : rawFields;
80+
rawFields = (isFunction(rawFields) ? rawFields(type, field) : rawFields) || [];
8181

8282
// 因为 color 会影响到数据分组,以及最后的图形映射。所以导致 bar 图中的 widthRatio 设置不生效
8383
// 所以对于 color 字段,仅仅保留 colorField 好了! + rawFields

0 commit comments

Comments
 (0)