100pah closed pull request #9238: fix: #8952 callback function params.color
incorrect
URL: https://github.com/apache/incubator-echarts/pull/9238
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
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);
+}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]