From c03ba8be18db60b5de29701906bdb84d7d396510 Mon Sep 17 00:00:00 2001 From: sushuang Date: Sun, 13 Jan 2019 05:03:42 +0800 Subject: [PATCH] migrate the fix of #8943 (7ed2cb0) --- src/chart/sunburst/SunburstPiece.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/chart/sunburst/SunburstPiece.js b/src/chart/sunburst/SunburstPiece.js index a79d66afa..ed06d63d1 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); +} -- GitLab