diff --git a/src/chart/sunburst/SunburstPiece.js b/src/chart/sunburst/SunburstPiece.js index a79d66afa8..ed06d63d18 100644 --- a/src/chart/sunburst/SunburstPiece.js +++ b/src/chart/sunburst/SunburstPiece.js @@ -94,6 +94,8 @@ SunburstPieceProto.updateData = function ( var visualColor = getNodeColor(node, seriesModel, ecModel); + fillDefaultColor(node, seriesModel, visualColor) + var normalStyle = itemModel.getModel('itemStyle').getItemStyle(); var style; if (state === 'normal') { @@ -411,3 +413,9 @@ function isNodeHighlighted(node, activeNode, policy) { return node === activeNode || node.isDescendantOf(activeNode); } } + +// Fix tooltip callback function params.color incorrect when pick a default color +function fillDefaultColor(node, seriesModel, color) { + var data = seriesModel.getData(); + data.setItemVisual(node.dataIndex, 'color', color); +}