diff --git a/src/component/marker/MarkAreaView.js b/src/component/marker/MarkAreaView.js index 50dd1af0a5..7295d66371 100644 --- a/src/component/marker/MarkAreaView.js +++ b/src/component/marker/MarkAreaView.js @@ -228,17 +228,28 @@ define(function (require) { var defaultValue = areaData.getName(idx) || ''; var textColor = color || polygon.style.fill; - graphic.setText(polygon.style, labelModel, textColor); - polygon.style.text = zrUtil.retrieve( - maModel.getFormattedLabel(idx, 'normal'), - defaultValue - ); - graphic.setText(polygon.hoverStyle, labelHoverModel, textColor); - polygon.hoverStyle.text = zrUtil.retrieve( - maModel.getFormattedLabel(idx, 'emphasis'), - defaultValue - ); + if (labelModel.getShallow('show')) { + graphic.setText(polygon.style, labelModel, textColor); + polygon.style.text = zrUtil.retrieve( + maModel.getFormattedLabel(idx, 'normal'), + defaultValue + ); + } + else { + polygon.style.text = ''; + } + + if (labelHoverModel.getShallow('show')) { + graphic.setText(polygon.hoverStyle, labelHoverModel, textColor); + polygon.hoverStyle.text = zrUtil.retrieve( + maModel.getFormattedLabel(idx, 'emphasis'), + defaultValue + ); + } + else { + polygon.hoverStyle.text = ''; + } graphic.setHoverStyle(polygon, {});