Skip to content

Commit b14fe7d

Browse files
author
liufu.lf
committed
fix: resolve conversation
1 parent 5c5add2 commit b14fe7d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/plots/scatter/adaptor.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,13 @@ function geometry(params: Params<ScatterOptions>): Params<ScatterOptions> {
3434

3535
let { tooltip } = options;
3636

37-
if (sizeField && (!size || isNumber(size))) {
38-
size = [(size as number) || 2, (size as number) || 8];
37+
if (sizeField) {
38+
if (!size) {
39+
size = [2, 8];
40+
}
41+
if (isNumber(size)) {
42+
size = [size, size];
43+
}
3944
}
4045

4146
if (tooltip && !tooltip.fields) {

0 commit comments

Comments
 (0)