diff --git a/src/chart/bar/BarView.js b/src/chart/bar/BarView.js index 3152b4c428..0996c33c7a 100644 --- a/src/chart/bar/BarView.js +++ b/src/chart/bar/BarView.js @@ -425,7 +425,7 @@ function updateStyle( el.useStyle(zrUtil.defaults( { - stroke : layout.startAngle === layout.endAngle ? 'none' : stroke, + stroke: layout.startAngle === layout.endAngle ? 'none' : stroke, fill: layout.startAngle === layout.endAngle ? 'none' : color, opacity: opacity }, @@ -445,7 +445,9 @@ function updateStyle( seriesModel, dataIndex, labelPositionOutside ); } - + if (layout.startAngle === layout.endAngle) { + hoverStyle.fill = hoverStyle.stroke = 'none'; + } graphic.setHoverStyle(el, hoverStyle); } diff --git a/test/polar-rounded.html b/test/polar-rounded.html index cce697b732..3e4f8a8f7c 100644 --- a/test/polar-rounded.html +++ b/test/polar-rounded.html @@ -44,6 +44,7 @@
+ @@ -194,6 +195,11 @@ itemStyle: { borderColor: 'red', borderWidth: 1 + },emphasis:{ + itemStyle:{ + color:'red', + borderColor:'blue' + } } }], legend: { @@ -282,5 +288,89 @@ }); + + +