diff --git a/src/chart/graph/circularLayoutHelper.js b/src/chart/graph/circularLayoutHelper.js index 93f888ad8c..f6979b7193 100644 --- a/src/chart/graph/circularLayoutHelper.js +++ b/src/chart/graph/circularLayoutHelper.js @@ -77,8 +77,8 @@ export function circularLayout(seriesModel, basedOn) { graph.eachEdge(function (edge, index) { var curveness = zrUtil.retrieve3( + edge.getModel().get('lineStyle.curveness') || null, getCurvenessForEdge(edge, seriesModel, index), - edge.getModel().get('lineStyle.curveness'), 0 ); var p1 = vec2.clone(edge.node1.getLayout()); diff --git a/src/chart/helper/multipleGraphEdgeHelper.js b/src/chart/helper/multipleGraphEdgeHelper.js index e7aaf46710..5a5810b8c0 100644 --- a/src/chart/helper/multipleGraphEdgeHelper.js +++ b/src/chart/helper/multipleGraphEdgeHelper.js @@ -17,6 +17,8 @@ * under the License. */ +import * as zrUtil from 'zrender/src/core/util'; + var KEY_DELIMITER = '-->'; /** * params handler @@ -42,7 +44,7 @@ var createCurveness = function (seriesModel, appendLength) { if (typeof autoCurvenessParmas === 'number') { length = autoCurvenessParmas; } - else if (Object.prototype.toString.call(autoCurvenessParmas) === '[object Array]') { + else if (zrUtil.isArray(autoCurvenessParmas)) { seriesModel._curvenessList = autoCurvenessParmas; return; } @@ -178,7 +180,7 @@ export function createEdgeMapForCurveness(n1, n2, seriesModel, dataIndex) { */ export function getCurvenessForEdge(edge, seriesModel, index, needReverse) { const autoCurvenessParams = getAutoCurvenessParams(seriesModel); - const isArrayParam = Object.prototype.toString.call(autoCurvenessParams) === '[object Array]'; + const isArrayParam = zrUtil.isArray(autoCurvenessParams); if (!autoCurvenessParams) { return null; }