Skip to content

Commit

Permalink
fix: 修改蜘蛛网布局中被剔除 label 仍出现在画布(左上角) (#1395)
Browse files Browse the repository at this point in the history
  • Loading branch information
simaQ authored Aug 5, 2020
1 parent 438d991 commit bde691e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plots/pie/component/label/spider-label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export default class SpiderLabel {
}
const textGroup = this.container.addGroup({
capture: false, // 不捕获事件,否则鼠标 hover 到图形会失焦
visible: false, // 因为后续会将部分 label 删除,所以这里需要先隐藏,避免调整完后不该绘制的 label 显示在画布上
});
const textAttrs: IAttrs = {
x: 0,
Expand Down Expand Up @@ -378,6 +379,7 @@ export default class SpiderLabel {
child.attr('y', yPosition);
});

textGroup.show();
return textGroup;
}

Expand Down

0 comments on commit bde691e

Please sign in to comment.