100pah commented on a change in pull request #10084: Update sankey diagram with 
levels setting, reducing code size and so on.
URL: 
https://github.com/apache/incubator-echarts/pull/10084#discussion_r264240233
 
 

 ##########
 File path: src/chart/sankey/sankeyVisual.js
 ##########
 @@ -51,13 +51,12 @@ export default function (ecModel, payload) {
                 });
 
                 var mapValueToColor = 
mapping.mapValueToVisual(node.getLayout().value);
+
+                // Here we remove the judgment of 
node.getModel().get('itemStyle.color'),
+                // because we first use it in the render process with
+                // rect.setStyle('fill', itemModel.get('itemStyle.color') || 
node.getVisual('color')) in
+                // SankeyView.js.
                 node.setVisual('color', mapValueToColor);
-                // If set itemStyle.normal.color
-                var itemModel = node.getModel();
-                var customColor = itemModel.get('itemStyle.color');
-                if (customColor != null) {
-                    node.setVisual('color', customColor);
-                }
 
 Review comment:
   See the previous comment.
   Should not move this logic to render phase?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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]

Reply via email to