plainheart commented on a change in pull request #12590:
URL: 
https://github.com/apache/incubator-echarts/pull/12590#discussion_r447325330



##########
File path: src/chart/graph/GraphSeries.js
##########
@@ -25,6 +25,8 @@ import Model from '../../model/Model';
 import {encodeHTML} from '../../util/format';
 import createGraphFromNodeEdge from '../helper/createGraphFromNodeEdge';
 import LegendVisualProvider from '../../visual/LegendVisualProvider';
+import {initCurvenessList} from '../helper/multipleGraphEdgeHelper';
+import {createEdgeMapForCurveness} from 
'../../chart/helper/multipleGraphEdgeHelper';

Review comment:
       Could be merged as following
   ```js
   import {initCurvenessList, createEdgeMapForCurveness} from 
'../helper/multipleGraphEdgeHelper';
   ```

##########
File path: src/data/Graph.js
##########
@@ -137,9 +137,10 @@ graphProto.getNodeById = function (id) {
  * @param {number|string|module:echarts/data/Graph.Node} n1
  * @param {number|string|module:echarts/data/Graph.Node} n2
  * @param {number} [dataIndex=-1]
+ * @param {module:echarts/model/SeriesModel} seriesModel
  * @return {module:echarts/data/Graph.Edge}
  */
-graphProto.addEdge = function (n1, n2, dataIndex) {
+graphProto.addEdge = function (n1, n2, dataIndex, seriesModel) {

Review comment:
       The parameter `seriesModel` looks unused, consider removing it.

##########
File path: src/chart/graph/forceLayout.js
##########
@@ -84,11 +85,16 @@ export default function (ecModel) {
                     d = (edgeLength[0] + edgeLength[1]) / 2;
                 }
                 var edgeModel = edge.getModel();
+                var curveness = zrUtil.retrieve3(
+                    edge.getModel().get('lineStyle.curveness'),

Review comment:
       `edge.getModel()` could be replaced by the variable `edgeModel` declared 
in previous code line.

##########
File path: src/chart/helper/createGraphFromNodeEdge.js
##########
@@ -39,12 +39,14 @@ export default function (nodes, edges, seriesModel, 
directed, beforeLink) {
     var linkNameList = [];
     var validEdges = [];
     var linkCount = 0;
+
     for (var i = 0; i < edges.length; i++) {
         var link = edges[i];
         var source = link.source;
         var target = link.target;
+
         // addEdge may fail when source or target not exists
-        if (graph.addEdge(source, target, linkCount)) {
+        if (graph.addEdge(source, target, linkCount, seriesModel)) {

Review comment:
       The parameter `seriesModel` looks unused, consider removing it.
   




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to