This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git


The following commit(s) were added to refs/heads/master by this push:
     new c18d9fc  Fix sankey link value is 0, node will disappear
     new 363f3e0  Merge pull request #12191 from susiwen8/#12189
c18d9fc is described below

commit c18d9fcb15e3d2e346ba98ffd54131c988c29d09
Author: susiwen8 <[email protected]>
AuthorDate: Tue Feb 25 18:54:27 2020 +0800

    Fix sankey link value is 0, node will disappear
---
 src/chart/sankey/sankeyLayout.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/chart/sankey/sankeyLayout.js b/src/chart/sankey/sankeyLayout.js
index 812d188..3cca626 100644
--- a/src/chart/sankey/sankeyLayout.js
+++ b/src/chart/sankey/sankeyLayout.js
@@ -458,6 +458,7 @@ function relaxLeftToRight(nodesByBreadth, alpha, orient) {
             if (node.inEdges.length) {
                 var y = sum(node.inEdges, weightedSource, orient)
                         / sum(node.inEdges, getEdgeValue, orient);
+                isNaN(y) && (y = 0);
                 if (orient === 'vertical') {
                     var nodeX = node.getLayout().x + (y - center(node, 
orient)) * alpha;
                     node.setLayout({x: nodeX}, true);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to