You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/10/29 16:10:34 UTC

[GitHub] 100pah closed pull request #9238: fix: #8952 callback function params.color incorrect

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org