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re,EAAMD,GACjC,IAAIqe,EAAanY,KAAK6Y,YAClBW,EAAkB1f,EAAY0f,gBAC9BC,EAAcD,EAAgB9B,MAUlC,OARKS,GAAcsB,IAAgBzZ,KAAK0Z,eACtCvB,GAAcA,EAAWjT,SACzBiT,EAAanY,KAAK6Y,YAAcY,EAAc,IAAIxB,EAAoB,IAAID,EAC1EhY,KAAK0Z,aAAeD,EACpBzZ,KAAKyC,MAAMkB,aAGb3D,KAAKyC,MAAMoB,IAAIsU,EAAW1V,OACnB0V,CACT,EACAjT,OAAQ,SAAU5H,EAASL,GACzB+C,KAAK6Y,aAAe7Y,KAAK6Y,YAAY3T,QAAO,GAC5ClF,KAAK6Y,YAAc,IACrB,EACAtR,QAAS,WAAa,G","sources":["webpack://app/./node_modules/echarts/lib/chart/pie.js","webpack://app/./node_modules/echarts/lib/chart/pie/labelLayout.js","webpack://app/./node_modules/echarts/lib/chart/pie/pieLayout.js","webpack://app/./node_modules/echarts/lib/chart/radar.js","webpack://app/./node_modules/echarts/lib/chart/radar/RadarSeries.js","webpack://app/./node_modules/echarts/lib/chart/radar/RadarView.js","webpack://app/./node_modules/echarts/lib/chart/radar/backwardCompat.js","webpack://app/./node_modules/echarts/lib/chart/radar/radarLayout.js","webpack://app/./node_modules/echarts/lib/chart/sankey.js","webpack://app/./node_modules/echarts/lib/chart/sankey/SankeySeries.js","webpack://app/./node_modules/echarts/lib/chart/sankey/SankeyView.js","webpack://app/./node_modules/echarts/lib/chart/sankey/sankeyAction.js","webpack://app/./node_modules/echarts/lib/chart/sankey/sankeyLayout.js","webpack://app/./node_modules/echarts/lib/chart/sankey/sankeyVisual.js","webpack://app/./node_modules/echarts/lib/chart/scatter.js","webpack://app/./node_modules/echarts/lib/chart/scatter/ScatterSeries.js","webpack://app/./node_modules/echarts/lib/chart/scatter/ScatterView.js"],"sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nrequire(\"./pie/PieSeries\");\n\nrequire(\"./pie/PieView\");\n\nvar createDataSelectAction = require(\"../action/createDataSelectAction\");\n\nvar dataColor = require(\"../visual/dataColor\");\n\nvar pieLayout = require(\"./pie/pieLayout\");\n\nvar dataFilter = require(\"../processor/dataFilter\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\ncreateDataSelectAction('pie', [{\n type: 'pieToggleSelect',\n event: 'pieselectchanged',\n method: 'toggleSelected'\n}, {\n type: 'pieSelect',\n event: 'pieselected',\n method: 'select'\n}, {\n type: 'pieUnSelect',\n event: 'pieunselected',\n method: 'unSelect'\n}]);\necharts.registerVisual(dataColor('pie'));\necharts.registerLayout(zrUtil.curry(pieLayout, 'pie'));\necharts.registerProcessor(dataFilter('pie'));","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// FIXME emphasis label position is not same with normal label position\nvar RADIAN = Math.PI / 180;\n\nfunction adjustSingleSide(list, cx, cy, r, dir, viewWidth, viewHeight, viewLeft, viewTop, farthestX) {\n list.sort(function (a, b) {\n return a.y - b.y;\n });\n\n function shiftDown(start, end, delta, dir) {\n for (var j = start; j < end; j++) {\n if (list[j].y + delta > viewTop + viewHeight) {\n break;\n }\n\n list[j].y += delta;\n\n if (j > start && j + 1 < end && list[j + 1].y > list[j].y + list[j].height) {\n shiftUp(j, delta / 2);\n return;\n }\n }\n\n shiftUp(end - 1, delta / 2);\n }\n\n function shiftUp(end, delta) {\n for (var j = end; j >= 0; j--) {\n if (list[j].y - delta < viewTop) {\n break;\n }\n\n list[j].y -= delta;\n\n if (j > 0 && list[j].y > list[j - 1].y + list[j - 1].height) {\n break;\n }\n }\n }\n\n function changeX(list, isDownList, cx, cy, r, dir) {\n var lastDeltaX = dir > 0 ? isDownList // right-side\n ? Number.MAX_VALUE // down\n : 0 // up\n : isDownList // left-side\n ? Number.MAX_VALUE // down\n : 0; // up\n\n for (var i = 0, l = list.length; i < l; i++) {\n if (list[i].labelAlignTo !== 'none') {\n continue;\n }\n\n var deltaY = Math.abs(list[i].y - cy);\n var length = list[i].len;\n var length2 = list[i].len2;\n var deltaX = deltaY < r + length ? Math.sqrt((r + length + length2) * (r + length + length2) - deltaY * deltaY) : Math.abs(list[i].x - cx);\n\n if (isDownList && deltaX >= lastDeltaX) {\n // right-down, left-down\n deltaX = lastDeltaX - 10;\n }\n\n if (!isDownList && deltaX <= lastDeltaX) {\n // right-up, left-up\n deltaX = lastDeltaX + 10;\n }\n\n list[i].x = cx + deltaX * dir;\n lastDeltaX = deltaX;\n }\n }\n\n var lastY = 0;\n var delta;\n var len = list.length;\n var upList = [];\n var downList = [];\n\n for (var i = 0; i < len; i++) {\n if (list[i].position === 'outer' && list[i].labelAlignTo === 'labelLine') {\n var dx = list[i].x - farthestX;\n list[i].linePoints[1][0] += dx;\n list[i].x = farthestX;\n }\n\n delta = list[i].y - lastY;\n\n if (delta < 0) {\n shiftDown(i, len, -delta, dir);\n }\n\n lastY = list[i].y + list[i].height;\n }\n\n if (viewHeight - lastY < 0) {\n shiftUp(len - 1, lastY - viewHeight);\n }\n\n for (var i = 0; i < len; i++) {\n if (list[i].y >= cy) {\n downList.push(list[i]);\n } else {\n upList.push(list[i]);\n }\n }\n\n changeX(upList, false, cx, cy, r, dir);\n changeX(downList, true, cx, cy, r, dir);\n}\n\nfunction avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop) {\n var leftList = [];\n var rightList = [];\n var leftmostX = Number.MAX_VALUE;\n var rightmostX = -Number.MAX_VALUE;\n\n for (var i = 0; i < labelLayoutList.length; i++) {\n if (isPositionCenter(labelLayoutList[i])) {\n continue;\n }\n\n if (labelLayoutList[i].x < cx) {\n leftmostX = Math.min(leftmostX, labelLayoutList[i].x);\n leftList.push(labelLayoutList[i]);\n } else {\n rightmostX = Math.max(rightmostX, labelLayoutList[i].x);\n rightList.push(labelLayoutList[i]);\n }\n }\n\n adjustSingleSide(rightList, cx, cy, r, 1, viewWidth, viewHeight, viewLeft, viewTop, rightmostX);\n adjustSingleSide(leftList, cx, cy, r, -1, viewWidth, viewHeight, viewLeft, viewTop, leftmostX);\n\n for (var i = 0; i < labelLayoutList.length; i++) {\n var layout = labelLayoutList[i];\n\n if (isPositionCenter(layout)) {\n continue;\n }\n\n var linePoints = layout.linePoints;\n\n if (linePoints) {\n var isAlignToEdge = layout.labelAlignTo === 'edge';\n var realTextWidth = layout.textRect.width;\n var targetTextWidth;\n\n if (isAlignToEdge) {\n if (layout.x < cx) {\n targetTextWidth = linePoints[2][0] - layout.labelDistance - viewLeft - layout.labelMargin;\n } else {\n targetTextWidth = viewLeft + viewWidth - layout.labelMargin - linePoints[2][0] - layout.labelDistance;\n }\n } else {\n if (layout.x < cx) {\n targetTextWidth = layout.x - viewLeft - layout.bleedMargin;\n } else {\n targetTextWidth = viewLeft + viewWidth - layout.x - layout.bleedMargin;\n }\n }\n\n if (targetTextWidth < layout.textRect.width) {\n layout.text = textContain.truncateText(layout.text, targetTextWidth, layout.font);\n\n if (layout.labelAlignTo === 'edge') {\n realTextWidth = textContain.getWidth(layout.text, layout.font);\n }\n }\n\n var dist = linePoints[1][0] - linePoints[2][0];\n\n if (isAlignToEdge) {\n if (layout.x < cx) {\n linePoints[2][0] = viewLeft + layout.labelMargin + realTextWidth + layout.labelDistance;\n } else {\n linePoints[2][0] = viewLeft + viewWidth - layout.labelMargin - realTextWidth - layout.labelDistance;\n }\n } else {\n if (layout.x < cx) {\n linePoints[2][0] = layout.x + layout.labelDistance;\n } else {\n linePoints[2][0] = layout.x - layout.labelDistance;\n }\n\n linePoints[1][0] = linePoints[2][0] + dist;\n }\n\n linePoints[1][1] = linePoints[2][1] = layout.y;\n }\n }\n}\n\nfunction isPositionCenter(layout) {\n // Not change x for center label\n return layout.position === 'center';\n}\n\nfunction _default(seriesModel, r, viewWidth, viewHeight, viewLeft, viewTop) {\n var data = seriesModel.getData();\n var labelLayoutList = [];\n var cx;\n var cy;\n var hasLabelRotate = false;\n var minShowLabelRadian = (seriesModel.get('minShowLabelAngle') || 0) * RADIAN;\n data.each(function (idx) {\n var layout = data.getItemLayout(idx);\n var itemModel = data.getItemModel(idx);\n var labelModel = itemModel.getModel('label'); // Use position in normal or emphasis\n\n var labelPosition = labelModel.get('position') || itemModel.get('emphasis.label.position');\n var labelDistance = labelModel.get('distanceToLabelLine');\n var labelAlignTo = labelModel.get('alignTo');\n var labelMargin = parsePercent(labelModel.get('margin'), viewWidth);\n var bleedMargin = labelModel.get('bleedMargin');\n var font = labelModel.getFont();\n var labelLineModel = itemModel.getModel('labelLine');\n var labelLineLen = labelLineModel.get('length');\n labelLineLen = parsePercent(labelLineLen, viewWidth);\n var labelLineLen2 = labelLineModel.get('length2');\n labelLineLen2 = parsePercent(labelLineLen2, viewWidth);\n\n if (layout.angle < minShowLabelRadian) {\n return;\n }\n\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n var dx = Math.cos(midAngle);\n var dy = Math.sin(midAngle);\n var textX;\n var textY;\n var linePoints;\n var textAlign;\n cx = layout.cx;\n cy = layout.cy;\n var text = seriesModel.getFormattedLabel(idx, 'normal') || data.getName(idx);\n var textRect = textContain.getBoundingRect(text, font, textAlign, 'top');\n var isLabelInside = labelPosition === 'inside' || labelPosition === 'inner';\n\n if (labelPosition === 'center') {\n textX = layout.cx;\n textY = layout.cy;\n textAlign = 'center';\n } else {\n var x1 = (isLabelInside ? (layout.r + layout.r0) / 2 * dx : layout.r * dx) + cx;\n var y1 = (isLabelInside ? (layout.r + layout.r0) / 2 * dy : layout.r * dy) + cy;\n textX = x1 + dx * 3;\n textY = y1 + dy * 3;\n\n if (!isLabelInside) {\n // For roseType\n var x2 = x1 + dx * (labelLineLen + r - layout.r);\n var y2 = y1 + dy * (labelLineLen + r - layout.r);\n var x3 = x2 + (dx < 0 ? -1 : 1) * labelLineLen2;\n var y3 = y2;\n\n if (labelAlignTo === 'edge') {\n // Adjust textX because text align of edge is opposite\n textX = dx < 0 ? viewLeft + labelMargin : viewLeft + viewWidth - labelMargin;\n } else {\n textX = x3 + (dx < 0 ? -labelDistance : labelDistance);\n }\n\n textY = y3;\n linePoints = [[x1, y1], [x2, y2], [x3, y3]];\n }\n\n textAlign = isLabelInside ? 'center' : labelAlignTo === 'edge' ? dx > 0 ? 'right' : 'left' : dx > 0 ? 'left' : 'right';\n }\n\n var labelRotate;\n var rotate = labelModel.get('rotate');\n\n if (typeof rotate === 'number') {\n labelRotate = rotate * (Math.PI / 180);\n } else {\n labelRotate = rotate ? dx < 0 ? -midAngle + Math.PI : -midAngle : 0;\n }\n\n hasLabelRotate = !!labelRotate;\n layout.label = {\n x: textX,\n y: textY,\n position: labelPosition,\n height: textRect.height,\n len: labelLineLen,\n len2: labelLineLen2,\n linePoints: linePoints,\n textAlign: textAlign,\n verticalAlign: 'middle',\n rotation: labelRotate,\n inside: isLabelInside,\n labelDistance: labelDistance,\n labelAlignTo: labelAlignTo,\n labelMargin: labelMargin,\n bleedMargin: bleedMargin,\n textRect: textRect,\n text: text,\n font: font\n }; // Not layout the inside label\n\n if (!isLabelInside) {\n labelLayoutList.push(layout.label);\n }\n });\n\n if (!hasLabelRotate && seriesModel.get('avoidLabelOverlap')) {\n avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop);\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\nvar linearMap = _number.linearMap;\n\nvar layout = require(\"../../util/layout\");\n\nvar labelLayout = require(\"./labelLayout\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\n\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n\nfunction _default(seriesType, ecModel, api, payload) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var viewRect = getViewRect(seriesModel, api);\n var center = seriesModel.get('center');\n var radius = seriesModel.get('radius');\n\n if (!zrUtil.isArray(radius)) {\n radius = [0, radius];\n }\n\n if (!zrUtil.isArray(center)) {\n center = [center, center];\n }\n\n var width = parsePercent(viewRect.width, api.getWidth());\n var height = parsePercent(viewRect.height, api.getHeight());\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], width) + viewRect.x;\n var cy = parsePercent(center[1], height) + viewRect.y;\n var r0 = parsePercent(radius[0], size / 2);\n var r = parsePercent(radius[1], size / 2);\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n var validDataCount = 0;\n data.each(valueDim, function (value) {\n !isNaN(value) && validDataCount++;\n });\n var sum = data.getSum(valueDim); // Sum may be 0\n\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n var clockwise = seriesModel.get('clockwise');\n var roseType = seriesModel.get('roseType');\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // [0...max]\n\n var extent = data.getDataExtent(valueDim);\n extent[0] = 0; // In the case some sector angle is smaller than minAngle\n\n var restAngle = PI2;\n var valueSumLargerThanMinAngle = 0;\n var currentAngle = startAngle;\n var dir = clockwise ? 1 : -1;\n data.each(valueDim, function (value, idx) {\n var angle;\n\n if (isNaN(value)) {\n data.setItemLayout(idx, {\n angle: NaN,\n startAngle: NaN,\n endAngle: NaN,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? NaN : r,\n viewRect: viewRect\n });\n return;\n } // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样?\n\n\n if (roseType !== 'area') {\n angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian;\n } else {\n angle = PI2 / validDataCount;\n }\n\n if (angle < minAngle) {\n angle = minAngle;\n restAngle -= minAngle;\n } else {\n valueSumLargerThanMinAngle += value;\n }\n\n var endAngle = currentAngle + dir * angle;\n data.setItemLayout(idx, {\n angle: angle,\n startAngle: currentAngle,\n endAngle: endAngle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? linearMap(value, extent, [r0, r]) : r,\n viewRect: viewRect\n });\n currentAngle = endAngle;\n }); // Some sector is constrained by minAngle\n // Rest sectors needs recalculate angle\n\n if (restAngle < PI2 && validDataCount) {\n // Average the angle if rest angle is not enough after all angles is\n // Constrained by minAngle\n if (restAngle <= 1e-3) {\n var angle = PI2 / validDataCount;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout = data.getItemLayout(idx);\n layout.angle = angle;\n layout.startAngle = startAngle + dir * idx * angle;\n layout.endAngle = startAngle + dir * (idx + 1) * angle;\n }\n });\n } else {\n unitRadian = restAngle / valueSumLargerThanMinAngle;\n currentAngle = startAngle;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout = data.getItemLayout(idx);\n var angle = layout.angle === minAngle ? minAngle : value * unitRadian;\n layout.startAngle = currentAngle;\n layout.endAngle = currentAngle + dir * angle;\n currentAngle += dir * angle;\n }\n });\n }\n }\n\n labelLayout(seriesModel, r, viewRect.width, viewRect.height, viewRect.x, viewRect.y);\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"../component/radar\");\n\nrequire(\"./radar/RadarSeries\");\n\nrequire(\"./radar/RadarView\");\n\nvar dataColor = require(\"../visual/dataColor\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar radarLayout = require(\"./radar/radarLayout\");\n\nvar dataFilter = require(\"../processor/dataFilter\");\n\nvar backwardCompat = require(\"./radar/backwardCompat\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Must use radar component\necharts.registerVisual(dataColor('radar'));\necharts.registerVisual(visualSymbol('radar', 'circle'));\necharts.registerLayout(radarLayout);\necharts.registerProcessor(dataFilter('radar'));\necharts.registerPreprocessor(backwardCompat);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar createListSimply = require(\"../helper/createListSimply\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\n\nvar LegendVisualProvider = require(\"../../visual/LegendVisualProvider\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar RadarSeries = SeriesModel.extend({\n type: 'series.radar',\n dependencies: ['radar'],\n // Overwrite\n init: function (option) {\n RadarSeries.superApply(this, 'init', arguments); // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n },\n getInitialData: function (option, ecModel) {\n return createListSimply(this, {\n generateCoord: 'indicator_',\n generateCoordCount: Infinity\n });\n },\n formatTooltip: function (dataIndex) {\n var data = this.getData();\n var coordSys = this.coordinateSystem;\n var indicatorAxes = coordSys.getIndicatorAxes();\n var name = this.getData().getName(dataIndex);\n return encodeHTML(name === '' ? this.name : name) + '<br/>' + zrUtil.map(indicatorAxes, function (axis, idx) {\n var val = data.get(data.mapDimension(axis.dim), dataIndex);\n return encodeHTML(axis.name + ' : ' + val);\n }).join('<br />');\n },\n\n /**\n * @implement\n */\n getTooltipPosition: function (dataIndex) {\n if (dataIndex != null) {\n var data = this.getData();\n var coordSys = this.coordinateSystem;\n var values = data.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex, true);\n\n for (var i = 0, len = values.length; i < len; i++) {\n if (!isNaN(values[i])) {\n var indicatorAxes = coordSys.getIndicatorAxes();\n return coordSys.coordToPoint(indicatorAxes[i].dataToCoord(values[i]), i);\n }\n }\n }\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'radar',\n legendHoverLink: true,\n radarIndex: 0,\n lineStyle: {\n width: 2,\n type: 'solid'\n },\n label: {\n position: 'top'\n },\n // areaStyle: {\n // },\n // itemStyle: {}\n symbol: 'emptyCircle',\n symbolSize: 4 // symbolRotate: null\n\n }\n});\nvar _default = RadarSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar symbolUtil = require(\"../../util/symbol\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction normalizeSymbolSize(symbolSize) {\n if (!zrUtil.isArray(symbolSize)) {\n symbolSize = [+symbolSize, +symbolSize];\n }\n\n return symbolSize;\n}\n\nvar _default = echarts.extendChartView({\n type: 'radar',\n render: function (seriesModel, ecModel, api) {\n var polar = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n\n function createSymbol(data, idx) {\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var color = data.getItemVisual(idx, 'color');\n\n if (symbolType === 'none') {\n return;\n }\n\n var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n var symbolPath = symbolUtil.createSymbol(symbolType, -1, -1, 2, 2, color);\n symbolPath.attr({\n style: {\n strokeNoScale: true\n },\n z2: 100,\n scale: [symbolSize[0] / 2, symbolSize[1] / 2]\n });\n return symbolPath;\n }\n\n function updateSymbols(oldPoints, newPoints, symbolGroup, data, idx, isInit) {\n // Simply rerender all\n symbolGroup.removeAll();\n\n for (var i = 0; i < newPoints.length - 1; i++) {\n var symbolPath = createSymbol(data, idx);\n\n if (symbolPath) {\n symbolPath.__dimIdx = i;\n\n if (oldPoints[i]) {\n symbolPath.attr('position', oldPoints[i]);\n graphic[isInit ? 'initProps' : 'updateProps'](symbolPath, {\n position: newPoints[i]\n }, seriesModel, idx);\n } else {\n symbolPath.attr('position', newPoints[i]);\n }\n\n symbolGroup.add(symbolPath);\n }\n }\n }\n\n function getInitialPoints(points) {\n return zrUtil.map(points, function (pt) {\n return [polar.cx, polar.cy];\n });\n }\n\n data.diff(oldData).add(function (idx) {\n var points = data.getItemLayout(idx);\n\n if (!points) {\n return;\n }\n\n var polygon = new graphic.Polygon();\n var polyline = new graphic.Polyline();\n var target = {\n shape: {\n points: points\n }\n };\n polygon.shape.points = getInitialPoints(points);\n polyline.shape.points = getInitialPoints(points);\n graphic.initProps(polygon, target, seriesModel, idx);\n graphic.initProps(polyline, target, seriesModel, idx);\n var itemGroup = new graphic.Group();\n var symbolGroup = new graphic.Group();\n itemGroup.add(polyline);\n itemGroup.add(polygon);\n itemGroup.add(symbolGroup);\n updateSymbols(polyline.shape.points, points, symbolGroup, data, idx, true);\n data.setItemGraphicEl(idx, itemGroup);\n }).update(function (newIdx, oldIdx) {\n var itemGroup = oldData.getItemGraphicEl(oldIdx);\n var polyline = itemGroup.childAt(0);\n var polygon = itemGroup.childAt(1);\n var symbolGroup = itemGroup.childAt(2);\n var target = {\n shape: {\n points: data.getItemLayout(newIdx)\n }\n };\n\n if (!target.shape.points) {\n return;\n }\n\n updateSymbols(polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false);\n graphic.updateProps(polyline, target, seriesModel);\n graphic.updateProps(polygon, target, seriesModel);\n data.setItemGraphicEl(newIdx, itemGroup);\n }).remove(function (idx) {\n group.remove(oldData.getItemGraphicEl(idx));\n }).execute();\n data.eachItemGraphicEl(function (itemGroup, idx) {\n var itemModel = data.getItemModel(idx);\n var polyline = itemGroup.childAt(0);\n var polygon = itemGroup.childAt(1);\n var symbolGroup = itemGroup.childAt(2);\n var color = data.getItemVisual(idx, 'color');\n group.add(itemGroup);\n polyline.useStyle(zrUtil.defaults(itemModel.getModel('lineStyle').getLineStyle(), {\n fill: 'none',\n stroke: color\n }));\n polyline.hoverStyle = itemModel.getModel('emphasis.lineStyle').getLineStyle();\n var areaStyleModel = itemModel.getModel('areaStyle');\n var hoverAreaStyleModel = itemModel.getModel('emphasis.areaStyle');\n var polygonIgnore = areaStyleModel.isEmpty() && areaStyleModel.parentModel.isEmpty();\n var hoverPolygonIgnore = hoverAreaStyleModel.isEmpty() && hoverAreaStyleModel.parentModel.isEmpty();\n hoverPolygonIgnore = hoverPolygonIgnore && polygonIgnore;\n polygon.ignore = polygonIgnore;\n polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), {\n fill: color,\n opacity: 0.7\n }));\n polygon.hoverStyle = hoverAreaStyleModel.getAreaStyle();\n var itemStyle = itemModel.getModel('itemStyle').getItemStyle(['color']);\n var itemHoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n var labelModel = itemModel.getModel('label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n symbolGroup.eachChild(function (symbolPath) {\n symbolPath.setStyle(itemStyle);\n symbolPath.hoverStyle = zrUtil.clone(itemHoverStyle);\n var defaultText = data.get(data.dimensions[symbolPath.__dimIdx], idx);\n (defaultText == null || isNaN(defaultText)) && (defaultText = '');\n graphic.setLabelStyle(symbolPath.style, symbolPath.hoverStyle, labelModel, labelHoverModel, {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n labelDimIndex: symbolPath.__dimIdx,\n defaultText: defaultText,\n autoColor: color,\n isRectText: true\n });\n });\n\n itemGroup.highDownOnUpdate = function (fromState, toState) {\n polygon.attr('ignore', toState === 'emphasis' ? hoverPolygonIgnore : polygonIgnore);\n };\n\n graphic.setHoverStyle(itemGroup);\n });\n this._data = data;\n },\n remove: function () {\n this.group.removeAll();\n this._data = null;\n },\n dispose: function () {}\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Backward compat for radar chart in 2\nfunction _default(option) {\n var polarOptArr = option.polar;\n\n if (polarOptArr) {\n if (!zrUtil.isArray(polarOptArr)) {\n polarOptArr = [polarOptArr];\n }\n\n var polarNotRadar = [];\n zrUtil.each(polarOptArr, function (polarOpt, idx) {\n if (polarOpt.indicator) {\n if (polarOpt.type && !polarOpt.shape) {\n polarOpt.shape = polarOpt.type;\n }\n\n option.radar = option.radar || [];\n\n if (!zrUtil.isArray(option.radar)) {\n option.radar = [option.radar];\n }\n\n option.radar.push(polarOpt);\n } else {\n polarNotRadar.push(polarOpt);\n }\n });\n option.polar = polarNotRadar;\n }\n\n zrUtil.each(option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'radar' && seriesOpt.polarIndex) {\n seriesOpt.radarIndex = seriesOpt.polarIndex;\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n ecModel.eachSeriesByType('radar', function (seriesModel) {\n var data = seriesModel.getData();\n var points = [];\n var coordSys = seriesModel.coordinateSystem;\n\n if (!coordSys) {\n return;\n }\n\n var axes = coordSys.getIndicatorAxes();\n zrUtil.each(axes, function (axis, axisIndex) {\n data.each(data.mapDimension(axes[axisIndex].dim), function (val, dataIndex) {\n points[dataIndex] = points[dataIndex] || [];\n var point = coordSys.dataToPoint(val, axisIndex);\n points[dataIndex][axisIndex] = isValidPoint(point) ? point : getValueMissingPoint(coordSys);\n });\n }); // Close polygon\n\n data.each(function (idx) {\n // TODO\n // Is it appropriate to connect to the next data when some data is missing?\n // Or, should trade it like `connectNull` in line chart?\n var firstPoint = zrUtil.find(points[idx], function (point) {\n return isValidPoint(point);\n }) || getValueMissingPoint(coordSys); // Copy the first actual point to the end of the array\n\n points[idx].push(firstPoint.slice());\n data.setItemLayout(idx, points[idx]);\n });\n });\n}\n\nfunction isValidPoint(point) {\n return !isNaN(point[0]) && !isNaN(point[1]);\n}\n\nfunction getValueMissingPoint(coordSys) {\n // It is error-prone to input [NaN, NaN] into polygon, polygon.\n // (probably cause problem when refreshing or animating)\n return [coordSys.cx, coordSys.cy];\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./sankey/SankeySeries\");\n\nrequire(\"./sankey/SankeyView\");\n\nrequire(\"./sankey/sankeyAction\");\n\nvar sankeyLayout = require(\"./sankey/sankeyLayout\");\n\nvar sankeyVisual = require(\"./sankey/sankeyVisual\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerLayout(sankeyLayout);\necharts.registerVisual(sankeyVisual);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar createGraphFromNodeEdge = require(\"../helper/createGraphFromNodeEdge\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\n\nvar Model = require(\"../../model/Model\");\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar SankeySeries = SeriesModel.extend({\n type: 'series.sankey',\n layoutInfo: null,\n levelModels: null,\n\n /**\n * Init a graph data structure from data in option series\n *\n * @param {Object} option the object used to config echarts view\n * @return {module:echarts/data/List} storage initial data\n */\n getInitialData: function (option, ecModel) {\n var links = option.edges || option.links;\n var nodes = option.data || option.nodes;\n var levels = option.levels;\n var levelModels = this.levelModels = {};\n\n for (var i = 0; i < levels.length; i++) {\n if (levels[i].depth != null && levels[i].depth >= 0) {\n levelModels[levels[i].depth] = new Model(levels[i], this, ecModel);\n } else {}\n }\n\n if (nodes && links) {\n var graph = createGraphFromNodeEdge(nodes, links, this, true, beforeLink);\n return graph.data;\n }\n\n function beforeLink(nodeData, edgeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n model.customizeGetParent(function (path) {\n var parentModel = this.parentModel;\n var nodeDepth = parentModel.getData().getItemLayout(idx).depth;\n var levelModel = parentModel.levelModels[nodeDepth];\n return levelModel || this.parentModel;\n });\n return model;\n });\n edgeData.wrapMethod('getItemModel', function (model, idx) {\n model.customizeGetParent(function (path) {\n var parentModel = this.parentModel;\n var edge = parentModel.getGraph().getEdgeByIndex(idx);\n var depth = edge.node1.getLayout().depth;\n var levelModel = parentModel.levelModels[depth];\n return levelModel || this.parentModel;\n });\n return model;\n });\n }\n },\n setNodePosition: function (dataIndex, localPosition) {\n var dataItem = this.option.data[dataIndex];\n dataItem.localX = localPosition[0];\n dataItem.localY = localPosition[1];\n },\n\n /**\n * Return the graphic data structure\n *\n * @return {module:echarts/data/Graph} graphic data structure\n */\n getGraph: function () {\n return this.getData().graph;\n },\n\n /**\n * Get edge data of graphic data structure\n *\n * @return {module:echarts/data/List} data structure of list\n */\n getEdgeData: function () {\n return this.getGraph().edgeData;\n },\n\n /**\n * @override\n */\n formatTooltip: function (dataIndex, multipleSeries, dataType) {\n // dataType === 'node' or empty do not show tooltip by default\n if (dataType === 'edge') {\n var params = this.getDataParams(dataIndex, dataType);\n var rawDataOpt = params.data;\n var html = rawDataOpt.source + ' -- ' + rawDataOpt.target;\n\n if (params.value) {\n html += ' : ' + params.value;\n }\n\n return encodeHTML(html);\n } else if (dataType === 'node') {\n var node = this.getGraph().getNodeByIndex(dataIndex);\n var value = node.getLayout().value;\n var name = this.getDataParams(dataIndex, dataType).data.name;\n\n if (value) {\n var html = name + ' : ' + value;\n }\n\n return encodeHTML(html);\n }\n\n return SankeySeries.superCall(this, 'formatTooltip', dataIndex, multipleSeries);\n },\n optionUpdated: function () {\n var option = this.option;\n\n if (option.focusNodeAdjacency === true) {\n option.focusNodeAdjacency = 'allEdges';\n }\n },\n // Override Series.getDataParams()\n getDataParams: function (dataIndex, dataType) {\n var params = SankeySeries.superCall(this, 'getDataParams', dataIndex, dataType);\n\n if (params.value == null && dataType === 'node') {\n var node = this.getGraph().getNodeByIndex(dataIndex);\n var nodeValue = node.getLayout().value;\n params.value = nodeValue;\n }\n\n return params;\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n layout: null,\n // The position of the whole view\n left: '5%',\n top: '5%',\n right: '20%',\n bottom: '5%',\n // Value can be 'vertical'\n orient: 'horizontal',\n // The dx of the node\n nodeWidth: 20,\n // The vertical distance between two nodes\n nodeGap: 8,\n // Control if the node can move or not\n draggable: true,\n // Value can be 'inEdges', 'outEdges', 'allEdges', true (the same as 'allEdges').\n focusNodeAdjacency: false,\n // The number of iterations to change the position of the node\n layoutIterations: 32,\n label: {\n show: true,\n position: 'right',\n color: '#000',\n fontSize: 12\n },\n levels: [],\n // Value can be 'left' or 'right'\n nodeAlign: 'justify',\n itemStyle: {\n borderWidth: 1,\n borderColor: '#333'\n },\n lineStyle: {\n color: '#314656',\n opacity: 0.2,\n curveness: 0.5\n },\n emphasis: {\n label: {\n show: true\n },\n lineStyle: {\n opacity: 0.5\n }\n },\n animationEasing: 'linear',\n animationDuration: 1000\n }\n});\nvar _default = SankeySeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar nodeOpacityPath = ['itemStyle', 'opacity'];\nvar hoverNodeOpacityPath = ['emphasis', 'itemStyle', 'opacity'];\nvar lineOpacityPath = ['lineStyle', 'opacity'];\nvar hoverLineOpacityPath = ['emphasis', 'lineStyle', 'opacity'];\n\nfunction getItemOpacity(item, opacityPath) {\n return item.getVisual('opacity') || item.getModel().get(opacityPath);\n}\n\nfunction fadeOutItem(item, opacityPath, opacityRatio) {\n var el = item.getGraphicEl();\n var opacity = getItemOpacity(item, opacityPath);\n\n if (opacityRatio != null) {\n opacity == null && (opacity = 1);\n opacity *= opacityRatio;\n }\n\n el.downplay && el.downplay();\n el.traverse(function (child) {\n if (child.type !== 'group') {\n child.setStyle('opacity', opacity);\n }\n });\n}\n\nfunction fadeInItem(item, opacityPath) {\n var opacity = getItemOpacity(item, opacityPath);\n var el = item.getGraphicEl();\n el.traverse(function (child) {\n if (child.type !== 'group') {\n child.setStyle('opacity', opacity);\n }\n }); // Support emphasis here.\n\n el.highlight && el.highlight();\n}\n\nvar SankeyShape = graphic.extendShape({\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0,\n cpx1: 0,\n cpy1: 0,\n cpx2: 0,\n cpy2: 0,\n extent: 0,\n orient: ''\n },\n buildPath: function (ctx, shape) {\n var extent = shape.extent;\n ctx.moveTo(shape.x1, shape.y1);\n ctx.bezierCurveTo(shape.cpx1, shape.cpy1, shape.cpx2, shape.cpy2, shape.x2, shape.y2);\n\n if (shape.orient === 'vertical') {\n ctx.lineTo(shape.x2 + extent, shape.y2);\n ctx.bezierCurveTo(shape.cpx2 + extent, shape.cpy2, shape.cpx1 + extent, shape.cpy1, shape.x1 + extent, shape.y1);\n } else {\n ctx.lineTo(shape.x2, shape.y2 + extent);\n ctx.bezierCurveTo(shape.cpx2, shape.cpy2 + extent, shape.cpx1, shape.cpy1 + extent, shape.x1, shape.y1 + extent);\n }\n\n ctx.closePath();\n },\n highlight: function () {\n this.trigger('emphasis');\n },\n downplay: function () {\n this.trigger('normal');\n }\n});\n\nvar _default = echarts.extendChartView({\n type: 'sankey',\n\n /**\n * @private\n * @type {module:echarts/chart/sankey/SankeySeries}\n */\n _model: null,\n\n /**\n * @private\n * @type {boolean}\n */\n _focusAdjacencyDisabled: false,\n render: function (seriesModel, ecModel, api) {\n var sankeyView = this;\n var graph = seriesModel.getGraph();\n var group = this.group;\n var layoutInfo = seriesModel.layoutInfo; // view width\n\n var width = layoutInfo.width; // view height\n\n var height = layoutInfo.height;\n var nodeData = seriesModel.getData();\n var edgeData = seriesModel.getData('edge');\n var orient = seriesModel.get('orient');\n this._model = seriesModel;\n group.removeAll();\n group.attr('position', [layoutInfo.x, layoutInfo.y]); // generate a bezire Curve for each edge\n\n graph.eachEdge(function (edge) {\n var curve = new SankeyShape();\n curve.dataIndex = edge.dataIndex;\n curve.seriesIndex = seriesModel.seriesIndex;\n curve.dataType = 'edge';\n var lineStyleModel = edge.getModel('lineStyle');\n var curvature = lineStyleModel.get('curveness');\n var n1Layout = edge.node1.getLayout();\n var node1Model = edge.node1.getModel();\n var dragX1 = node1Model.get('localX');\n var dragY1 = node1Model.get('localY');\n var n2Layout = edge.node2.getLayout();\n var node2Model = edge.node2.getModel();\n var dragX2 = node2Model.get('localX');\n var dragY2 = node2Model.get('localY');\n var edgeLayout = edge.getLayout();\n var x1;\n var y1;\n var x2;\n var y2;\n var cpx1;\n var cpy1;\n var cpx2;\n var cpy2;\n curve.shape.extent = Math.max(1, edgeLayout.dy);\n curve.shape.orient = orient;\n\n if (orient === 'vertical') {\n x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + edgeLayout.sy;\n y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + n1Layout.dy;\n x2 = (dragX2 != null ? dragX2 * width : n2Layout.x) + edgeLayout.ty;\n y2 = dragY2 != null ? dragY2 * height : n2Layout.y;\n cpx1 = x1;\n cpy1 = y1 * (1 - curvature) + y2 * curvature;\n cpx2 = x2;\n cpy2 = y1 * curvature + y2 * (1 - curvature);\n } else {\n x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + n1Layout.dx;\n y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + edgeLayout.sy;\n x2 = dragX2 != null ? dragX2 * width : n2Layout.x;\n y2 = (dragY2 != null ? dragY2 * height : n2Layout.y) + edgeLayout.ty;\n cpx1 = x1 * (1 - curvature) + x2 * curvature;\n cpy1 = y1;\n cpx2 = x1 * curvature + x2 * (1 - curvature);\n cpy2 = y2;\n }\n\n curve.setShape({\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2,\n cpx1: cpx1,\n cpy1: cpy1,\n cpx2: cpx2,\n cpy2: cpy2\n });\n curve.setStyle(lineStyleModel.getItemStyle()); // Special color, use source node color or target node color\n\n switch (curve.style.fill) {\n case 'source':\n curve.style.fill = edge.node1.getVisual('color');\n break;\n\n case 'target':\n curve.style.fill = edge.node2.getVisual('color');\n break;\n }\n\n graphic.setHoverStyle(curve, edge.getModel('emphasis.lineStyle').getItemStyle());\n group.add(curve);\n edgeData.setItemGraphicEl(edge.dataIndex, curve);\n }); // Generate a rect for each node\n\n graph.eachNode(function (node) {\n var layout = node.getLayout();\n var itemModel = node.getModel();\n var dragX = itemModel.get('localX');\n var dragY = itemModel.get('localY');\n var labelModel = itemModel.getModel('label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n var rect = new graphic.Rect({\n shape: {\n x: dragX != null ? dragX * width : layout.x,\n y: dragY != null ? dragY * height : layout.y,\n width: layout.dx,\n height: layout.dy\n },\n style: itemModel.getModel('itemStyle').getItemStyle()\n });\n var hoverStyle = node.getModel('emphasis.itemStyle').getItemStyle();\n graphic.setLabelStyle(rect.style, hoverStyle, labelModel, labelHoverModel, {\n labelFetcher: seriesModel,\n labelDataIndex: node.dataIndex,\n defaultText: node.id,\n isRectText: true\n });\n rect.setStyle('fill', node.getVisual('color'));\n graphic.setHoverStyle(rect, hoverStyle);\n group.add(rect);\n nodeData.setItemGraphicEl(node.dataIndex, rect);\n rect.dataType = 'node';\n });\n nodeData.eachItemGraphicEl(function (el, dataIndex) {\n var itemModel = nodeData.getItemModel(dataIndex);\n\n if (itemModel.get('draggable')) {\n el.drift = function (dx, dy) {\n sankeyView._focusAdjacencyDisabled = true;\n this.shape.x += dx;\n this.shape.y += dy;\n this.dirty();\n api.dispatchAction({\n type: 'dragNode',\n seriesId: seriesModel.id,\n dataIndex: nodeData.getRawIndex(dataIndex),\n localX: this.shape.x / width,\n localY: this.shape.y / height\n });\n };\n\n el.ondragend = function () {\n sankeyView._focusAdjacencyDisabled = false;\n };\n\n el.draggable = true;\n el.cursor = 'move';\n }\n\n el.highlight = function () {\n this.trigger('emphasis');\n };\n\n el.downplay = function () {\n this.trigger('normal');\n };\n\n el.focusNodeAdjHandler && el.off('mouseover', el.focusNodeAdjHandler);\n el.unfocusNodeAdjHandler && el.off('mouseout', el.unfocusNodeAdjHandler);\n\n if (itemModel.get('focusNodeAdjacency')) {\n el.on('mouseover', el.focusNodeAdjHandler = function () {\n if (!sankeyView._focusAdjacencyDisabled) {\n sankeyView._clearTimer();\n\n api.dispatchAction({\n type: 'focusNodeAdjacency',\n seriesId: seriesModel.id,\n dataIndex: el.dataIndex\n });\n }\n });\n el.on('mouseout', el.unfocusNodeAdjHandler = function () {\n if (!sankeyView._focusAdjacencyDisabled) {\n sankeyView._dispatchUnfocus(api);\n }\n });\n }\n });\n edgeData.eachItemGraphicEl(function (el, dataIndex) {\n var edgeModel = edgeData.getItemModel(dataIndex);\n el.focusNodeAdjHandler && el.off('mouseover', el.focusNodeAdjHandler);\n el.unfocusNodeAdjHandler && el.off('mouseout', el.unfocusNodeAdjHandler);\n\n if (edgeModel.get('focusNodeAdjacency')) {\n el.on('mouseover', el.focusNodeAdjHandler = function () {\n if (!sankeyView._focusAdjacencyDisabled) {\n sankeyView._clearTimer();\n\n api.dispatchAction({\n type: 'focusNodeAdjacency',\n seriesId: seriesModel.id,\n edgeDataIndex: el.dataIndex\n });\n }\n });\n el.on('mouseout', el.unfocusNodeAdjHandler = function () {\n if (!sankeyView._focusAdjacencyDisabled) {\n sankeyView._dispatchUnfocus(api);\n }\n });\n }\n });\n\n if (!this._data && seriesModel.get('animation')) {\n group.setClipPath(createGridClipShape(group.getBoundingRect(), seriesModel, function () {\n group.removeClipPath();\n }));\n }\n\n this._data = seriesModel.getData();\n },\n dispose: function () {\n this._clearTimer();\n },\n _dispatchUnfocus: function (api) {\n var self = this;\n\n this._clearTimer();\n\n this._unfocusDelayTimer = setTimeout(function () {\n self._unfocusDelayTimer = null;\n api.dispatchAction({\n type: 'unfocusNodeAdjacency',\n seriesId: self._model.id\n });\n }, 500);\n },\n _clearTimer: function () {\n if (this._unfocusDelayTimer) {\n clearTimeout(this._unfocusDelayTimer);\n this._unfocusDelayTimer = null;\n }\n },\n focusNodeAdjacency: function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var graph = data.graph;\n var dataIndex = payload.dataIndex;\n var itemModel = data.getItemModel(dataIndex);\n var edgeDataIndex = payload.edgeDataIndex;\n\n if (dataIndex == null && edgeDataIndex == null) {\n return;\n }\n\n var node = graph.getNodeByIndex(dataIndex);\n var edge = graph.getEdgeByIndex(edgeDataIndex);\n graph.eachNode(function (node) {\n fadeOutItem(node, nodeOpacityPath, 0.1);\n });\n graph.eachEdge(function (edge) {\n fadeOutItem(edge, lineOpacityPath, 0.1);\n });\n\n if (node) {\n fadeInItem(node, hoverNodeOpacityPath);\n var focusNodeAdj = itemModel.get('focusNodeAdjacency');\n\n if (focusNodeAdj === 'outEdges') {\n zrUtil.each(node.outEdges, function (edge) {\n if (edge.dataIndex < 0) {\n return;\n }\n\n fadeInItem(edge, hoverLineOpacityPath);\n fadeInItem(edge.node2, hoverNodeOpacityPath);\n });\n } else if (focusNodeAdj === 'inEdges') {\n zrUtil.each(node.inEdges, function (edge) {\n if (edge.dataIndex < 0) {\n return;\n }\n\n fadeInItem(edge, hoverLineOpacityPath);\n fadeInItem(edge.node1, hoverNodeOpacityPath);\n });\n } else if (focusNodeAdj === 'allEdges') {\n zrUtil.each(node.edges, function (edge) {\n if (edge.dataIndex < 0) {\n return;\n }\n\n fadeInItem(edge, hoverLineOpacityPath);\n edge.node1 !== node && fadeInItem(edge.node1, hoverNodeOpacityPath);\n edge.node2 !== node && fadeInItem(edge.node2, hoverNodeOpacityPath);\n });\n }\n }\n\n if (edge) {\n fadeInItem(edge, hoverLineOpacityPath);\n fadeInItem(edge.node1, hoverNodeOpacityPath);\n fadeInItem(edge.node2, hoverNodeOpacityPath);\n }\n },\n unfocusNodeAdjacency: function (seriesModel, ecModel, api, payload) {\n var graph = seriesModel.getGraph();\n graph.eachNode(function (node) {\n fadeOutItem(node, nodeOpacityPath);\n });\n graph.eachEdge(function (edge) {\n fadeOutItem(edge, lineOpacityPath);\n });\n }\n}); // Add animation to the view\n\n\nfunction createGridClipShape(rect, seriesModel, cb) {\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x - 10,\n y: rect.y - 10,\n width: 0,\n height: rect.height + 20\n }\n });\n graphic.initProps(rectEl, {\n shape: {\n width: rect.width + 20\n }\n }, seriesModel, cb);\n return rectEl;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nrequire(\"../helper/focusNodeAdjacencyAction\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerAction({\n type: 'dragNode',\n event: 'dragnode',\n // here can only use 'update' now, other value is not support in echarts.\n update: 'update'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sankey',\n query: payload\n }, function (seriesModel) {\n seriesModel.setNodePosition(payload.dataIndex, [payload.localX, payload.localY]);\n });\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar layout = require(\"../../util/layout\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _model = require(\"../../util/model\");\n\nvar groupData = _model.groupData;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel, api, payload) {\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n var nodeWidth = seriesModel.get('nodeWidth');\n var nodeGap = seriesModel.get('nodeGap');\n var layoutInfo = getViewRect(seriesModel, api);\n seriesModel.layoutInfo = layoutInfo;\n var width = layoutInfo.width;\n var height = layoutInfo.height;\n var graph = seriesModel.getGraph();\n var nodes = graph.nodes;\n var edges = graph.edges;\n computeNodeValues(nodes);\n var filteredNodes = zrUtil.filter(nodes, function (node) {\n return node.getLayout().value === 0;\n });\n var iterations = filteredNodes.length !== 0 ? 0 : seriesModel.get('layoutIterations');\n var orient = seriesModel.get('orient');\n var nodeAlign = seriesModel.get('nodeAlign');\n layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign);\n });\n}\n/**\n * Get the layout position of the whole view\n *\n * @param {module:echarts/model/Series} seriesModel the model object of sankey series\n * @param {module:echarts/ExtensionAPI} api provide the API list that the developer can call\n * @return {module:zrender/core/BoundingRect} size of rect to draw the sankey view\n */\n\n\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n\nfunction layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign) {\n computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign);\n computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient);\n computeEdgeDepths(nodes, orient);\n}\n/**\n * Compute the value of each node by summing the associated edge's value\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n */\n\n\nfunction computeNodeValues(nodes) {\n zrUtil.each(nodes, function (node) {\n var value1 = sum(node.outEdges, getEdgeValue);\n var value2 = sum(node.inEdges, getEdgeValue);\n var nodeRawValue = node.getValue() || 0;\n var value = Math.max(value1, value2, nodeRawValue);\n node.setLayout({\n value: value\n }, true);\n });\n}\n/**\n * Compute the x-position for each node.\n *\n * Here we use Kahn algorithm to detect cycle when we traverse\n * the node to computer the initial x position.\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n * @param {number} nodeWidth the dx of the node\n * @param {number} width the whole width of the area to draw the view\n */\n\n\nfunction computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign) {\n // Used to mark whether the edge is deleted. if it is deleted,\n // the value is 0, otherwise it is 1.\n var remainEdges = []; // Storage each node's indegree.\n\n var indegreeArr = []; //Used to storage the node with indegree is equal to 0.\n\n var zeroIndegrees = [];\n var nextTargetNode = [];\n var x = 0;\n var kx = 0;\n\n for (var i = 0; i < edges.length; i++) {\n remainEdges[i] = 1;\n }\n\n for (i = 0; i < nodes.length; i++) {\n indegreeArr[i] = nodes[i].inEdges.length;\n\n if (indegreeArr[i] === 0) {\n zeroIndegrees.push(nodes[i]);\n }\n }\n\n var maxNodeDepth = -1; // Traversing nodes using topological sorting to calculate the\n // horizontal(if orient === 'horizontal') or vertical(if orient === 'vertical')\n // position of the nodes.\n\n while (zeroIndegrees.length) {\n for (var idx = 0; idx < zeroIndegrees.length; idx++) {\n var node = zeroIndegrees[idx];\n var item = node.hostGraph.data.getRawDataItem(node.dataIndex);\n var isItemDepth = item.depth != null && item.depth >= 0;\n\n if (isItemDepth && item.depth > maxNodeDepth) {\n maxNodeDepth = item.depth;\n }\n\n node.setLayout({\n depth: isItemDepth ? item.depth : x\n }, true);\n orient === 'vertical' ? node.setLayout({\n dy: nodeWidth\n }, true) : node.setLayout({\n dx: nodeWidth\n }, true);\n\n for (var edgeIdx = 0; edgeIdx < node.outEdges.length; edgeIdx++) {\n var edge = node.outEdges[edgeIdx];\n var indexEdge = edges.indexOf(edge);\n remainEdges[indexEdge] = 0;\n var targetNode = edge.node2;\n var nodeIndex = nodes.indexOf(targetNode);\n\n if (--indegreeArr[nodeIndex] === 0 && nextTargetNode.indexOf(targetNode) < 0) {\n nextTargetNode.push(targetNode);\n }\n }\n }\n\n ++x;\n zeroIndegrees = nextTargetNode;\n nextTargetNode = [];\n }\n\n for (i = 0; i < remainEdges.length; i++) {\n if (remainEdges[i] === 1) {\n throw new Error('Sankey is a DAG, the original data has cycle!');\n }\n }\n\n var maxDepth = maxNodeDepth > x - 1 ? maxNodeDepth : x - 1;\n\n if (nodeAlign && nodeAlign !== 'left') {\n adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth);\n }\n\n var kx = orient === 'vertical' ? (height - nodeWidth) / maxDepth : (width - nodeWidth) / maxDepth;\n scaleNodeBreadths(nodes, kx, orient);\n}\n\nfunction isNodeDepth(node) {\n var item = node.hostGraph.data.getRawDataItem(node.dataIndex);\n return item.depth != null && item.depth >= 0;\n}\n\nfunction adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth) {\n if (nodeAlign === 'right') {\n var nextSourceNode = [];\n var remainNodes = nodes;\n var nodeHeight = 0;\n\n while (remainNodes.length) {\n for (var i = 0; i < remainNodes.length; i++) {\n var node = remainNodes[i];\n node.setLayout({\n skNodeHeight: nodeHeight\n }, true);\n\n for (var j = 0; j < node.inEdges.length; j++) {\n var edge = node.inEdges[j];\n\n if (nextSourceNode.indexOf(edge.node1) < 0) {\n nextSourceNode.push(edge.node1);\n }\n }\n }\n\n remainNodes = nextSourceNode;\n nextSourceNode = [];\n ++nodeHeight;\n }\n\n zrUtil.each(nodes, function (node) {\n if (!isNodeDepth(node)) {\n node.setLayout({\n depth: Math.max(0, maxDepth - node.getLayout().skNodeHeight)\n }, true);\n }\n });\n } else if (nodeAlign === 'justify') {\n moveSinksRight(nodes, maxDepth);\n }\n}\n/**\n * All the node without outEgdes are assigned maximum x-position and\n * be aligned in the last column.\n *\n * @param {module:echarts/data/Graph~Node} nodes. node of sankey view.\n * @param {number} maxDepth. use to assign to node without outEdges as x-position.\n */\n\n\nfunction moveSinksRight(nodes, maxDepth) {\n zrUtil.each(nodes, function (node) {\n if (!isNodeDepth(node) && !node.outEdges.length) {\n node.setLayout({\n depth: maxDepth\n }, true);\n }\n });\n}\n/**\n * Scale node x-position to the width\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n * @param {number} kx multiple used to scale nodes\n */\n\n\nfunction scaleNodeBreadths(nodes, kx, orient) {\n zrUtil.each(nodes, function (node) {\n var nodeDepth = node.getLayout().depth * kx;\n orient === 'vertical' ? node.setLayout({\n y: nodeDepth\n }, true) : node.setLayout({\n x: nodeDepth\n }, true);\n });\n}\n/**\n * Using Gauss-Seidel iterations method to compute the node depth(y-position)\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n * @param {module:echarts/data/Graph~Edge} edges edge of sankey view\n * @param {number} height the whole height of the area to draw the view\n * @param {number} nodeGap the vertical distance between two nodes\n * in the same column.\n * @param {number} iterations the number of iterations for the algorithm\n */\n\n\nfunction computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient) {\n var nodesByBreadth = prepareNodesByBreadth(nodes, orient);\n initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n\n for (var alpha = 1; iterations > 0; iterations--) {\n // 0.99 is a experience parameter, ensure that each iterations of\n // changes as small as possible.\n alpha *= 0.99;\n relaxRightToLeft(nodesByBreadth, alpha, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n relaxLeftToRight(nodesByBreadth, alpha, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n }\n}\n\nfunction prepareNodesByBreadth(nodes, orient) {\n var nodesByBreadth = [];\n var keyAttr = orient === 'vertical' ? 'y' : 'x';\n var groupResult = groupData(nodes, function (node) {\n return node.getLayout()[keyAttr];\n });\n groupResult.keys.sort(function (a, b) {\n return a - b;\n });\n zrUtil.each(groupResult.keys, function (key) {\n nodesByBreadth.push(groupResult.buckets.get(key));\n });\n return nodesByBreadth;\n}\n/**\n * Compute the original y-position for each node\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n * @param {Array.<Array.<module:echarts/data/Graph~Node>>} nodesByBreadth\n * group by the array of all sankey nodes based on the nodes x-position.\n * @param {module:echarts/data/Graph~Edge} edges edge of sankey view\n * @param {number} height the whole height of the area to draw the view\n * @param {number} nodeGap the vertical distance between two nodes\n */\n\n\nfunction initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient) {\n var minKy = Infinity;\n zrUtil.each(nodesByBreadth, function (nodes) {\n var n = nodes.length;\n var sum = 0;\n zrUtil.each(nodes, function (node) {\n sum += node.getLayout().value;\n });\n var ky = orient === 'vertical' ? (width - (n - 1) * nodeGap) / sum : (height - (n - 1) * nodeGap) / sum;\n\n if (ky < minKy) {\n minKy = ky;\n }\n });\n zrUtil.each(nodesByBreadth, function (nodes) {\n zrUtil.each(nodes, function (node, i) {\n var nodeDy = node.getLayout().value * minKy;\n\n if (orient === 'vertical') {\n node.setLayout({\n x: i\n }, true);\n node.setLayout({\n dx: nodeDy\n }, true);\n } else {\n node.setLayout({\n y: i\n }, true);\n node.setLayout({\n dy: nodeDy\n }, true);\n }\n });\n });\n zrUtil.each(edges, function (edge) {\n var edgeDy = +edge.getValue() * minKy;\n edge.setLayout({\n dy: edgeDy\n }, true);\n });\n}\n/**\n * Resolve the collision of initialized depth (y-position)\n *\n * @param {Array.<Array.<module:echarts/data/Graph~Node>>} nodesByBreadth\n * group by the array of all sankey nodes based on the nodes x-position.\n * @param {number} nodeGap the vertical distance between two nodes\n * @param {number} height the whole height of the area to draw the view\n */\n\n\nfunction resolveCollisions(nodesByBreadth, nodeGap, height, width, orient) {\n var keyAttr = orient === 'vertical' ? 'x' : 'y';\n zrUtil.each(nodesByBreadth, function (nodes) {\n nodes.sort(function (a, b) {\n return a.getLayout()[keyAttr] - b.getLayout()[keyAttr];\n });\n var nodeX;\n var node;\n var dy;\n var y0 = 0;\n var n = nodes.length;\n var nodeDyAttr = orient === 'vertical' ? 'dx' : 'dy';\n\n for (var i = 0; i < n; i++) {\n node = nodes[i];\n dy = y0 - node.getLayout()[keyAttr];\n\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] + dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n }\n\n y0 = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap;\n }\n\n var viewWidth = orient === 'vertical' ? width : height; // If the bottommost node goes outside the bounds, push it back up\n\n dy = y0 - nodeGap - viewWidth;\n\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] - dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n y0 = nodeX;\n\n for (i = n - 2; i >= 0; --i) {\n node = nodes[i];\n dy = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap - y0;\n\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] - dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n }\n\n y0 = node.getLayout()[keyAttr];\n }\n }\n });\n}\n/**\n * Change the y-position of the nodes, except most the right side nodes\n *\n * @param {Array.<Array.<module:echarts/data/Graph~Node>>} nodesByBreadth\n * group by the array of all sankey nodes based on the node x-position.\n * @param {number} alpha parameter used to adjust the nodes y-position\n */\n\n\nfunction relaxRightToLeft(nodesByBreadth, alpha, orient) {\n zrUtil.each(nodesByBreadth.slice().reverse(), function (nodes) {\n zrUtil.each(nodes, function (node) {\n if (node.outEdges.length) {\n var y = sum(node.outEdges, weightedTarget, orient) / sum(node.outEdges, getEdgeValue, orient);\n\n if (isNaN(y)) {\n var len = node.outEdges.length;\n y = len ? sum(node.outEdges, centerTarget, orient) / len : 0;\n }\n\n if (orient === 'vertical') {\n var nodeX = node.getLayout().x + (y - center(node, orient)) * alpha;\n node.setLayout({\n x: nodeX\n }, true);\n } else {\n var nodeY = node.getLayout().y + (y - center(node, orient)) * alpha;\n node.setLayout({\n y: nodeY\n }, true);\n }\n }\n });\n });\n}\n\nfunction weightedTarget(edge, orient) {\n return center(edge.node2, orient) * edge.getValue();\n}\n\nfunction centerTarget(edge, orient) {\n return center(edge.node2, orient);\n}\n\nfunction weightedSource(edge, orient) {\n return center(edge.node1, orient) * edge.getValue();\n}\n\nfunction centerSource(edge, orient) {\n return center(edge.node1, orient);\n}\n\nfunction center(node, orient) {\n return orient === 'vertical' ? node.getLayout().x + node.getLayout().dx / 2 : node.getLayout().y + node.getLayout().dy / 2;\n}\n\nfunction getEdgeValue(edge) {\n return edge.getValue();\n}\n\nfunction sum(array, cb, orient) {\n var sum = 0;\n var len = array.length;\n var i = -1;\n\n while (++i < len) {\n var value = +cb.call(array, array[i], orient);\n\n if (!isNaN(value)) {\n sum += value;\n }\n }\n\n return sum;\n}\n/**\n * Change the y-position of the nodes, except most the left side nodes\n *\n * @param {Array.<Array.<module:echarts/data/Graph~Node>>} nodesByBreadth\n * group by the array of all sankey nodes based on the node x-position.\n * @param {number} alpha parameter used to adjust the nodes y-position\n */\n\n\nfunction relaxLeftToRight(nodesByBreadth, alpha, orient) {\n zrUtil.each(nodesByBreadth, function (nodes) {\n zrUtil.each(nodes, function (node) {\n if (node.inEdges.length) {\n var y = sum(node.inEdges, weightedSource, orient) / sum(node.inEdges, getEdgeValue, orient);\n\n if (isNaN(y)) {\n var len = node.inEdges.length;\n y = len ? sum(node.inEdges, centerSource, orient) / len : 0;\n }\n\n if (orient === 'vertical') {\n var nodeX = node.getLayout().x + (y - center(node, orient)) * alpha;\n node.setLayout({\n x: nodeX\n }, true);\n } else {\n var nodeY = node.getLayout().y + (y - center(node, orient)) * alpha;\n node.setLayout({\n y: nodeY\n }, true);\n }\n }\n });\n });\n}\n/**\n * Compute the depth(y-position) of each edge\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n */\n\n\nfunction computeEdgeDepths(nodes, orient) {\n var keyAttr = orient === 'vertical' ? 'x' : 'y';\n zrUtil.each(nodes, function (node) {\n node.outEdges.sort(function (a, b) {\n return a.node2.getLayout()[keyAttr] - b.node2.getLayout()[keyAttr];\n });\n node.inEdges.sort(function (a, b) {\n return a.node1.getLayout()[keyAttr] - b.node1.getLayout()[keyAttr];\n });\n });\n zrUtil.each(nodes, function (node) {\n var sy = 0;\n var ty = 0;\n zrUtil.each(node.outEdges, function (edge) {\n edge.setLayout({\n sy: sy\n }, true);\n sy += edge.getLayout().dy;\n });\n zrUtil.each(node.inEdges, function (edge) {\n edge.setLayout({\n ty: ty\n }, true);\n ty += edge.getLayout().dy;\n });\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel, payload) {\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n var graph = seriesModel.getGraph();\n var nodes = graph.nodes;\n\n if (nodes.length) {\n var minValue = Infinity;\n var maxValue = -Infinity;\n zrUtil.each(nodes, function (node) {\n var nodeValue = node.getLayout().value;\n\n if (nodeValue < minValue) {\n minValue = nodeValue;\n }\n\n if (nodeValue > maxValue) {\n maxValue = nodeValue;\n }\n });\n zrUtil.each(nodes, function (node) {\n var mapping = new VisualMapping({\n type: 'color',\n mappingMethod: 'linear',\n dataExtent: [minValue, maxValue],\n visual: seriesModel.get('color')\n });\n var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value);\n var customColor = node.getModel().get('itemStyle.color');\n customColor != null ? node.setVisual('color', customColor) : node.setVisual('color', mapValueToColor);\n });\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./scatter/ScatterSeries\");\n\nrequire(\"./scatter/ScatterView\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar layoutPoints = require(\"../layout/points\");\n\nrequire(\"../component/gridSimple\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// import * as zrUtil from 'zrender/src/core/util';\n// In case developer forget to include grid component\necharts.registerVisual(visualSymbol('scatter', 'circle'));\necharts.registerLayout(layoutPoints('scatter')); // echarts.registerProcessor(function (ecModel, api) {\n// ecModel.eachSeriesByType('scatter', function (seriesModel) {\n// var data = seriesModel.getData();\n// var coordSys = seriesModel.coordinateSystem;\n// if (coordSys.type !== 'geo') {\n// return;\n// }\n// var startPt = coordSys.pointToData([0, 0]);\n// var endPt = coordSys.pointToData([api.getWidth(), api.getHeight()]);\n// var dims = zrUtil.map(coordSys.dimensions, function (dim) {\n// return data.mapDimension(dim);\n// });\n// var range = {};\n// range[dims[0]] = [Math.min(startPt[0], endPt[0]), Math.max(startPt[0], endPt[0])];\n// range[dims[1]] = [Math.min(startPt[1], endPt[1]), Math.max(startPt[1], endPt[1])];\n// data.selectRange(range);\n// });\n// });","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar createListFromArray = require(\"../helper/createListFromArray\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.scatter',\n dependencies: ['grid', 'polar', 'geo', 'singleAxis', 'calendar'],\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {\n useEncodeDefaulter: true\n });\n },\n brushSelector: 'point',\n getProgressive: function () {\n var progressive = this.option.progressive;\n\n if (progressive == null) {\n // PENDING\n return this.option.large ? 5e3 : this.get('progressive');\n }\n\n return progressive;\n },\n getProgressiveThreshold: function () {\n var progressiveThreshold = this.option.progressiveThreshold;\n\n if (progressiveThreshold == null) {\n // PENDING\n return this.option.large ? 1e4 : this.get('progressiveThreshold');\n }\n\n return progressiveThreshold;\n },\n defaultOption: {\n coordinateSystem: 'cartesian2d',\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n hoverAnimation: true,\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Polar coordinate system\n // polarIndex: 0,\n // Geo coordinate system\n // geoIndex: 0,\n // symbol: null, // 图形类型\n symbolSize: 10,\n // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2\n // symbolRotate: null, // 图形旋转控制\n large: false,\n // Available when large is true\n largeThreshold: 2000,\n // cursor: null,\n // label: {\n // show: false\n // distance: 5,\n // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n // position: 默认自适应,水平布局为'top',垂直布局为'right',可选为\n // 'inside'|'left'|'right'|'top'|'bottom'\n // 默认使用全局文本样式,详见TEXTSTYLE\n // },\n itemStyle: {\n opacity: 0.8 // color: 各异\n\n },\n // If clip the overflow graphics\n // Works on cartesian / polar series\n clip: true // progressive: null\n\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar SymbolDraw = require(\"../helper/SymbolDraw\");\n\nvar LargeSymbolDraw = require(\"../helper/LargeSymbolDraw\");\n\nvar pointsLayout = require(\"../../layout/points\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.extendChartView({\n type: 'scatter',\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n\n symbolDraw.updateData(data, {\n // TODO\n // If this parameter should be a shape or a bounding volume\n // shape will be more general.\n // But bounding volume like bounding rect will be much faster in the contain calculation\n clipShape: this._getClipShape(seriesModel)\n });\n this._finished = true;\n },\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n\n symbolDraw.incrementalPrepareUpdate(data);\n this._finished = false;\n },\n incrementalRender: function (taskParams, seriesModel, ecModel) {\n this._symbolDraw.incrementalUpdate(taskParams, seriesModel.getData(), {\n clipShape: this._getClipShape(seriesModel)\n });\n\n this._finished = taskParams.end === seriesModel.getData().count();\n },\n updateTransform: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData(); // Must mark group dirty and make sure the incremental layer will be cleared\n // PENDING\n\n this.group.dirty();\n\n if (!this._finished || data.count() > 1e4 || !this._symbolDraw.isPersistent()) {\n return {\n update: true\n };\n } else {\n var res = pointsLayout().reset(seriesModel);\n\n if (res.progress) {\n res.progress({\n start: 0,\n end: data.count()\n }, data);\n }\n\n this._symbolDraw.updateLayout(data);\n }\n },\n _getClipShape: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var clipArea = coordSys && coordSys.getArea && coordSys.getArea();\n return seriesModel.get('clip', true) ? clipArea : null;\n },\n _updateSymbolDraw: function (data, seriesModel) {\n var symbolDraw = this._symbolDraw;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeDraw = pipelineContext.large;\n\n if (!symbolDraw || isLargeDraw !== this._isLargeDraw) {\n symbolDraw && symbolDraw.remove();\n symbolDraw = this._symbolDraw = isLargeDraw ? new LargeSymbolDraw() : new SymbolDraw();\n this._isLargeDraw = isLargeDraw;\n this.group.removeAll();\n }\n\n this.group.add(symbolDraw.group);\n return symbolDraw;\n },\n remove: function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove(true);\n this._symbolDraw = null;\n },\n dispose: function () {}\n});"],"names":["echarts","zrUtil","createDataSelectAction","dataColor","pieLayout","dataFilter","type","event","method","registerVisual","registerLayout","curry","registerProcessor","textContain","_number","parsePercent","RADIAN","Math","PI","adjustSingleSide","list","cx","cy","r","dir","viewWidth","viewHeight","viewLeft","viewTop","farthestX","shiftDown","start","end","delta","j","y","height","shiftUp","changeX","isDownList","lastDeltaX","Number","MAX_VALUE","i","l","length","labelAlignTo","deltaY","abs","len","length2","len2","deltaX","sqrt","x","sort","a","b","lastY","upList","downList","position","dx","linePoints","push","avoidOverlap","labelLayoutList","leftList","rightList","leftmostX","rightmostX","isPositionCenter","min","max","layout","targetTextWidth","isAlignToEdge","realTextWidth","textRect","width","labelDistance","labelMargin","bleedMargin","text","truncateText","font","getWidth","dist","_default","seriesModel","data","getData","hasLabelRotate","minShowLabelRadian","get","each","idx","getItemLayout","itemModel","getItemModel","labelModel","getModel","labelPosition","getFont","labelLineModel","labelLineLen","labelLineLen2","angle","textX","textY","textAlign","midAngle","startAngle","endAngle","cos","dy","sin","labelRotate","getFormattedLabel","getName","getBoundingRect","isLabelInside","x1","r0","y1","x2","y2","x3","y3","rotate","label","verticalAlign","rotation","inside","module","exports","linearMap","labelLayout","PI2","getViewRect","api","getLayoutRect","getBoxLayoutParams","getHeight","seriesType","ecModel","payload","eachSeriesByType","valueDim","mapDimension","viewRect","center","radius","isArray","size","minAngle","validDataCount","value","isNaN","sum","getSum","unitRadian","clockwise","roseType","stillShowZeroSum","extent","getDataExtent","restAngle","valueSumLargerThanMinAngle","currentAngle","setItemLayout","NaN","visualSymbol","radarLayout","backwardCompat","registerPreprocessor","SeriesModel","createListSimply","_format","encodeHTML","LegendVisualProvider","RadarSeries","extend","dependencies","init","option","superApply","this","arguments","legendVisualProvider","bind","getRawData","getInitialData","generateCoord","generateCoordCount","Infinity","formatTooltip","dataIndex","coordSys","coordinateSystem","indicatorAxes","getIndicatorAxes","name","map","axis","val","dim","join","getTooltipPosition","values","getValues","dimensions","coordToPoint","dataToCoord","defaultOption","zlevel","z","legendHoverLink","radarIndex","lineStyle","symbol","symbolSize","graphic","symbolUtil","normalizeSymbolSize","extendChartView","render","polar","group","oldData","_data","createSymbol","symbolType","getItemVisual","color","symbolPath","attr","style","strokeNoScale","z2","scale","updateSymbols","oldPoints","newPoints","symbolGroup","isInit","removeAll","__dimIdx","add","getInitialPoints","points","pt","diff","polygon","Polygon","polyline","Polyline","target","shape","initProps","itemGroup","Group","setItemGraphicEl","update","newIdx","oldIdx","getItemGraphicEl","childAt","updateProps","remove","execute","eachItemGraphicEl","useStyle","defaults","getLineStyle","fill","stroke","hoverStyle","areaStyleModel","hoverAreaStyleModel","polygonIgnore","isEmpty","parentModel","hoverPolygonIgnore","ignore","getAreaStyle","opacity","itemStyle","getItemStyle","itemHoverStyle","labelHoverModel","eachChild","setStyle","clone","defaultText","setLabelStyle","labelFetcher","hostModel","labelDataIndex","labelDimIndex","autoColor","isRectText","highDownOnUpdate","fromState","toState","setHoverStyle","dispose","polarOptArr","polarNotRadar","polarOpt","indicator","radar","series","seriesOpt","polarIndex","axes","axisIndex","point","dataToPoint","isValidPoint","getValueMissingPoint","firstPoint","find","slice","sankeyLayout","sankeyVisual","createGraphFromNodeEdge","Model","_config","SankeySeries","__DEV__","layoutInfo","levelModels","links","edges","nodes","levels","depth","graph","beforeLink","nodeData","edgeData","wrapMethod","model","customizeGetParent","path","nodeDepth","levelModel","edge","getGraph","getEdgeByIndex","node1","getLayout","setNodePosition","localPosition","dataItem","localX","localY","getEdgeData","multipleSeries","dataType","params","getDataParams","rawDataOpt","html","source","node","getNodeByIndex","superCall","optionUpdated","focusNodeAdjacency","nodeValue","left","top","right","bottom","orient","nodeWidth","nodeGap","draggable","layoutIterations","show","fontSize","nodeAlign","borderWidth","borderColor","curveness","emphasis","animationEasing","animationDuration","nodeOpacityPath","hoverNodeOpacityPath","lineOpacityPath","hoverLineOpacityPath","getItemOpacity","item","opacityPath","getVisual","fadeOutItem","opacityRatio","el","getGraphicEl","downplay","traverse","child","fadeInItem","highlight","SankeyShape","extendShape","cpx1","cpy1","cpx2","cpy2","buildPath","ctx","moveTo","bezierCurveTo","lineTo","closePath","trigger","_model","_focusAdjacencyDisabled","sankeyView","eachEdge","curve","seriesIndex","lineStyleModel","curvature","n1Layout","node1Model","dragX1","dragY1","n2Layout","node2","node2Model","dragX2","dragY2","edgeLayout","sy","ty","setShape","eachNode","dragX","dragY","rect","Rect","id","drift","dirty","dispatchAction","seriesId","getRawIndex","ondragend","cursor","focusNodeAdjHandler","off","unfocusNodeAdjHandler","on","_clearTimer","_dispatchUnfocus","edgeModel","edgeDataIndex","setClipPath","createGridClipShape","removeClipPath","self","_unfocusDelayTimer","setTimeout","clearTimeout","focusNodeAdj","outEdges","inEdges","unfocusNodeAdjacency","cb","rectEl","registerAction","eachComponent","mainType","subType","query","groupData","computeNodeValues","filteredNodes","filter","iterations","layoutSankey","computeNodeBreadths","computeNodeDepths","computeEdgeDepths","value1","getEdgeValue","value2","nodeRawValue","getValue","setLayout","remainEdges","indegreeArr","zeroIndegrees","nextTargetNode","kx","maxNodeDepth","hostGraph","getRawDataItem","isItemDepth","edgeIdx","indexEdge","indexOf","targetNode","nodeIndex","Error","maxDepth","adjustNodeWithNodeAlign","scaleNodeBreadths","isNodeDepth","nextSourceNode","remainNodes","nodeHeight","skNodeHeight","moveSinksRight","nodesByBreadth","prepareNodesByBreadth","initializeNodeDepth","resolveCollisions","alpha","relaxRightToLeft","relaxLeftToRight","keyAttr","groupResult","keys","key","buckets","minKy","n","ky","nodeDy","edgeDy","nodeX","y0","nodeDyAttr","reverse","weightedTarget","centerTarget","nodeY","weightedSource","centerSource","array","call","VisualMapping","minValue","maxValue","mapping","mappingMethod","dataExtent","visual","mapValueToColor","mapValueToVisual","customColor","setVisual","layoutPoints","createListFromArray","getSource","useEncodeDefaulter","brushSelector","getProgressive","progressive","large","getProgressiveThreshold","progressiveThreshold","hoverAnimation","largeThreshold","clip","SymbolDraw","LargeSymbolDraw","pointsLayout","symbolDraw","_updateSymbolDraw","updateData","clipShape","_getClipShape","_finished","incrementalPrepareRender","incrementalPrepareUpdate","incrementalRender","taskParams","_symbolDraw","incrementalUpdate","count","updateTransform","isPersistent","res","reset","progress","updateLayout","clipArea","getArea","pipelineContext","isLargeDraw","_isLargeDraw"],"sourceRoot":""}
|