From bde691e3844e0fe7ba27d534b951a6de8aded2d9 Mon Sep 17 00:00:00 2001 From: SimaQ Date: Wed, 5 Aug 2020 09:11:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=9C=98=E8=9B=9B?= =?UTF-8?q?=E7=BD=91=E5=B8=83=E5=B1=80=E4=B8=AD=E8=A2=AB=E5=89=94=E9=99=A4?= =?UTF-8?q?=20label=20=E4=BB=8D=E5=87=BA=E7=8E=B0=E5=9C=A8=E7=94=BB?= =?UTF-8?q?=E5=B8=83=EF=BC=88=E5=B7=A6=E4=B8=8A=E8=A7=92=EF=BC=89=20(#1395?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plots/pie/component/label/spider-label.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plots/pie/component/label/spider-label.ts b/src/plots/pie/component/label/spider-label.ts index 8c10c0b125..e1f2fcf177 100644 --- a/src/plots/pie/component/label/spider-label.ts +++ b/src/plots/pie/component/label/spider-label.ts @@ -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, @@ -378,6 +379,7 @@ export default class SpiderLabel { child.attr('y', yPosition); }); + textGroup.show(); return textGroup; }