Skip to content

Commit 0c1205e

Browse files
taoeer黄涛
andauthored
fix(funnel): 修复漏斗图图例操作后显示错误 (#3874)
Co-authored-by: 黄涛 <ht01604267@antgroup.com>
1 parent 2dbc5a8 commit 0c1205e

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/plots/funnel/geometries/common.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ export function transformData(
2525
// format 数据
2626
formatData = map(data, (row, index) => {
2727
const percent = (row[yField] || 0) / maxYFieldValue;
28-
row[FUNNEL_PERCENT] = percent;
29-
row[FUNNEL_MAPPING_VALUE] = (max - min) * percent + min;
30-
// 转化率数据存储前后数据
31-
row[FUNNEL_CONVERSATION] = [get(data, [index - 1, yField]), row[yField]];
32-
return row;
28+
return {
29+
...row,
30+
[FUNNEL_PERCENT]: percent,
31+
[FUNNEL_MAPPING_VALUE]: (max - min) * percent + min,
32+
[FUNNEL_CONVERSATION]: [get(data, [index - 1, yField]), row[yField]],
33+
};
3334
});
3435

3536
return formatData;

0 commit comments

Comments
 (0)