From fb166a4bee44306b23fc1bc7f14befa307178c6c Mon Sep 17 00:00:00 2001 From: deqingli Date: Mon, 18 Mar 2019 20:07:51 +0800 Subject: [PATCH] fix(pie): Fixes #10088 --- src/chart/pie/PieView.js | 2 +- test/aria-pie.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/chart/pie/PieView.js b/src/chart/pie/PieView.js index 0b8be9ef84..1c06b7a8e3 100644 --- a/src/chart/pie/PieView.js +++ b/src/chart/pie/PieView.js @@ -212,7 +212,7 @@ piePieceProto._updateLabel = function (data, idx) { var labelLayout = layout.label; var visualColor = data.getItemVisual(idx, 'color'); - if (!labelLayout) { + if (!labelLayout || isNaN(labelLayout.x) || isNaN(labelLayout.y)) { labelText.ignore = labelText.normalIgnore = labelText.hoverIgnore = labelLine.ignore = labelLine.normalIgnore = labelLine.hoverIgnore = true; return; diff --git a/test/aria-pie.html b/test/aria-pie.html index 79890a3d86..c324210401 100644 --- a/test/aria-pie.html +++ b/test/aria-pie.html @@ -90,7 +90,7 @@ legend: { orient: 'vertical', left: 'left', - data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎'] + data: ['直接访问','邮件营销','联盟广告','视频广告(value is null)','搜索引擎'] }, series : [ { @@ -102,7 +102,7 @@ {value:335, name:'直接访问'}, {value:310, name:'邮件营销'}, {value:234, name:'联盟广告'}, - {value:135, name:'视频广告'}, + {value:null, name:'视频广告(value is null)'}, {value:1548, name:'搜索引擎'} ], itemStyle: {