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_r264228650
 
 

 ##########
 File path: src/chart/sankey/SankeyView.js
 ##########
 @@ -207,10 +200,10 @@ export default echarts.extendChartView({
             // Special color, use source node color or target node color
             switch (curve.style.fill) {
                 case 'source':
-                    curve.style.fill = edge.node1.getVisual('color');
+                    curve.style.fill = node1Model.get('itemStyle.color') || 
edge.node1.getVisual('color');
 
 Review comment:
   If `level model` or `series model` have `itemStyle.color` specified,
   visual color will not work any more.
   This is not follow the convention in other chart that "getVisual has higher 
priority than itemStyle".
   And the other component can not get the final value via `getVisual` any more.
   
   I think we'd better follow the rule that: 
   If we retrieve some prop (color/opacity/symbolSize/...) via `getVisual` in 
render phase, 
   we only retrieve that prop via `getVisual` but not via other source like 
`get('itemStyle.xxx')`.
   We do `setVisual(model.get('itemStyle.xxx'))` in visual phase in this case.
   
   I remenber you mentioned that can not get layout depth in visual phase.
   But visual phase is later then layout phase, so that probably something 
wrong.
   We should check that.
   

----------------------------------------------------------------
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