Skip to content

Commit 1f7d155

Browse files
authored
fix: The legend display of the Veen chart is abnormal (#2910)
1 parent d80de45 commit 1f7d155

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export const TRANSFORM_OPTION_KEY = {
6464
angleField: 'encode.y',
6565
keyField: 'encode.key',
6666
sizeField: 'encode.size',
67+
setsField: 'encode.sets',
6768
shapeField: 'encode.shape',
6869
seriesField: 'encode.series',
6970
positionField: 'encode.position',

packages/plots/src/core/plots/venn/adaptor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ export function adaptor(params: Params) {
2828
},
2929
],
3030
});
31-
set(options, 'colorField', setsField);
31+
set(options, 'colorField', DefaultTransformKey.color);
3232
set(options, ['children', '0', 'encode', 'd'], DefaultTransformKey.d);
3333
}
34-
set(params, 'options', omit(options, ['sizeField', 'setsField']));
3534
return params;
3635
};
3736

site/examples/case/interactions/demo/memo.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Pie } from '@ant-design/plots';
22
import { Button } from 'antd';
33
import { isEqual } from 'lodash';
44
import React, { memo, useState } from 'react';
5+
import { createRoot } from 'react-dom';
56

67
const DemoPie = memo(
78
({ data, onReady }) => {

0 commit comments

Comments
 (0)