diff --git a/doc/doc.html b/doc/doc.html index 0c26abc436bea5891bef7796d2527888c83ef1d8..091dea96c0ea7114b7bfc1428bdf8dbe932fc800 100644 --- a/doc/doc.html +++ b/doc/doc.html @@ -2564,7 +2564,7 @@ geoCoord : { {string} borderColor '#fff' - 柱形图,折线图(symbol),散点图(symbole),markPoint + 柱形图,折线图(symbol),散点图(symbole),饼图,markPoint 柱形边框颜色 @@ -2576,7 +2576,7 @@ geoCoord : { {number} borderWidth 1 - 柱形图,折线图(symbol),散点图(symbole),markPoint + 柱形图,折线图(symbol),散点图(symbole),饼图,markPoint 柱形边框线宽,单位px,默认为1 diff --git a/src/chart/pie.js b/src/chart/pie.js index 097abfc3feb933a04ca2e8f3a0b29f45f8ebff4b..bb6cfed9aae3169a5199659359dcae51dc2e4631 100644 --- a/src/chart/pie.js +++ b/src/chart/pie.js @@ -290,14 +290,19 @@ define(function(require) { var center = self.parseCenter(serie.center); // 多级控制 - var normalColor = self.deepQuery( - queryTarget, - 'itemStyle.normal.color' - ) || defaultColor; - - var emphasisColor = self.deepQuery( - queryTarget, - 'itemStyle.emphasis.color' + var normal = self.deepMerge( + queryTarget, + 'itemStyle.normal' + ) || {}; + var emphasis = self.deepMerge( + queryTarget, + 'itemStyle.emphasis' + ) || {}; + var normalColor = normal.color || defaultColor; + var emphasisColor = emphasis.color + || (typeof normalColor == 'string' + ? zrColor.lift(normalColor, -0.2) + : normalColor ); var sector = { @@ -313,17 +318,16 @@ define(function(require) { endAngle : endAngle, brushType : 'both', color : normalColor, - strokeColor : '#fff', - lineWidth: 1 + lineWidth : normal.borderWidth, + strokeColor : normal.borderColor, + lineJoin: 'round' }, highlightStyle : { - //color : emphasisColor || normalColor - color : emphasisColor - || (typeof normalColor == 'string' - ? zrColor.lift(normalColor, -0.2) - : normalColor - ), - strokeColor : 'rgba(0,0,0,0)' + color : emphasisColor, + strokeColor : 'rgba(0,0,0,0)', + lineWidth : emphasis.borderWidth, + strokeColor : emphasis.borderColor, + lineJoin: 'round' }, _seriesIndex : seriesIndex, _dataIndex : dataIndex diff --git a/src/config.js b/src/config.js index bef3aa1ef5eba90097307dcdfd224283237f4f48..a6e04a26a1992e1f50ced231fc647f5c47a852fb 100644 --- a/src/config.js +++ b/src/config.js @@ -602,7 +602,9 @@ define(function() { width: 1, type: 'solid' } - } + }, + borderWidth: 1, + borderColor: '#fff' }, emphasis: { // color: 各异, @@ -620,7 +622,8 @@ define(function() { width: 1, type: 'solid' } - } + }, + borderWidth: 0 } } },