Skip to content

Commit 02280e0

Browse files
committed
fix: unknown component shape.point.smooth
1 parent c33e81c commit 02280e0

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

packages/plots/src/core/constants/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ export const CONFIG_SHAPE = [
254254
key: 'point',
255255
type: 'point',
256256
extend_keys: EXTEND_KEYS,
257+
default_cfg: {
258+
shapeField: 'circle',
259+
},
257260
},
258261
{
259262
key: 'area',

packages/plots/src/core/utils/transform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ export const transformOptions = (params: Adaptor) => {
5555
if (!config[key]) return;
5656
const exist = CONFIG_SHAPE.find((item) => item.key === key);
5757
if (exist) {
58-
const { type, extend_keys } = exist;
58+
const { type, extend_keys, default_cfg = {} } = exist;
5959
if (type) {
6060
const { tooltip } = config[key];
6161
children.push(
6262
transformConfig(
63-
mergeWithArrayCoverage({}, pick(config, extend_keys), { type }, config[key], {
63+
mergeWithArrayCoverage({}, pick(config, extend_keys), default_cfg, { type }, config[key], {
6464
tooltip: tooltip ? tooltip : false,
6565
}),
6666
),

0 commit comments

Comments
 (0)