Skip to content

Commit

Permalink
optimize attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
foolzhang committed Nov 6, 2019
1 parent d7e8f52 commit 89961d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/chart/bar/BarView.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ function updateStyle(
) {
var color = data.getItemVisual(dataIndex, 'color');
var opacity = data.getItemVisual(dataIndex, 'opacity');
var stroke = data.getVisual('borderColor');
var itemStyleModel = itemModel.getModel('itemStyle');
var hoverStyle = itemModel.getModel('emphasis.itemStyle').getBarItemStyle();

Expand All @@ -424,8 +425,9 @@ function updateStyle(

el.useStyle(zrUtil.defaults(
{
fill: layout.startAngle === layout.endAngle ? 'transparent' : color,
opacity: layout.startAngle === layout.endAngle ? 0 : opacity
stroke : layout.startAngle === layout.endAngle ? 'none' : stroke,
fill: layout.startAngle === layout.endAngle ? 'none' : color,
opacity: opacity
},
itemStyleModel.getBarItemStyle()
));
Expand Down

0 comments on commit 89961d1

Please sign in to comment.