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EAAS,CACX,IAAIkB,EAAclB,EAAQpjB,KACtBkL,EAAiC,UAAhBoZ,GAA2BlB,EAAQgB,mBACpD7X,EAA2B,UAAnBrB,EAA6BoC,EAA2B,OAAnBpC,EAA0BnN,EAAYiP,aAAa1Q,EAAMuW,SAAWvW,EAAM+hB,SAASrF,EAAUrX,IAAI,oBAClJ0iB,EAAaC,GAAelB,EAAQmB,iBAAiBhY,EACvD,CAEA,OAAO8X,CACT,CAEAthB,EAAOvD,QAAU+B,C","sources":["webpack://app/./node_modules/echarts/lib/chart/tree.js","webpack://app/./node_modules/echarts/lib/chart/tree/layoutHelper.js","webpack://app/./node_modules/echarts/lib/chart/tree/traversalHelper.js","webpack://app/./node_modules/echarts/lib/chart/tree/treeAction.js","webpack://app/./node_modules/echarts/lib/chart/tree/treeLayout.js","webpack://app/./node_modules/echarts/lib/chart/treemap.js","webpack://app/./node_modules/echarts/lib/chart/treemap/Breadcrumb.js","webpack://app/./node_modules/echarts/lib/chart/treemap/TreemapSeries.js","webpack://app/./node_modules/echarts/lib/chart/treemap/TreemapView.js","webpack://app/./node_modules/echarts/lib/chart/treemap/treemapAction.js","webpack://app/./node_modules/echarts/lib/chart/treemap/treemapLayout.js","webpack://app/./node_modules/echarts/lib/chart/treemap/treemapVisual.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\nrequire(\"./tree/TreeSeries\");\n\nrequire(\"./tree/TreeView\");\n\nrequire(\"./tree/treeAction\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar treeLayout = require(\"./tree/treeLayout\");\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.registerVisual(visualSymbol('tree', 'circle'));\necharts.registerLayout(treeLayout);","\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\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\n/*\n* A third-party license is embeded for some of the code in this file:\n* The tree layoutHelper implementation was originally copied from\n* \"d3.js\"(https://github.com/d3/d3-hierarchy) with\n* some modifications made for this project.\n* (see more details in the comment of the specific method below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the licence of \"d3.js\" (BSD-3Clause, see\n* </licenses/LICENSE-d3>).\n*/\n\n/**\n * @file The layout algorithm of node-link tree diagrams. Here we using Reingold-Tilford algorithm to drawing\n * the tree.\n */\n\n/**\n * Initialize all computational message for following algorithm.\n *\n * @param {module:echarts/data/Tree~TreeNode} root The virtual root of the tree.\n */\nfunction init(root) {\n root.hierNode = {\n defaultAncestor: null,\n ancestor: root,\n prelim: 0,\n modifier: 0,\n change: 0,\n shift: 0,\n i: 0,\n thread: null\n };\n var nodes = [root];\n var node;\n var children;\n\n while (node = nodes.pop()) {\n // jshint ignore:line\n children = node.children;\n\n if (node.isExpand && children.length) {\n var n = children.length;\n\n for (var i = n - 1; i >= 0; i--) {\n var child = children[i];\n child.hierNode = {\n defaultAncestor: null,\n ancestor: child,\n prelim: 0,\n modifier: 0,\n change: 0,\n shift: 0,\n i: i,\n thread: null\n };\n nodes.push(child);\n }\n }\n }\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes a preliminary x coordinate for node. Before that, this function is\n * applied recursively to the children of node, as well as the function\n * apportion(). After spacing out the children by calling executeShifts(), the\n * node is placed to the midpoint of its outermost children.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {Function} separation\n */\n\n\nfunction firstWalk(node, separation) {\n var children = node.isExpand ? node.children : [];\n var siblings = node.parentNode.children;\n var subtreeW = node.hierNode.i ? siblings[node.hierNode.i - 1] : null;\n\n if (children.length) {\n executeShifts(node);\n var midPoint = (children[0].hierNode.prelim + children[children.length - 1].hierNode.prelim) / 2;\n\n if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n node.hierNode.modifier = node.hierNode.prelim - midPoint;\n } else {\n node.hierNode.prelim = midPoint;\n }\n } else if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n }\n\n node.parentNode.hierNode.defaultAncestor = apportion(node, subtreeW, node.parentNode.hierNode.defaultAncestor || siblings[0], separation);\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes all real x-coordinates by summing up the modifiers recursively.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n */\n\n\nfunction secondWalk(node) {\n var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier;\n node.setLayout({\n x: nodeX\n }, true);\n node.hierNode.modifier += node.parentNode.hierNode.modifier;\n}\n\nfunction separation(cb) {\n return arguments.length ? cb : defaultSeparation;\n}\n/**\n * Transform the common coordinate to radial coordinate.\n *\n * @param {number} x\n * @param {number} y\n * @return {Object}\n */\n\n\nfunction radialCoordinate(x, y) {\n var radialCoor = {};\n x -= Math.PI / 2;\n radialCoor.x = y * Math.cos(x);\n radialCoor.y = y * Math.sin(x);\n return radialCoor;\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/**\n * All other shifts, applied to the smaller subtrees between w- and w+, are\n * performed by this function.\n *\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n */\n\n\nfunction executeShifts(node) {\n var children = node.children;\n var n = children.length;\n var shift = 0;\n var change = 0;\n\n while (--n >= 0) {\n var child = children[n];\n child.hierNode.prelim += shift;\n child.hierNode.modifier += shift;\n change += child.hierNode.change;\n shift += child.hierNode.shift + change;\n }\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * The core of the algorithm. Here, a new subtree is combined with the\n * previous subtrees. Threads are used to traverse the inside and outside\n * contours of the left and right subtree up to the highest common level.\n * Whenever two nodes of the inside contours conflict, we compute the left\n * one of the greatest uncommon ancestors using the function nextAncestor()\n * and call moveSubtree() to shift the subtree and prepare the shifts of\n * smaller subtrees. Finally, we add a new thread (if necessary).\n *\n * @param {module:echarts/data/Tree~TreeNode} subtreeV\n * @param {module:echarts/data/Tree~TreeNode} subtreeW\n * @param {module:echarts/data/Tree~TreeNode} ancestor\n * @param {Function} separation\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction apportion(subtreeV, subtreeW, ancestor, separation) {\n if (subtreeW) {\n var nodeOutRight = subtreeV;\n var nodeInRight = subtreeV;\n var nodeOutLeft = nodeInRight.parentNode.children[0];\n var nodeInLeft = subtreeW;\n var sumOutRight = nodeOutRight.hierNode.modifier;\n var sumInRight = nodeInRight.hierNode.modifier;\n var sumOutLeft = nodeOutLeft.hierNode.modifier;\n var sumInLeft = nodeInLeft.hierNode.modifier;\n\n while (nodeInLeft = nextRight(nodeInLeft), nodeInRight = nextLeft(nodeInRight), nodeInLeft && nodeInRight) {\n nodeOutRight = nextRight(nodeOutRight);\n nodeOutLeft = nextLeft(nodeOutLeft);\n nodeOutRight.hierNode.ancestor = subtreeV;\n var shift = nodeInLeft.hierNode.prelim + sumInLeft - nodeInRight.hierNode.prelim - sumInRight + separation(nodeInLeft, nodeInRight);\n\n if (shift > 0) {\n moveSubtree(nextAncestor(nodeInLeft, subtreeV, ancestor), subtreeV, shift);\n sumInRight += shift;\n sumOutRight += shift;\n }\n\n sumInLeft += nodeInLeft.hierNode.modifier;\n sumInRight += nodeInRight.hierNode.modifier;\n sumOutRight += nodeOutRight.hierNode.modifier;\n sumOutLeft += nodeOutLeft.hierNode.modifier;\n }\n\n if (nodeInLeft && !nextRight(nodeOutRight)) {\n nodeOutRight.hierNode.thread = nodeInLeft;\n nodeOutRight.hierNode.modifier += sumInLeft - sumOutRight;\n }\n\n if (nodeInRight && !nextLeft(nodeOutLeft)) {\n nodeOutLeft.hierNode.thread = nodeInRight;\n nodeOutLeft.hierNode.modifier += sumInRight - sumOutLeft;\n ancestor = subtreeV;\n }\n }\n\n return ancestor;\n}\n/**\n * This function is used to traverse the right contour of a subtree.\n * It returns the rightmost child of node or the thread of node. The function\n * returns null if and only if node is on the highest depth of its subtree.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction nextRight(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread;\n}\n/**\n * This function is used to traverse the left contour of a subtree (or a subforest).\n * It returns the leftmost child of node or the thread of node. The function\n * returns null if and only if node is on the highest depth of its subtree.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction nextLeft(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[0] : node.hierNode.thread;\n}\n/**\n * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor.\n * Otherwise, returns the specified ancestor.\n *\n * @param {module:echarts/data/Tree~TreeNode} nodeInLeft\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {module:echarts/data/Tree~TreeNode} ancestor\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction nextAncestor(nodeInLeft, node, ancestor) {\n return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode ? nodeInLeft.hierNode.ancestor : ancestor;\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Shifts the current subtree rooted at wr.\n * This is done by increasing prelim(w+) and modifier(w+) by shift.\n *\n * @param {module:echarts/data/Tree~TreeNode} wl\n * @param {module:echarts/data/Tree~TreeNode} wr\n * @param {number} shift [description]\n */\n\n\nfunction moveSubtree(wl, wr, shift) {\n var change = shift / (wr.hierNode.i - wl.hierNode.i);\n wr.hierNode.change -= change;\n wr.hierNode.shift += shift;\n wr.hierNode.modifier += shift;\n wr.hierNode.prelim += shift;\n wl.hierNode.change += change;\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * <https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\n\n\nfunction defaultSeparation(node1, node2) {\n return node1.parentNode === node2.parentNode ? 1 : 2;\n}\n\nexports.init = init;\nexports.firstWalk = firstWalk;\nexports.secondWalk = secondWalk;\nexports.separation = separation;\nexports.radialCoordinate = radialCoordinate;\nexports.getViewRect = getViewRect;","\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\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\n/**\n * Traverse the tree from bottom to top and do something\n * @param {module:echarts/data/Tree~TreeNode} root The real root of the tree\n * @param {Function} callback\n */\nfunction eachAfter(root, callback, separation) {\n var nodes = [root];\n var next = [];\n var node;\n\n while (node = nodes.pop()) {\n // jshint ignore:line\n next.push(node);\n\n if (node.isExpand) {\n var children = node.children;\n\n if (children.length) {\n for (var i = 0; i < children.length; i++) {\n nodes.push(children[i]);\n }\n }\n }\n }\n\n while (node = next.pop()) {\n // jshint ignore:line\n callback(node, separation);\n }\n}\n/**\n * Traverse the tree from top to bottom and do something\n * @param {module:echarts/data/Tree~TreeNode} root The real root of the tree\n * @param {Function} callback\n */\n\n\nfunction eachBefore(root, callback) {\n var nodes = [root];\n var node;\n\n while (node = nodes.pop()) {\n // jshint ignore:line\n callback(node);\n\n if (node.isExpand) {\n var children = node.children;\n\n if (children.length) {\n for (var i = children.length - 1; i >= 0; i--) {\n nodes.push(children[i]);\n }\n }\n }\n }\n}\n\nexports.eachAfter = eachAfter;\nexports.eachBefore = eachBefore;","\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 _roamHelper = require(\"../../action/roamHelper\");\n\nvar updateCenterAndZoom = _roamHelper.updateCenterAndZoom;\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: 'treeExpandAndCollapse',\n event: 'treeExpandAndCollapse',\n update: 'update'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'tree',\n query: payload\n }, function (seriesModel) {\n var dataIndex = payload.dataIndex;\n var tree = seriesModel.getData().tree;\n var node = tree.getNodeByDataIndex(dataIndex);\n node.isExpand = !node.isExpand;\n });\n});\necharts.registerAction({\n type: 'treeRoam',\n event: 'treeRoam',\n // Here we set 'none' instead of 'update', because roam action\n // just need to update the transform matrix without having to recalculate\n // the layout. So don't need to go through the whole update process, such\n // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.\n update: 'none'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'tree',\n query: payload\n }, function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var res = updateCenterAndZoom(coordSys, payload);\n seriesModel.setCenter && seriesModel.setCenter(res.center);\n seriesModel.setZoom && seriesModel.setZoom(res.zoom);\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 _traversalHelper = require(\"./traversalHelper\");\n\nvar eachAfter = _traversalHelper.eachAfter;\nvar eachBefore = _traversalHelper.eachBefore;\n\nvar _layoutHelper = require(\"./layoutHelper\");\n\nvar init = _layoutHelper.init;\nvar firstWalk = _layoutHelper.firstWalk;\nvar secondWalk = _layoutHelper.secondWalk;\nvar sep = _layoutHelper.separation;\nvar radialCoordinate = _layoutHelper.radialCoordinate;\nvar getViewRect = _layoutHelper.getViewRect;\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) {\n ecModel.eachSeriesByType('tree', function (seriesModel) {\n commonLayout(seriesModel, api);\n });\n}\n\nfunction commonLayout(seriesModel, api) {\n var layoutInfo = getViewRect(seriesModel, api);\n seriesModel.layoutInfo = layoutInfo;\n var layout = seriesModel.get('layout');\n var width = 0;\n var height = 0;\n var separation = null;\n\n if (layout === 'radial') {\n width = 2 * Math.PI;\n height = Math.min(layoutInfo.height, layoutInfo.width) / 2;\n separation = sep(function (node1, node2) {\n return (node1.parentNode === node2.parentNode ? 1 : 2) / node1.depth;\n });\n } else {\n width = layoutInfo.width;\n height = layoutInfo.height;\n separation = sep();\n }\n\n var virtualRoot = seriesModel.getData().tree.root;\n var realRoot = virtualRoot.children[0];\n\n if (realRoot) {\n init(virtualRoot);\n eachAfter(realRoot, firstWalk, separation);\n virtualRoot.hierNode.modifier = -realRoot.hierNode.prelim;\n eachBefore(realRoot, secondWalk);\n var left = realRoot;\n var right = realRoot;\n var bottom = realRoot;\n eachBefore(realRoot, function (node) {\n var x = node.getLayout().x;\n\n if (x < left.getLayout().x) {\n left = node;\n }\n\n if (x > right.getLayout().x) {\n right = node;\n }\n\n if (node.depth > bottom.depth) {\n bottom = node;\n }\n });\n var delta = left === right ? 1 : separation(left, right) / 2;\n var tx = delta - left.getLayout().x;\n var kx = 0;\n var ky = 0;\n var coorX = 0;\n var coorY = 0;\n\n if (layout === 'radial') {\n kx = width / (right.getLayout().x + delta + tx); // here we use (node.depth - 1), bucause the real root's depth is 1\n\n ky = height / (bottom.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorX = (node.getLayout().x + tx) * kx;\n coorY = (node.depth - 1) * ky;\n var finalCoor = radialCoordinate(coorX, coorY);\n node.setLayout({\n x: finalCoor.x,\n y: finalCoor.y,\n rawX: coorX,\n rawY: coorY\n }, true);\n });\n } else {\n var orient = seriesModel.getOrient();\n\n if (orient === 'RL' || orient === 'LR') {\n ky = height / (right.getLayout().x + delta + tx);\n kx = width / (bottom.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorY = (node.getLayout().x + tx) * ky;\n coorX = orient === 'LR' ? (node.depth - 1) * kx : width - (node.depth - 1) * kx;\n node.setLayout({\n x: coorX,\n y: coorY\n }, true);\n });\n } else if (orient === 'TB' || orient === 'BT') {\n kx = width / (right.getLayout().x + delta + tx);\n ky = height / (bottom.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorX = (node.getLayout().x + tx) * kx;\n coorY = orient === 'TB' ? (node.depth - 1) * ky : height - (node.depth - 1) * ky;\n node.setLayout({\n x: coorX,\n y: coorY\n }, true);\n });\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(\"./treemap/TreemapSeries\");\n\nrequire(\"./treemap/TreemapView\");\n\nrequire(\"./treemap/treemapAction\");\n\nvar treemapVisual = require(\"./treemap/treemapVisual\");\n\nvar treemapLayout = require(\"./treemap/treemapLayout\");\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.registerVisual(treemapVisual);\necharts.registerLayout(treemapLayout);","\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 layout = require(\"../../util/layout\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _treeHelper = require(\"../helper/treeHelper\");\n\nvar wrapTreePathInfo = _treeHelper.wrapTreePathInfo;\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 TEXT_PADDING = 8;\nvar ITEM_GAP = 8;\nvar ARRAY_LENGTH = 5;\n\nfunction Breadcrumb(containerGroup) {\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this.group = new graphic.Group();\n containerGroup.add(this.group);\n}\n\nBreadcrumb.prototype = {\n constructor: Breadcrumb,\n render: function (seriesModel, api, targetNode, onSelect) {\n var model = seriesModel.getModel('breadcrumb');\n var thisGroup = this.group;\n thisGroup.removeAll();\n\n if (!model.get('show') || !targetNode) {\n return;\n }\n\n var normalStyleModel = model.getModel('itemStyle'); // var emphasisStyleModel = model.getModel('emphasis.itemStyle');\n\n var textStyleModel = normalStyleModel.getModel('textStyle');\n var layoutParam = {\n pos: {\n left: model.get('left'),\n right: model.get('right'),\n top: model.get('top'),\n bottom: model.get('bottom')\n },\n box: {\n width: api.getWidth(),\n height: api.getHeight()\n },\n emptyItemWidth: model.get('emptyItemWidth'),\n totalWidth: 0,\n renderList: []\n };\n\n this._prepare(targetNode, layoutParam, textStyleModel);\n\n this._renderContent(seriesModel, layoutParam, normalStyleModel, textStyleModel, onSelect);\n\n layout.positionElement(thisGroup, layoutParam.pos, layoutParam.box);\n },\n\n /**\n * Prepare render list and total width\n * @private\n */\n _prepare: function (targetNode, layoutParam, textStyleModel) {\n for (var node = targetNode; node; node = node.parentNode) {\n var text = node.getModel().get('name');\n var textRect = textStyleModel.getTextRect(text);\n var itemWidth = Math.max(textRect.width + TEXT_PADDING * 2, layoutParam.emptyItemWidth);\n layoutParam.totalWidth += itemWidth + ITEM_GAP;\n layoutParam.renderList.push({\n node: node,\n text: text,\n width: itemWidth\n });\n }\n },\n\n /**\n * @private\n */\n _renderContent: function (seriesModel, layoutParam, normalStyleModel, textStyleModel, onSelect) {\n // Start rendering.\n var lastX = 0;\n var emptyItemWidth = layoutParam.emptyItemWidth;\n var height = seriesModel.get('breadcrumb.height');\n var availableSize = layout.getAvailableSize(layoutParam.pos, layoutParam.box);\n var totalWidth = layoutParam.totalWidth;\n var renderList = layoutParam.renderList;\n\n for (var i = renderList.length - 1; i >= 0; i--) {\n var item = renderList[i];\n var itemNode = item.node;\n var itemWidth = item.width;\n var text = item.text; // Hdie text and shorten width if necessary.\n\n if (totalWidth > availableSize.width) {\n totalWidth -= itemWidth - emptyItemWidth;\n itemWidth = emptyItemWidth;\n text = null;\n }\n\n var el = new graphic.Polygon({\n shape: {\n points: makeItemPoints(lastX, 0, itemWidth, height, i === renderList.length - 1, i === 0)\n },\n style: zrUtil.defaults(normalStyleModel.getItemStyle(), {\n lineJoin: 'bevel',\n text: text,\n textFill: textStyleModel.getTextColor(),\n textFont: textStyleModel.getFont()\n }),\n z: 10,\n onclick: zrUtil.curry(onSelect, itemNode)\n });\n this.group.add(el);\n packEventData(el, seriesModel, itemNode);\n lastX += itemWidth + ITEM_GAP;\n }\n },\n\n /**\n * @override\n */\n remove: function () {\n this.group.removeAll();\n }\n};\n\nfunction makeItemPoints(x, y, itemWidth, itemHeight, head, tail) {\n var points = [[head ? x : x - ARRAY_LENGTH, y], [x + itemWidth, y], [x + itemWidth, y + itemHeight], [head ? x : x - ARRAY_LENGTH, y + itemHeight]];\n !tail && points.splice(2, 0, [x + itemWidth + ARRAY_LENGTH, y + itemHeight / 2]);\n !head && points.push([x, y + itemHeight / 2]);\n return points;\n} // Package custom mouse event.\n\n\nfunction packEventData(el, seriesModel, itemNode) {\n el.eventData = {\n componentType: 'series',\n componentSubType: 'treemap',\n componentIndex: seriesModel.componentIndex,\n seriesIndex: seriesModel.componentIndex,\n seriesName: seriesModel.name,\n seriesType: 'treemap',\n selfType: 'breadcrumb',\n // Distinguish with click event on treemap node.\n nodeData: {\n dataIndex: itemNode && itemNode.dataIndex,\n name: itemNode && itemNode.name\n },\n treePathInfo: itemNode && wrapTreePathInfo(itemNode, seriesModel)\n };\n}\n\nvar _default = Breadcrumb;\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\nvar SeriesModel = require(\"../../model/Series\");\n\nvar Tree = require(\"../../data/Tree\");\n\nvar Model = require(\"../../model/Model\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\nvar addCommas = _format.addCommas;\n\nvar _treeHelper = require(\"../helper/treeHelper\");\n\nvar wrapTreePathInfo = _treeHelper.wrapTreePathInfo;\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.treemap',\n layoutMode: 'box',\n dependencies: ['grid', 'polar'],\n preventUsingHoverLayer: true,\n\n /**\n * @type {module:echarts/data/Tree~Node}\n */\n _viewRoot: null,\n defaultOption: {\n // Disable progressive rendering\n progressive: 0,\n // center: ['50%', '50%'], // not supported in ec3.\n // size: ['80%', '80%'], // deprecated, compatible with ec2.\n left: 'center',\n top: 'middle',\n right: null,\n bottom: null,\n width: '80%',\n height: '80%',\n sort: true,\n // Can be null or false or true\n // (order by desc default, asc not supported yet (strange effect))\n clipWindow: 'origin',\n // Size of clipped window when zooming. 'origin' or 'fullscreen'\n squareRatio: 0.5 * (1 + Math.sqrt(5)),\n // golden ratio\n leafDepth: null,\n // Nodes on depth from root are regarded as leaves.\n // Count from zero (zero represents only view root).\n drillDownIcon: '▶',\n // Use html character temporarily because it is complicated\n // to align specialized icon. ▷▶❒❐▼✚\n zoomToNodeRatio: 0.32 * 0.32,\n // Be effective when using zoomToNode. Specify the proportion of the\n // target node area in the view area.\n roam: true,\n // true, false, 'scale' or 'zoom', 'move'.\n nodeClick: 'zoomToNode',\n // Leaf node click behaviour: 'zoomToNode', 'link', false.\n // If leafDepth is set and clicking a node which has children but\n // be on left depth, the behaviour would be changing root. Otherwise\n // use behavious defined above.\n animation: true,\n animationDurationUpdate: 900,\n animationEasing: 'quinticInOut',\n breadcrumb: {\n show: true,\n height: 22,\n left: 'center',\n top: 'bottom',\n // right\n // bottom\n emptyItemWidth: 25,\n // Width of empty node.\n itemStyle: {\n color: 'rgba(0,0,0,0.7)',\n //'#5793f3',\n borderColor: 'rgba(255,255,255,0.7)',\n borderWidth: 1,\n shadowColor: 'rgba(150,150,150,1)',\n shadowBlur: 3,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n textStyle: {\n color: '#fff'\n }\n },\n emphasis: {\n textStyle: {}\n }\n },\n label: {\n show: true,\n // Do not use textDistance, for ellipsis rect just the same as treemap node rect.\n distance: 0,\n padding: 5,\n position: 'inside',\n // Can be [5, '5%'] or position stirng like 'insideTopLeft', ...\n // formatter: null,\n color: '#fff',\n ellipsis: true // align\n // verticalAlign\n\n },\n upperLabel: {\n // Label when node is parent.\n show: false,\n position: [0, '50%'],\n height: 20,\n // formatter: null,\n color: '#fff',\n ellipsis: true,\n // align: null,\n verticalAlign: 'middle'\n },\n itemStyle: {\n color: null,\n // Can be 'none' if not necessary.\n colorAlpha: null,\n // Can be 'none' if not necessary.\n colorSaturation: null,\n // Can be 'none' if not necessary.\n borderWidth: 0,\n gapWidth: 0,\n borderColor: '#fff',\n borderColorSaturation: null // If specified, borderColor will be ineffective, and the\n // border color is evaluated by color of current node and\n // borderColorSaturation.\n\n },\n emphasis: {\n upperLabel: {\n show: true,\n position: [0, '50%'],\n color: '#fff',\n ellipsis: true,\n verticalAlign: 'middle'\n }\n },\n visualDimension: 0,\n // Can be 0, 1, 2, 3.\n visualMin: null,\n visualMax: null,\n color: [],\n // + treemapSeries.color should not be modified. Please only modified\n // level[n].color (if necessary).\n // + Specify color list of each level. level[0].color would be global\n // color list if not specified. (see method `setDefault`).\n // + But set as a empty array to forbid fetch color from global palette\n // when using nodeModel.get('color'), otherwise nodes on deep level\n // will always has color palette set and are not able to inherit color\n // from parent node.\n // + TreemapSeries.color can not be set as 'none', otherwise effect\n // legend color fetching (see seriesColor.js).\n colorAlpha: null,\n // Array. Specify color alpha range of each level, like [0.2, 0.8]\n colorSaturation: null,\n // Array. Specify color saturation of each level, like [0.2, 0.5]\n colorMappingBy: 'index',\n // 'value' or 'index' or 'id'.\n visibleMin: 10,\n // If area less than this threshold (unit: pixel^2), node will not\n // be rendered. Only works when sort is 'asc' or 'desc'.\n childrenVisibleMin: null,\n // If area of a node less than this threshold (unit: pixel^2),\n // grandchildren will not show.\n // Why grandchildren? If not grandchildren but children,\n // some siblings show children and some not,\n // the appearance may be mess and not consistent,\n levels: [] // Each item: {\n // visibleMin, itemStyle, visualDimension, label\n // }\n // data: {\n // value: [],\n // children: [],\n // link: 'http://xxx.xxx.xxx',\n // target: 'blank' or 'self'\n // }\n\n },\n\n /**\n * @override\n */\n getInitialData: function (option, ecModel) {\n // Create a virtual root.\n var root = {\n name: option.name,\n children: option.data\n };\n completeTreeValue(root);\n var levels = option.levels || [];\n levels = option.levels = setDefault(levels, ecModel);\n var levelModels = zrUtil.map(levels || [], function (levelDefine) {\n return new Model(levelDefine, this, ecModel);\n }, this); // Make sure always a new tree is created when setOption,\n // in TreemapView, we check whether oldTree === newTree\n // to choose mappings approach among old shapes and new shapes.\n\n var tree = Tree.createTree(root, this, null, beforeLink);\n\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n var levelModel = levelModels[node.depth];\n levelModel && (model.parentModel = levelModel);\n return model;\n });\n }\n\n return tree.data;\n },\n optionUpdated: function () {\n this.resetViewRoot();\n },\n\n /**\n * @override\n * @param {number} dataIndex\n * @param {boolean} [mutipleSeries=false]\n */\n formatTooltip: function (dataIndex) {\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var formattedValue = zrUtil.isArray(value) ? addCommas(value[0]) : addCommas(value);\n var name = data.getName(dataIndex);\n return encodeHTML(name + ': ' + formattedValue);\n },\n\n /**\n * Add tree path to tooltip param\n *\n * @override\n * @param {number} dataIndex\n * @return {Object}\n */\n getDataParams: function (dataIndex) {\n var params = SeriesModel.prototype.getDataParams.apply(this, arguments);\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treePathInfo = wrapTreePathInfo(node, this);\n return params;\n },\n\n /**\n * @public\n * @param {Object} layoutInfo {\n * x: containerGroup x\n * y: containerGroup y\n * width: containerGroup width\n * height: containerGroup height\n * }\n */\n setLayoutInfo: function (layoutInfo) {\n /**\n * @readOnly\n * @type {Object}\n */\n this.layoutInfo = this.layoutInfo || {};\n zrUtil.extend(this.layoutInfo, layoutInfo);\n },\n\n /**\n * @param {string} id\n * @return {number} index\n */\n mapIdToIndex: function (id) {\n // A feature is implemented:\n // index is monotone increasing with the sequence of\n // input id at the first time.\n // This feature can make sure that each data item and its\n // mapped color have the same index between data list and\n // color list at the beginning, which is useful for user\n // to adjust data-color mapping.\n\n /**\n * @private\n * @type {Object}\n */\n var idIndexMap = this._idIndexMap;\n\n if (!idIndexMap) {\n idIndexMap = this._idIndexMap = zrUtil.createHashMap();\n /**\n * @private\n * @type {number}\n */\n\n this._idIndexMapCount = 0;\n }\n\n var index = idIndexMap.get(id);\n\n if (index == null) {\n idIndexMap.set(id, index = this._idIndexMapCount++);\n }\n\n return index;\n },\n getViewRoot: function () {\n return this._viewRoot;\n },\n\n /**\n * @param {module:echarts/data/Tree~Node} [viewRoot]\n */\n resetViewRoot: function (viewRoot) {\n viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot;\n var root = this.getRawData().tree.root;\n\n if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) {\n this._viewRoot = root;\n }\n }\n});\n/**\n * @param {Object} dataNode\n */\n\n\nfunction completeTreeValue(dataNode) {\n // Postorder travel tree.\n // If value of none-leaf node is not set,\n // calculate it by suming up the value of all children.\n var sum = 0;\n zrUtil.each(dataNode.children, function (child) {\n completeTreeValue(child);\n var childValue = child.value;\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n sum += childValue;\n });\n var thisValue = dataNode.value;\n\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n } // Value should not less than 0.\n\n\n if (thisValue < 0) {\n thisValue = 0;\n }\n\n zrUtil.isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue;\n}\n/**\n * set default to level configuration\n */\n\n\nfunction setDefault(levels, ecModel) {\n var globalColorList = ecModel.get('color');\n\n if (!globalColorList) {\n return;\n }\n\n levels = levels || [];\n var hasColorDefine;\n zrUtil.each(levels, function (levelDefine) {\n var model = new Model(levelDefine);\n var modelColor = model.get('color');\n\n if (model.get('itemStyle.color') || modelColor && modelColor !== 'none') {\n hasColorDefine = true;\n }\n });\n\n if (!hasColorDefine) {\n var level0 = levels[0] || (levels[0] = {});\n level0.color = globalColorList.slice();\n }\n\n return levels;\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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar DataDiffer = require(\"../../data/DataDiffer\");\n\nvar helper = require(\"../helper/treeHelper\");\n\nvar Breadcrumb = require(\"./Breadcrumb\");\n\nvar RoamController = require(\"../../component/helper/RoamController\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar animationUtil = require(\"../../util/animation\");\n\nvar makeStyleMapper = require(\"../../model/mixin/makeStyleMapper\");\n\nvar _format = require(\"../../util/format\");\n\nvar windowOpen = _format.windowOpen;\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 bind = zrUtil.bind;\nvar Group = graphic.Group;\nvar Rect = graphic.Rect;\nvar each = zrUtil.each;\nvar DRAG_THRESHOLD = 3;\nvar PATH_LABEL_NOAMAL = ['label'];\nvar PATH_LABEL_EMPHASIS = ['emphasis', 'label'];\nvar PATH_UPPERLABEL_NORMAL = ['upperLabel'];\nvar PATH_UPPERLABEL_EMPHASIS = ['emphasis', 'upperLabel'];\nvar Z_BASE = 10; // Should bigger than every z.\n\nvar Z_BG = 1;\nvar Z_CONTENT = 2;\nvar getItemStyleEmphasis = makeStyleMapper([['fill', 'color'], // `borderColor` and `borderWidth` has been occupied,\n// so use `stroke` to indicate the stroke of the rect.\n['stroke', 'strokeColor'], ['lineWidth', 'strokeWidth'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor']]);\n\nvar getItemStyleNormal = function (model) {\n // Normal style props should include emphasis style props.\n var itemStyle = getItemStyleEmphasis(model); // Clear styles set by emphasis.\n\n itemStyle.stroke = itemStyle.fill = itemStyle.lineWidth = null;\n return itemStyle;\n};\n\nvar _default = echarts.extendChartView({\n type: 'treemap',\n\n /**\n * @override\n */\n init: function (o, api) {\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this._containerGroup;\n /**\n * @private\n * @type {Object.<string, Array.<module:zrender/container/Group>>}\n */\n\n this._storage = createStorage();\n /**\n * @private\n * @type {module:echarts/data/Tree}\n */\n\n this._oldTree;\n /**\n * @private\n * @type {module:echarts/chart/treemap/Breadcrumb}\n */\n\n this._breadcrumb;\n /**\n * @private\n * @type {module:echarts/component/helper/RoamController}\n */\n\n this._controller;\n /**\n * 'ready', 'animating'\n * @private\n */\n\n this._state = 'ready';\n },\n\n /**\n * @override\n */\n render: function (seriesModel, ecModel, api, payload) {\n var models = ecModel.findComponents({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n });\n\n if (zrUtil.indexOf(models, seriesModel) < 0) {\n return;\n }\n\n this.seriesModel = seriesModel;\n this.api = api;\n this.ecModel = ecModel;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, seriesModel);\n var payloadType = payload && payload.type;\n var layoutInfo = seriesModel.layoutInfo;\n var isInit = !this._oldTree;\n var thisStorage = this._storage; // Mark new root when action is treemapRootToNode.\n\n var reRoot = payloadType === 'treemapRootToNode' && targetInfo && thisStorage ? {\n rootNodeGroup: thisStorage.nodeGroup[targetInfo.node.getRawIndex()],\n direction: payload.direction\n } : null;\n\n var containerGroup = this._giveContainerGroup(layoutInfo);\n\n var renderResult = this._doRender(containerGroup, seriesModel, reRoot);\n\n !isInit && (!payloadType || payloadType === 'treemapZoomToNode' || payloadType === 'treemapRootToNode') ? this._doAnimation(containerGroup, renderResult, seriesModel, reRoot) : renderResult.renderFinally();\n\n this._resetController(api);\n\n this._renderBreadcrumb(seriesModel, api, targetInfo);\n },\n\n /**\n * @private\n */\n _giveContainerGroup: function (layoutInfo) {\n var containerGroup = this._containerGroup;\n\n if (!containerGroup) {\n // FIXME\n // 加一层containerGroup是为了clip,但是现在clip功能并没有实现。\n containerGroup = this._containerGroup = new Group();\n\n this._initEvents(containerGroup);\n\n this.group.add(containerGroup);\n }\n\n containerGroup.attr('position', [layoutInfo.x, layoutInfo.y]);\n return containerGroup;\n },\n\n /**\n * @private\n */\n _doRender: function (containerGroup, seriesModel, reRoot) {\n var thisTree = seriesModel.getData().tree;\n var oldTree = this._oldTree; // Clear last shape records.\n\n var lastsForAnimation = createStorage();\n var thisStorage = createStorage();\n var oldStorage = this._storage;\n var willInvisibleEls = [];\n var doRenderNode = zrUtil.curry(renderNode, seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls); // Notice: when thisTree and oldTree are the same tree (see list.cloneShallow),\n // the oldTree is actually losted, so we can not find all of the old graphic\n // elements from tree. So we use this stragegy: make element storage, move\n // from old storage to new storage, clear old storage.\n\n dualTravel(thisTree.root ? [thisTree.root] : [], oldTree && oldTree.root ? [oldTree.root] : [], containerGroup, thisTree === oldTree || !oldTree, 0); // Process all removing.\n\n var willDeleteEls = clearStorage(oldStorage);\n this._oldTree = thisTree;\n this._storage = thisStorage;\n return {\n lastsForAnimation: lastsForAnimation,\n willDeleteEls: willDeleteEls,\n renderFinally: renderFinally\n };\n\n function dualTravel(thisViewChildren, oldViewChildren, parentGroup, sameTree, depth) {\n // When 'render' is triggered by action,\n // 'this' and 'old' may be the same tree,\n // we use rawIndex in that case.\n if (sameTree) {\n oldViewChildren = thisViewChildren;\n each(thisViewChildren, function (child, index) {\n !child.isRemoved() && processNode(index, index);\n });\n } // Diff hierarchically (diff only in each subtree, but not whole).\n // because, consistency of view is important.\n else {\n new DataDiffer(oldViewChildren, thisViewChildren, getKey, getKey).add(processNode).update(processNode).remove(zrUtil.curry(processNode, null)).execute();\n }\n\n function getKey(node) {\n // Identify by name or raw index.\n return node.getId();\n }\n\n function processNode(newIndex, oldIndex) {\n var thisNode = newIndex != null ? thisViewChildren[newIndex] : null;\n var oldNode = oldIndex != null ? oldViewChildren[oldIndex] : null;\n var group = doRenderNode(thisNode, oldNode, parentGroup, depth);\n group && dualTravel(thisNode && thisNode.viewChildren || [], oldNode && oldNode.viewChildren || [], group, sameTree, depth + 1);\n }\n }\n\n function clearStorage(storage) {\n var willDeleteEls = createStorage();\n storage && each(storage, function (store, storageName) {\n var delEls = willDeleteEls[storageName];\n each(store, function (el) {\n el && (delEls.push(el), el.__tmWillDelete = 1);\n });\n });\n return willDeleteEls;\n }\n\n function renderFinally() {\n each(willDeleteEls, function (els) {\n each(els, function (el) {\n el.parent && el.parent.remove(el);\n });\n });\n each(willInvisibleEls, function (el) {\n el.invisible = true; // Setting invisible is for optimizing, so no need to set dirty,\n // just mark as invisible.\n\n el.dirty();\n });\n }\n },\n\n /**\n * @private\n */\n _doAnimation: function (containerGroup, renderResult, seriesModel, reRoot) {\n if (!seriesModel.get('animation')) {\n return;\n }\n\n var duration = seriesModel.get('animationDurationUpdate');\n var easing = seriesModel.get('animationEasing');\n var animationWrap = animationUtil.createWrap(); // Make delete animations.\n\n each(renderResult.willDeleteEls, function (store, storageName) {\n each(store, function (el, rawIndex) {\n if (el.invisible) {\n return;\n }\n\n var parent = el.parent; // Always has parent, and parent is nodeGroup.\n\n var target;\n\n if (reRoot && reRoot.direction === 'drillDown') {\n target = parent === reRoot.rootNodeGroup // This is the content element of view root.\n // Only `content` will enter this branch, because\n // `background` and `nodeGroup` will not be deleted.\n ? {\n shape: {\n x: 0,\n y: 0,\n width: parent.__tmNodeWidth,\n height: parent.__tmNodeHeight\n },\n style: {\n opacity: 0\n } // Others.\n\n } : {\n style: {\n opacity: 0\n }\n };\n } else {\n var targetX = 0;\n var targetY = 0;\n\n if (!parent.__tmWillDelete) {\n // Let node animate to right-bottom corner, cooperating with fadeout,\n // which is appropriate for user understanding.\n // Divided by 2 for reRoot rolling up effect.\n targetX = parent.__tmNodeWidth / 2;\n targetY = parent.__tmNodeHeight / 2;\n }\n\n target = storageName === 'nodeGroup' ? {\n position: [targetX, targetY],\n style: {\n opacity: 0\n }\n } : {\n shape: {\n x: targetX,\n y: targetY,\n width: 0,\n height: 0\n },\n style: {\n opacity: 0\n }\n };\n }\n\n target && animationWrap.add(el, target, duration, easing);\n });\n }); // Make other animations\n\n each(this._storage, function (store, storageName) {\n each(store, function (el, rawIndex) {\n var last = renderResult.lastsForAnimation[storageName][rawIndex];\n var target = {};\n\n if (!last) {\n return;\n }\n\n if (storageName === 'nodeGroup') {\n if (last.old) {\n target.position = el.position.slice();\n el.attr('position', last.old);\n }\n } else {\n if (last.old) {\n target.shape = zrUtil.extend({}, el.shape);\n el.setShape(last.old);\n }\n\n if (last.fadein) {\n el.setStyle('opacity', 0);\n target.style = {\n opacity: 1\n };\n } // When animation is stopped for succedent animation starting,\n // el.style.opacity might not be 1\n else if (el.style.opacity !== 1) {\n target.style = {\n opacity: 1\n };\n }\n }\n\n animationWrap.add(el, target, duration, easing);\n });\n }, this);\n this._state = 'animating';\n animationWrap.done(bind(function () {\n this._state = 'ready';\n renderResult.renderFinally();\n }, this)).start();\n },\n\n /**\n * @private\n */\n _resetController: function (api) {\n var controller = this._controller; // Init controller.\n\n if (!controller) {\n controller = this._controller = new RoamController(api.getZr());\n controller.enable(this.seriesModel.get('roam'));\n controller.on('pan', bind(this._onPan, this));\n controller.on('zoom', bind(this._onZoom, this));\n }\n\n var rect = new BoundingRect(0, 0, api.getWidth(), api.getHeight());\n controller.setPointerChecker(function (e, x, y) {\n return rect.contain(x, y);\n });\n },\n\n /**\n * @private\n */\n _clearController: function () {\n var controller = this._controller;\n\n if (controller) {\n controller.dispose();\n controller = null;\n }\n },\n\n /**\n * @private\n */\n _onPan: function (e) {\n if (this._state !== 'animating' && (Math.abs(e.dx) > DRAG_THRESHOLD || Math.abs(e.dy) > DRAG_THRESHOLD)) {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n\n if (!root) {\n return;\n }\n\n var rootLayout = root.getLayout();\n\n if (!rootLayout) {\n return;\n }\n\n this.api.dispatchAction({\n type: 'treemapMove',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rootLayout.x + e.dx,\n y: rootLayout.y + e.dy,\n width: rootLayout.width,\n height: rootLayout.height\n }\n });\n }\n },\n\n /**\n * @private\n */\n _onZoom: function (e) {\n var mouseX = e.originX;\n var mouseY = e.originY;\n\n if (this._state !== 'animating') {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n\n if (!root) {\n return;\n }\n\n var rootLayout = root.getLayout();\n\n if (!rootLayout) {\n return;\n }\n\n var rect = new BoundingRect(rootLayout.x, rootLayout.y, rootLayout.width, rootLayout.height);\n var layoutInfo = this.seriesModel.layoutInfo; // Transform mouse coord from global to containerGroup.\n\n mouseX -= layoutInfo.x;\n mouseY -= layoutInfo.y; // Scale root bounding rect.\n\n var m = matrix.create();\n matrix.translate(m, m, [-mouseX, -mouseY]);\n matrix.scale(m, m, [e.scale, e.scale]);\n matrix.translate(m, m, [mouseX, mouseY]);\n rect.applyTransform(m);\n this.api.dispatchAction({\n type: 'treemapRender',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n }\n });\n }\n },\n\n /**\n * @private\n */\n _initEvents: function (containerGroup) {\n containerGroup.on('click', function (e) {\n if (this._state !== 'ready') {\n return;\n }\n\n var nodeClick = this.seriesModel.get('nodeClick', true);\n\n if (!nodeClick) {\n return;\n }\n\n var targetInfo = this.findTarget(e.offsetX, e.offsetY);\n\n if (!targetInfo) {\n return;\n }\n\n var node = targetInfo.node;\n\n if (node.getLayout().isLeafRoot) {\n this._rootToNode(targetInfo);\n } else {\n if (nodeClick === 'zoomToNode') {\n this._zoomToNode(targetInfo);\n } else if (nodeClick === 'link') {\n var itemModel = node.hostTree.data.getItemModel(node.dataIndex);\n var link = itemModel.get('link', true);\n var linkTarget = itemModel.get('target', true) || 'blank';\n link && windowOpen(link, linkTarget);\n }\n }\n }, this);\n },\n\n /**\n * @private\n */\n _renderBreadcrumb: function (seriesModel, api, targetInfo) {\n if (!targetInfo) {\n targetInfo = seriesModel.get('leafDepth', true) != null ? {\n node: seriesModel.getViewRoot() // FIXME\n // better way?\n // Find breadcrumb tail on center of containerGroup.\n\n } : this.findTarget(api.getWidth() / 2, api.getHeight() / 2);\n\n if (!targetInfo) {\n targetInfo = {\n node: seriesModel.getData().tree.root\n };\n }\n }\n\n (this._breadcrumb || (this._breadcrumb = new Breadcrumb(this.group))).render(seriesModel, api, targetInfo.node, bind(onSelect, this));\n\n function onSelect(node) {\n if (this._state !== 'animating') {\n helper.aboveViewRoot(seriesModel.getViewRoot(), node) ? this._rootToNode({\n node: node\n }) : this._zoomToNode({\n node: node\n });\n }\n }\n },\n\n /**\n * @override\n */\n remove: function () {\n this._clearController();\n\n this._containerGroup && this._containerGroup.removeAll();\n this._storage = createStorage();\n this._state = 'ready';\n this._breadcrumb && this._breadcrumb.remove();\n },\n dispose: function () {\n this._clearController();\n },\n\n /**\n * @private\n */\n _zoomToNode: function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapZoomToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n },\n\n /**\n * @private\n */\n _rootToNode: function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapRootToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n },\n\n /**\n * @public\n * @param {number} x Global coord x.\n * @param {number} y Global coord y.\n * @return {Object} info If not found, return undefined;\n * @return {number} info.node Target node.\n * @return {number} info.offsetX x refer to target node.\n * @return {number} info.offsetY y refer to target node.\n */\n findTarget: function (x, y) {\n var targetInfo;\n var viewRoot = this.seriesModel.getViewRoot();\n viewRoot.eachNode({\n attr: 'viewChildren',\n order: 'preorder'\n }, function (node) {\n var bgEl = this._storage.background[node.getRawIndex()]; // If invisible, there might be no element.\n\n\n if (bgEl) {\n var point = bgEl.transformCoordToLocal(x, y);\n var shape = bgEl.shape; // For performance consideration, dont use 'getBoundingRect'.\n\n if (shape.x <= point[0] && point[0] <= shape.x + shape.width && shape.y <= point[1] && point[1] <= shape.y + shape.height) {\n targetInfo = {\n node: node,\n offsetX: point[0],\n offsetY: point[1]\n };\n } else {\n return false; // Suppress visit subtree.\n }\n }\n }, this);\n return targetInfo;\n }\n});\n/**\n * @inner\n */\n\n\nfunction createStorage() {\n return {\n nodeGroup: [],\n background: [],\n content: []\n };\n}\n/**\n * @inner\n * @return Return undefined means do not travel further.\n */\n\n\nfunction renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth) {\n // Whether under viewRoot.\n if (!thisNode) {\n // Deleting nodes will be performed finally. This method just find\n // element from old storage, or create new element, set them to new\n // storage, and set styles.\n return;\n } // -------------------------------------------------------------------\n // Start of closure variables available in \"Procedures in renderNode\".\n\n\n var thisLayout = thisNode.getLayout();\n var data = seriesModel.getData(); // Only for enabling highlight/downplay. Clear firstly.\n // Because some node will not be rendered.\n\n data.setItemGraphicEl(thisNode.dataIndex, null);\n\n if (!thisLayout || !thisLayout.isInView) {\n return;\n }\n\n var thisWidth = thisLayout.width;\n var thisHeight = thisLayout.height;\n var borderWidth = thisLayout.borderWidth;\n var thisInvisible = thisLayout.invisible;\n var thisRawIndex = thisNode.getRawIndex();\n var oldRawIndex = oldNode && oldNode.getRawIndex();\n var thisViewChildren = thisNode.viewChildren;\n var upperHeight = thisLayout.upperHeight;\n var isParent = thisViewChildren && thisViewChildren.length;\n var itemStyleNormalModel = thisNode.getModel('itemStyle');\n var itemStyleEmphasisModel = thisNode.getModel('emphasis.itemStyle'); // End of closure ariables available in \"Procedures in renderNode\".\n // -----------------------------------------------------------------\n // Node group\n\n var group = giveGraphic('nodeGroup', Group);\n\n if (!group) {\n return;\n }\n\n parentGroup.add(group); // x,y are not set when el is above view root.\n\n group.attr('position', [thisLayout.x || 0, thisLayout.y || 0]);\n group.__tmNodeWidth = thisWidth;\n group.__tmNodeHeight = thisHeight;\n\n if (thisLayout.isAboveViewRoot) {\n return group;\n }\n\n var nodeModel = thisNode.getModel(); // Background\n\n var bg = giveGraphic('background', Rect, depth, Z_BG);\n bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight); // No children, render content.\n\n if (isParent) {\n // Because of the implementation about \"traverse\" in graphic hover style, we\n // can not set hover listener on the \"group\" of non-leaf node. Otherwise the\n // hover event from the descendents will be listenered.\n if (graphic.isHighDownDispatcher(group)) {\n graphic.setAsHighDownDispatcher(group, false);\n }\n\n if (bg) {\n graphic.setAsHighDownDispatcher(bg, true); // Only for enabling highlight/downplay.\n\n data.setItemGraphicEl(thisNode.dataIndex, bg);\n }\n } else {\n var content = giveGraphic('content', Rect, depth, Z_CONTENT);\n content && renderContent(group, content);\n\n if (bg && graphic.isHighDownDispatcher(bg)) {\n graphic.setAsHighDownDispatcher(bg, false);\n }\n\n graphic.setAsHighDownDispatcher(group, true); // Only for enabling highlight/downplay.\n\n data.setItemGraphicEl(thisNode.dataIndex, group);\n }\n\n return group; // ----------------------------\n // | Procedures in renderNode |\n // ----------------------------\n\n function renderBackground(group, bg, useUpperLabel) {\n // For tooltip.\n bg.dataIndex = thisNode.dataIndex;\n bg.seriesIndex = seriesModel.seriesIndex;\n bg.setShape({\n x: 0,\n y: 0,\n width: thisWidth,\n height: thisHeight\n });\n\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(bg);\n } else {\n bg.invisible = false;\n var visualBorderColor = thisNode.getVisual('borderColor', true);\n var emphasisBorderColor = itemStyleEmphasisModel.get('borderColor');\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualBorderColor;\n var emphasisStyle = getItemStyleEmphasis(itemStyleEmphasisModel);\n emphasisStyle.fill = emphasisBorderColor;\n\n if (useUpperLabel) {\n var upperLabelWidth = thisWidth - 2 * borderWidth;\n prepareText(normalStyle, emphasisStyle, visualBorderColor, upperLabelWidth, upperHeight, {\n x: borderWidth,\n y: 0,\n width: upperLabelWidth,\n height: upperHeight\n });\n } // For old bg.\n else {\n normalStyle.text = emphasisStyle.text = null;\n }\n\n bg.setStyle(normalStyle);\n graphic.setElementHoverStyle(bg, emphasisStyle);\n }\n\n group.add(bg);\n }\n\n function renderContent(group, content) {\n // For tooltip.\n content.dataIndex = thisNode.dataIndex;\n content.seriesIndex = seriesModel.seriesIndex;\n var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0);\n var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0);\n content.culling = true;\n content.setShape({\n x: borderWidth,\n y: borderWidth,\n width: contentWidth,\n height: contentHeight\n });\n\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(content);\n } else {\n content.invisible = false;\n var visualColor = thisNode.getVisual('color', true);\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualColor;\n var emphasisStyle = getItemStyleEmphasis(itemStyleEmphasisModel);\n prepareText(normalStyle, emphasisStyle, visualColor, contentWidth, contentHeight);\n content.setStyle(normalStyle);\n graphic.setElementHoverStyle(content, emphasisStyle);\n }\n\n group.add(content);\n }\n\n function processInvisible(element) {\n // Delay invisible setting utill animation finished,\n // avoid element vanish suddenly before animation.\n !element.invisible && willInvisibleEls.push(element);\n }\n\n function prepareText(normalStyle, emphasisStyle, visualColor, width, height, upperLabelRect) {\n var defaultText = nodeModel.get('name');\n var normalLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL);\n var emphasisLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_EMPHASIS : PATH_LABEL_EMPHASIS);\n var isShow = normalLabelModel.getShallow('show');\n graphic.setLabelStyle(normalStyle, emphasisStyle, normalLabelModel, emphasisLabelModel, {\n defaultText: isShow ? defaultText : null,\n autoColor: visualColor,\n isRectText: true,\n labelFetcher: seriesModel,\n labelDataIndex: thisNode.dataIndex,\n labelProp: upperLabelRect ? 'upperLabel' : 'label'\n });\n addDrillDownIcon(normalStyle, upperLabelRect, thisLayout);\n addDrillDownIcon(emphasisStyle, upperLabelRect, thisLayout);\n upperLabelRect && (normalStyle.textRect = zrUtil.clone(upperLabelRect));\n normalStyle.truncate = isShow && normalLabelModel.get('ellipsis') ? {\n outerWidth: width,\n outerHeight: height,\n minChar: 2\n } : null;\n }\n\n function addDrillDownIcon(style, upperLabelRect, thisLayout) {\n var text = style.text;\n\n if (!upperLabelRect && thisLayout.isLeafRoot && text != null) {\n var iconChar = seriesModel.get('drillDownIcon', true);\n style.text = iconChar ? iconChar + ' ' + text : text;\n }\n }\n\n function giveGraphic(storageName, Ctor, depth, z) {\n var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex];\n var lasts = lastsForAnimation[storageName];\n\n if (element) {\n // Remove from oldStorage\n oldStorage[storageName][oldRawIndex] = null;\n prepareAnimationWhenHasOld(lasts, element, storageName);\n } // If invisible and no old element, do not create new element (for optimizing).\n else if (!thisInvisible) {\n element = new Ctor({\n z: calculateZ(depth, z)\n });\n element.__tmDepth = depth;\n element.__tmStorageName = storageName;\n prepareAnimationWhenNoOld(lasts, element, storageName);\n } // Set to thisStorage\n\n\n return thisStorage[storageName][thisRawIndex] = element;\n }\n\n function prepareAnimationWhenHasOld(lasts, element, storageName) {\n var lastCfg = lasts[thisRawIndex] = {};\n lastCfg.old = storageName === 'nodeGroup' ? element.position.slice() : zrUtil.extend({}, element.shape);\n } // If a element is new, we need to find the animation start point carefully,\n // otherwise it will looks strange when 'zoomToNode'.\n\n\n function prepareAnimationWhenNoOld(lasts, element, storageName) {\n var lastCfg = lasts[thisRawIndex] = {};\n var parentNode = thisNode.parentNode;\n\n if (parentNode && (!reRoot || reRoot.direction === 'drillDown')) {\n var parentOldX = 0;\n var parentOldY = 0; // New nodes appear from right-bottom corner in 'zoomToNode' animation.\n // For convenience, get old bounding rect from background.\n\n var parentOldBg = lastsForAnimation.background[parentNode.getRawIndex()];\n\n if (!reRoot && parentOldBg && parentOldBg.old) {\n parentOldX = parentOldBg.old.width;\n parentOldY = parentOldBg.old.height;\n } // When no parent old shape found, its parent is new too,\n // so we can just use {x:0, y:0}.\n\n\n lastCfg.old = storageName === 'nodeGroup' ? [0, parentOldY] : {\n x: parentOldX,\n y: parentOldY,\n width: 0,\n height: 0\n };\n } // Fade in, user can be aware that these nodes are new.\n\n\n lastCfg.fadein = storageName !== 'nodeGroup';\n }\n} // We can not set all backgroud with the same z, Because the behaviour of\n// drill down and roll up differ background creation sequence from tree\n// hierarchy sequence, which cause that lowser background element overlap\n// upper ones. So we calculate z based on depth.\n// Moreover, we try to shrink down z interval to [0, 1] to avoid that\n// treemap with large z overlaps other components.\n\n\nfunction calculateZ(depth, zInLevel) {\n var zb = depth * Z_BASE + zInLevel;\n return (zb - 1) / zb;\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 helper = require(\"../helper/treeHelper\");\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\n/**\n * @file Treemap action\n */\nvar noop = function () {};\n\nvar actionTypes = ['treemapZoomToNode', 'treemapRender', 'treemapMove'];\n\nfor (var i = 0; i < actionTypes.length; i++) {\n echarts.registerAction({\n type: actionTypes[i],\n update: 'updateView'\n }, noop);\n}\n\necharts.registerAction({\n type: 'treemapRootToNode',\n update: 'updateView'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n }, handleRootToNode);\n\n function handleRootToNode(model, index) {\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, model);\n\n if (targetInfo) {\n var originViewRoot = model.getViewRoot();\n\n if (originViewRoot) {\n payload.direction = helper.aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown';\n }\n\n model.resetViewRoot(targetInfo.node);\n }\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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\nvar MAX_SAFE_INTEGER = _number.MAX_SAFE_INTEGER;\n\nvar layout = require(\"../../util/layout\");\n\nvar helper = require(\"../helper/treeHelper\");\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\n/*\n* A third-party license is embeded for some of the code in this file:\n* The treemap layout implementation was originally copied from\n* \"d3.js\" with some modifications made for this project.\n* (See more details in the comment of the method \"squarify\" below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* </licenses/LICENSE-d3>).\n*/\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nvar retrieveValue = zrUtil.retrieve;\nvar each = zrUtil.each;\nvar PATH_BORDER_WIDTH = ['itemStyle', 'borderWidth'];\nvar PATH_GAP_WIDTH = ['itemStyle', 'gapWidth'];\nvar PATH_UPPER_LABEL_SHOW = ['upperLabel', 'show'];\nvar PATH_UPPER_LABEL_HEIGHT = ['upperLabel', 'height'];\n/**\n * @public\n */\n\nvar _default = {\n seriesType: 'treemap',\n reset: function (seriesModel, ecModel, api, payload) {\n // Layout result in each node:\n // {x, y, width, height, area, borderWidth}\n var ecWidth = api.getWidth();\n var ecHeight = api.getHeight();\n var seriesOption = seriesModel.option;\n var layoutInfo = layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n var size = seriesOption.size || []; // Compatible with ec2.\n\n var containerWidth = parsePercent(retrieveValue(layoutInfo.width, size[0]), ecWidth);\n var containerHeight = parsePercent(retrieveValue(layoutInfo.height, size[1]), ecHeight); // Fetch payload info.\n\n var payloadType = payload && payload.type;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, seriesModel);\n var rootRect = payloadType === 'treemapRender' || payloadType === 'treemapMove' ? payload.rootRect : null;\n var viewRoot = seriesModel.getViewRoot();\n var viewAbovePath = helper.getPathToRoot(viewRoot);\n\n if (payloadType !== 'treemapMove') {\n var rootSize = payloadType === 'treemapZoomToNode' ? estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) : rootRect ? [rootRect.width, rootRect.height] : [containerWidth, containerHeight];\n var sort = seriesOption.sort;\n\n if (sort && sort !== 'asc' && sort !== 'desc') {\n sort = 'desc';\n }\n\n var options = {\n squareRatio: seriesOption.squareRatio,\n sort: sort,\n leafDepth: seriesOption.leafDepth\n }; // layout should be cleared because using updateView but not update.\n\n viewRoot.hostTree.clearLayouts(); // TODO\n // optimize: if out of view clip, do not layout.\n // But take care that if do not render node out of view clip,\n // how to calculate start po\n\n var viewRootLayout = {\n x: 0,\n y: 0,\n width: rootSize[0],\n height: rootSize[1],\n area: rootSize[0] * rootSize[1]\n };\n viewRoot.setLayout(viewRootLayout);\n squarify(viewRoot, options, false, 0); // Supplement layout.\n\n var viewRootLayout = viewRoot.getLayout();\n each(viewAbovePath, function (node, index) {\n var childValue = (viewAbovePath[index + 1] || viewRoot).getValue();\n node.setLayout(zrUtil.extend({\n dataExtent: [childValue, childValue],\n borderWidth: 0,\n upperHeight: 0\n }, viewRootLayout));\n });\n }\n\n var treeRoot = seriesModel.getData().tree.root;\n treeRoot.setLayout(calculateRootPosition(layoutInfo, rootRect, targetInfo), true);\n seriesModel.setLayoutInfo(layoutInfo); // FIXME\n // 现在没有clip功能,暂时取ec高宽。\n\n prunning(treeRoot, // Transform to base element coordinate system.\n new BoundingRect(-layoutInfo.x, -layoutInfo.y, ecWidth, ecHeight), viewAbovePath, viewRoot, 0);\n }\n};\n/**\n * Layout treemap with squarify algorithm.\n * The original presentation of this algorithm\n * was made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk\n * <https://graphics.ethz.ch/teaching/scivis_common/Literature/squarifiedTreeMaps.pdf>.\n * The implementation of this algorithm was originally copied from \"d3.js\"\n * <https://github.com/d3/d3/blob/9cc9a875e636a1dcf36cc1e07bdf77e1ad6e2c74/src/layout/treemap.js>\n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * @protected\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {Object} options\n * @param {string} options.sort 'asc' or 'desc'\n * @param {number} options.squareRatio\n * @param {boolean} hideChildren\n * @param {number} depth\n */\n\nfunction squarify(node, options, hideChildren, depth) {\n var width;\n var height;\n\n if (node.isRemoved()) {\n return;\n }\n\n var thisLayout = node.getLayout();\n width = thisLayout.width;\n height = thisLayout.height; // Considering border and gap\n\n var nodeModel = node.getModel();\n var borderWidth = nodeModel.get(PATH_BORDER_WIDTH);\n var halfGapWidth = nodeModel.get(PATH_GAP_WIDTH) / 2;\n var upperLabelHeight = getUpperLabelHeight(nodeModel);\n var upperHeight = Math.max(borderWidth, upperLabelHeight);\n var layoutOffset = borderWidth - halfGapWidth;\n var layoutOffsetUpper = upperHeight - halfGapWidth;\n var nodeModel = node.getModel();\n node.setLayout({\n borderWidth: borderWidth,\n upperHeight: upperHeight,\n upperLabelHeight: upperLabelHeight\n }, true);\n width = mathMax(width - 2 * layoutOffset, 0);\n height = mathMax(height - layoutOffset - layoutOffsetUpper, 0);\n var totalArea = width * height;\n var viewChildren = initChildren(node, nodeModel, totalArea, options, hideChildren, depth);\n\n if (!viewChildren.length) {\n return;\n }\n\n var rect = {\n x: layoutOffset,\n y: layoutOffsetUpper,\n width: width,\n height: height\n };\n var rowFixedLength = mathMin(width, height);\n var best = Infinity; // the best row score so far\n\n var row = [];\n row.area = 0;\n\n for (var i = 0, len = viewChildren.length; i < len;) {\n var child = viewChildren[i];\n row.push(child);\n row.area += child.getLayout().area;\n var score = worst(row, rowFixedLength, options.squareRatio); // continue with this orientation\n\n if (score <= best) {\n i++;\n best = score;\n } // abort, and try a different orientation\n else {\n row.area -= row.pop().getLayout().area;\n position(row, rowFixedLength, rect, halfGapWidth, false);\n rowFixedLength = mathMin(rect.width, rect.height);\n row.length = row.area = 0;\n best = Infinity;\n }\n }\n\n if (row.length) {\n position(row, rowFixedLength, rect, halfGapWidth, true);\n }\n\n if (!hideChildren) {\n var childrenVisibleMin = nodeModel.get('childrenVisibleMin');\n\n if (childrenVisibleMin != null && totalArea < childrenVisibleMin) {\n hideChildren = true;\n }\n }\n\n for (var i = 0, len = viewChildren.length; i < len; i++) {\n squarify(viewChildren[i], options, hideChildren, depth + 1);\n }\n}\n/**\n * Set area to each child, and calculate data extent for visual coding.\n */\n\n\nfunction initChildren(node, nodeModel, totalArea, options, hideChildren, depth) {\n var viewChildren = node.children || [];\n var orderBy = options.sort;\n orderBy !== 'asc' && orderBy !== 'desc' && (orderBy = null);\n var overLeafDepth = options.leafDepth != null && options.leafDepth <= depth; // leafDepth has higher priority.\n\n if (hideChildren && !overLeafDepth) {\n return node.viewChildren = [];\n } // Sort children, order by desc.\n\n\n viewChildren = zrUtil.filter(viewChildren, function (child) {\n return !child.isRemoved();\n });\n sort(viewChildren, orderBy);\n var info = statistic(nodeModel, viewChildren, orderBy);\n\n if (info.sum === 0) {\n return node.viewChildren = [];\n }\n\n info.sum = filterByThreshold(nodeModel, totalArea, info.sum, orderBy, viewChildren);\n\n if (info.sum === 0) {\n return node.viewChildren = [];\n } // Set area to each child.\n\n\n for (var i = 0, len = viewChildren.length; i < len; i++) {\n var area = viewChildren[i].getValue() / info.sum * totalArea; // Do not use setLayout({...}, true), because it is needed to clear last layout.\n\n viewChildren[i].setLayout({\n area: area\n });\n }\n\n if (overLeafDepth) {\n viewChildren.length && node.setLayout({\n isLeafRoot: true\n }, true);\n viewChildren.length = 0;\n }\n\n node.viewChildren = viewChildren;\n node.setLayout({\n dataExtent: info.dataExtent\n }, true);\n return viewChildren;\n}\n/**\n * Consider 'visibleMin'. Modify viewChildren and get new sum.\n */\n\n\nfunction filterByThreshold(nodeModel, totalArea, sum, orderBy, orderedChildren) {\n // visibleMin is not supported yet when no option.sort.\n if (!orderBy) {\n return sum;\n }\n\n var visibleMin = nodeModel.get('visibleMin');\n var len = orderedChildren.length;\n var deletePoint = len; // Always travel from little value to big value.\n\n for (var i = len - 1; i >= 0; i--) {\n var value = orderedChildren[orderBy === 'asc' ? len - i - 1 : i].getValue();\n\n if (value / sum * totalArea < visibleMin) {\n deletePoint = i;\n sum -= value;\n }\n }\n\n orderBy === 'asc' ? orderedChildren.splice(0, len - deletePoint) : orderedChildren.splice(deletePoint, len - deletePoint);\n return sum;\n}\n/**\n * Sort\n */\n\n\nfunction sort(viewChildren, orderBy) {\n if (orderBy) {\n viewChildren.sort(function (a, b) {\n var diff = orderBy === 'asc' ? a.getValue() - b.getValue() : b.getValue() - a.getValue();\n return diff === 0 ? orderBy === 'asc' ? a.dataIndex - b.dataIndex : b.dataIndex - a.dataIndex : diff;\n });\n }\n\n return viewChildren;\n}\n/**\n * Statistic\n */\n\n\nfunction statistic(nodeModel, children, orderBy) {\n // Calculate sum.\n var sum = 0;\n\n for (var i = 0, len = children.length; i < len; i++) {\n sum += children[i].getValue();\n } // Statistic data extent for latter visual coding.\n // Notice: data extent should be calculate based on raw children\n // but not filtered view children, otherwise visual mapping will not\n // be stable when zoom (where children is filtered by visibleMin).\n\n\n var dimension = nodeModel.get('visualDimension');\n var dataExtent; // The same as area dimension.\n\n if (!children || !children.length) {\n dataExtent = [NaN, NaN];\n } else if (dimension === 'value' && orderBy) {\n dataExtent = [children[children.length - 1].getValue(), children[0].getValue()];\n orderBy === 'asc' && dataExtent.reverse();\n } // Other dimension.\n else {\n var dataExtent = [Infinity, -Infinity];\n each(children, function (child) {\n var value = child.getValue(dimension);\n value < dataExtent[0] && (dataExtent[0] = value);\n value > dataExtent[1] && (dataExtent[1] = value);\n });\n }\n\n return {\n sum: sum,\n dataExtent: dataExtent\n };\n}\n/**\n * Computes the score for the specified row,\n * as the worst aspect ratio.\n */\n\n\nfunction worst(row, rowFixedLength, ratio) {\n var areaMax = 0;\n var areaMin = Infinity;\n\n for (var i = 0, area, len = row.length; i < len; i++) {\n area = row[i].getLayout().area;\n\n if (area) {\n area < areaMin && (areaMin = area);\n area > areaMax && (areaMax = area);\n }\n }\n\n var squareArea = row.area * row.area;\n var f = rowFixedLength * rowFixedLength * ratio;\n return squareArea ? mathMax(f * areaMax / squareArea, squareArea / (f * areaMin)) : Infinity;\n}\n/**\n * Positions the specified row of nodes. Modifies `rect`.\n */\n\n\nfunction position(row, rowFixedLength, rect, halfGapWidth, flush) {\n // When rowFixedLength === rect.width,\n // it is horizontal subdivision,\n // rowFixedLength is the width of the subdivision,\n // rowOtherLength is the height of the subdivision,\n // and nodes will be positioned from left to right.\n // wh[idx0WhenH] means: when horizontal,\n // wh[idx0WhenH] => wh[0] => 'width'.\n // xy[idx1WhenH] => xy[1] => 'y'.\n var idx0WhenH = rowFixedLength === rect.width ? 0 : 1;\n var idx1WhenH = 1 - idx0WhenH;\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n var last = rect[xy[idx0WhenH]];\n var rowOtherLength = rowFixedLength ? row.area / rowFixedLength : 0;\n\n if (flush || rowOtherLength > rect[wh[idx1WhenH]]) {\n rowOtherLength = rect[wh[idx1WhenH]]; // over+underflow\n }\n\n for (var i = 0, rowLen = row.length; i < rowLen; i++) {\n var node = row[i];\n var nodeLayout = {};\n var step = rowOtherLength ? node.getLayout().area / rowOtherLength : 0;\n var wh1 = nodeLayout[wh[idx1WhenH]] = mathMax(rowOtherLength - 2 * halfGapWidth, 0); // We use Math.max/min to avoid negative width/height when considering gap width.\n\n var remain = rect[xy[idx0WhenH]] + rect[wh[idx0WhenH]] - last;\n var modWH = i === rowLen - 1 || remain < step ? remain : step;\n var wh0 = nodeLayout[wh[idx0WhenH]] = mathMax(modWH - 2 * halfGapWidth, 0);\n nodeLayout[xy[idx1WhenH]] = rect[xy[idx1WhenH]] + mathMin(halfGapWidth, wh1 / 2);\n nodeLayout[xy[idx0WhenH]] = last + mathMin(halfGapWidth, wh0 / 2);\n last += modWH;\n node.setLayout(nodeLayout, true);\n }\n\n rect[xy[idx1WhenH]] += rowOtherLength;\n rect[wh[idx1WhenH]] -= rowOtherLength;\n} // Return [containerWidth, containerHeight] as defualt.\n\n\nfunction estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) {\n // If targetInfo.node exists, we zoom to the node,\n // so estimate whold width and heigth by target node.\n var currNode = (targetInfo || {}).node;\n var defaultSize = [containerWidth, containerHeight];\n\n if (!currNode || currNode === viewRoot) {\n return defaultSize;\n }\n\n var parent;\n var viewArea = containerWidth * containerHeight;\n var area = viewArea * seriesModel.option.zoomToNodeRatio;\n\n while (parent = currNode.parentNode) {\n // jshint ignore:line\n var sum = 0;\n var siblings = parent.children;\n\n for (var i = 0, len = siblings.length; i < len; i++) {\n sum += siblings[i].getValue();\n }\n\n var currNodeValue = currNode.getValue();\n\n if (currNodeValue === 0) {\n return defaultSize;\n }\n\n area *= sum / currNodeValue; // Considering border, suppose aspect ratio is 1.\n\n var parentModel = parent.getModel();\n var borderWidth = parentModel.get(PATH_BORDER_WIDTH);\n var upperHeight = Math.max(borderWidth, getUpperLabelHeight(parentModel, borderWidth));\n area += 4 * borderWidth * borderWidth + (3 * borderWidth + upperHeight) * Math.pow(area, 0.5);\n area > MAX_SAFE_INTEGER && (area = MAX_SAFE_INTEGER);\n currNode = parent;\n }\n\n area < viewArea && (area = viewArea);\n var scale = Math.pow(area / viewArea, 0.5);\n return [containerWidth * scale, containerHeight * scale];\n} // Root postion base on coord of containerGroup\n\n\nfunction calculateRootPosition(layoutInfo, rootRect, targetInfo) {\n if (rootRect) {\n return {\n x: rootRect.x,\n y: rootRect.y\n };\n }\n\n var defaultPosition = {\n x: 0,\n y: 0\n };\n\n if (!targetInfo) {\n return defaultPosition;\n } // If targetInfo is fetched by 'retrieveTargetInfo',\n // old tree and new tree are the same tree,\n // so the node still exists and we can visit it.\n\n\n var targetNode = targetInfo.node;\n var layout = targetNode.getLayout();\n\n if (!layout) {\n return defaultPosition;\n } // Transform coord from local to container.\n\n\n var targetCenter = [layout.width / 2, layout.height / 2];\n var node = targetNode;\n\n while (node) {\n var nodeLayout = node.getLayout();\n targetCenter[0] += nodeLayout.x;\n targetCenter[1] += nodeLayout.y;\n node = node.parentNode;\n }\n\n return {\n x: layoutInfo.width / 2 - targetCenter[0],\n y: layoutInfo.height / 2 - targetCenter[1]\n };\n} // Mark nodes visible for prunning when visual coding and rendering.\n// Prunning depends on layout and root position, so we have to do it after layout.\n\n\nfunction prunning(node, clipRect, viewAbovePath, viewRoot, depth) {\n var nodeLayout = node.getLayout();\n var nodeInViewAbovePath = viewAbovePath[depth];\n var isAboveViewRoot = nodeInViewAbovePath && nodeInViewAbovePath === node;\n\n if (nodeInViewAbovePath && !isAboveViewRoot || depth === viewAbovePath.length && node !== viewRoot) {\n return;\n }\n\n node.setLayout({\n // isInView means: viewRoot sub tree + viewAbovePath\n isInView: true,\n // invisible only means: outside view clip so that the node can not\n // see but still layout for animation preparation but not render.\n invisible: !isAboveViewRoot && !clipRect.intersect(nodeLayout),\n isAboveViewRoot: isAboveViewRoot\n }, true); // Transform to child coordinate.\n\n var childClipRect = new BoundingRect(clipRect.x - nodeLayout.x, clipRect.y - nodeLayout.y, clipRect.width, clipRect.height);\n each(node.viewChildren || [], function (child) {\n prunning(child, childClipRect, viewAbovePath, viewRoot, depth + 1);\n });\n}\n\nfunction getUpperLabelHeight(model) {\n return model.get(PATH_UPPER_LABEL_SHOW) ? model.get(PATH_UPPER_LABEL_HEIGHT) : 0;\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 zrColor = require(\"zrender/lib/tool/color\");\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 isArray = zrUtil.isArray;\nvar ITEM_STYLE_NORMAL = 'itemStyle';\nvar _default = {\n seriesType: 'treemap',\n reset: function (seriesModel, ecModel, api, payload) {\n var tree = seriesModel.getData().tree;\n var root = tree.root;\n var seriesItemStyleModel = seriesModel.getModel(ITEM_STYLE_NORMAL);\n\n if (root.isRemoved()) {\n return;\n }\n\n var levelItemStyles = zrUtil.map(tree.levelModels, function (levelModel) {\n return levelModel ? levelModel.get(ITEM_STYLE_NORMAL) : null;\n });\n travelTree(root, // Visual should calculate from tree root but not view root.\n {}, levelItemStyles, seriesItemStyleModel, seriesModel.getViewRoot().getAncestors(), seriesModel);\n }\n};\n\nfunction travelTree(node, designatedVisual, levelItemStyles, seriesItemStyleModel, viewRootAncestors, seriesModel) {\n var nodeModel = node.getModel();\n var nodeLayout = node.getLayout(); // Optimize\n\n if (!nodeLayout || nodeLayout.invisible || !nodeLayout.isInView) {\n return;\n }\n\n var nodeItemStyleModel = node.getModel(ITEM_STYLE_NORMAL);\n var levelItemStyle = levelItemStyles[node.depth];\n var visuals = buildVisuals(nodeItemStyleModel, designatedVisual, levelItemStyle, seriesItemStyleModel); // calculate border color\n\n var borderColor = nodeItemStyleModel.get('borderColor');\n var borderColorSaturation = nodeItemStyleModel.get('borderColorSaturation');\n var thisNodeColor;\n\n if (borderColorSaturation != null) {\n // For performance, do not always execute 'calculateColor'.\n thisNodeColor = calculateColor(visuals, node);\n borderColor = calculateBorderColor(borderColorSaturation, thisNodeColor);\n }\n\n node.setVisual('borderColor', borderColor);\n var viewChildren = node.viewChildren;\n\n if (!viewChildren || !viewChildren.length) {\n thisNodeColor = calculateColor(visuals, node); // Apply visual to this node.\n\n node.setVisual('color', thisNodeColor);\n } else {\n var mapping = buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren); // Designate visual to children.\n\n zrUtil.each(viewChildren, function (child, index) {\n // If higher than viewRoot, only ancestors of viewRoot is needed to visit.\n if (child.depth >= viewRootAncestors.length || child === viewRootAncestors[child.depth]) {\n var childVisual = mapVisual(nodeModel, visuals, child, index, mapping, seriesModel);\n travelTree(child, childVisual, levelItemStyles, seriesItemStyleModel, viewRootAncestors, seriesModel);\n }\n });\n }\n}\n\nfunction buildVisuals(nodeItemStyleModel, designatedVisual, levelItemStyle, seriesItemStyleModel) {\n var visuals = zrUtil.extend({}, designatedVisual);\n zrUtil.each(['color', 'colorAlpha', 'colorSaturation'], function (visualName) {\n // Priority: thisNode > thisLevel > parentNodeDesignated > seriesModel\n var val = nodeItemStyleModel.get(visualName, true); // Ignore parent\n\n val == null && levelItemStyle && (val = levelItemStyle[visualName]);\n val == null && (val = designatedVisual[visualName]);\n val == null && (val = seriesItemStyleModel.get(visualName));\n val != null && (visuals[visualName] = val);\n });\n return visuals;\n}\n\nfunction calculateColor(visuals) {\n var color = getValueVisualDefine(visuals, 'color');\n\n if (color) {\n var colorAlpha = getValueVisualDefine(visuals, 'colorAlpha');\n var colorSaturation = getValueVisualDefine(visuals, 'colorSaturation');\n\n if (colorSaturation) {\n color = zrColor.modifyHSL(color, null, null, colorSaturation);\n }\n\n if (colorAlpha) {\n color = zrColor.modifyAlpha(color, colorAlpha);\n }\n\n return color;\n }\n}\n\nfunction calculateBorderColor(borderColorSaturation, thisNodeColor) {\n return thisNodeColor != null ? zrColor.modifyHSL(thisNodeColor, null, null, borderColorSaturation) : null;\n}\n\nfunction getValueVisualDefine(visuals, name) {\n var value = visuals[name];\n\n if (value != null && value !== 'none') {\n return value;\n }\n}\n\nfunction buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren) {\n if (!viewChildren || !viewChildren.length) {\n return;\n }\n\n var rangeVisual = getRangeVisual(nodeModel, 'color') || visuals.color != null && visuals.color !== 'none' && (getRangeVisual(nodeModel, 'colorAlpha') || getRangeVisual(nodeModel, 'colorSaturation'));\n\n if (!rangeVisual) {\n return;\n }\n\n var visualMin = nodeModel.get('visualMin');\n var visualMax = nodeModel.get('visualMax');\n var dataExtent = nodeLayout.dataExtent.slice();\n visualMin != null && visualMin < dataExtent[0] && (dataExtent[0] = visualMin);\n visualMax != null && visualMax > dataExtent[1] && (dataExtent[1] = visualMax);\n var colorMappingBy = nodeModel.get('colorMappingBy');\n var opt = {\n type: rangeVisual.name,\n dataExtent: dataExtent,\n visual: rangeVisual.range\n };\n\n if (opt.type === 'color' && (colorMappingBy === 'index' || colorMappingBy === 'id')) {\n opt.mappingMethod = 'category';\n opt.loop = true; // categories is ordinal, so do not set opt.categories.\n } else {\n opt.mappingMethod = 'linear';\n }\n\n var mapping = new VisualMapping(opt);\n mapping.__drColorMappingBy = colorMappingBy;\n return mapping;\n} // Notice: If we dont have the attribute 'colorRange', but only use\n// attribute 'color' to represent both concepts of 'colorRange' and 'color',\n// (It means 'colorRange' when 'color' is Array, means 'color' when not array),\n// this problem will be encountered:\n// If a level-1 node dont have children, and its siblings has children,\n// and colorRange is set on level-1, then the node can not be colored.\n// So we separate 'colorRange' and 'color' to different attributes.\n\n\nfunction getRangeVisual(nodeModel, name) {\n // 'colorRange', 'colorARange', 'colorSRange'.\n // If not exsits on this node, fetch from levels and series.\n var range = nodeModel.get(name);\n return isArray(range) && range.length ? {\n name: name,\n range: range\n } : null;\n}\n\nfunction mapVisual(nodeModel, visuals, child, index, mapping, seriesModel) {\n var childVisuals = zrUtil.extend({}, visuals);\n\n if (mapping) {\n var mappingType = mapping.type;\n var colorMappingBy = mappingType === 'color' && mapping.__drColorMappingBy;\n var value = colorMappingBy === 'index' ? index : colorMappingBy === 'id' ? seriesModel.mapIdToIndex(child.getId()) : child.getValue(nodeModel.get('visualDimension'));\n childVisuals[mappingType] = mapping.mapValueToVisual(value);\n }\n\n return childVisuals;\n}\n\nmodule.exports = _default;"],"names":["echarts","visualSymbol","treeLayout","registerVisual","registerLayout","layout","init","root","hierNode","defaultAncestor","ancestor","prelim","modifier","change","shift","i","thread","node","children","nodes","pop","isExpand","length","n","child","push","firstWalk","separation","siblings","parentNode","subtreeW","executeShifts","midPoint","apportion","secondWalk","nodeX","setLayout","x","cb","arguments","defaultSeparation","radialCoordinate","y","radialCoor","Math","PI","cos","sin","getViewRect","seriesModel","api","getLayoutRect","getBoxLayoutParams","width","getWidth","height","getHeight","subtreeV","nodeOutRight","nodeInRight","nodeOutLeft","nodeInLeft","sumOutRight","sumInRight","sumOutLeft","sumInLeft","nextRight","nextLeft","moveSubtree","nextAncestor","wl","wr","node1","node2","exports","eachAfter","callback","next","eachBefore","_roamHelper","updateCenterAndZoom","registerAction","type","event","update","payload","ecModel","eachComponent","mainType","subType","query","dataIndex","tree","getData","getNodeByDataIndex","coordSys","coordinateSystem","res","setCenter","center","setZoom","zoom","_traversalHelper","_layoutHelper","sep","_default","eachSeriesByType","commonLayout","layoutInfo","get","min","depth","virtualRoot","realRoot","left","right","bottom","getLayout","delta","tx","kx","ky","coorX","coorY","finalCoor","rawX","rawY","orient","getOrient","module","treemapVisual","treemapLayout","graphic","zrUtil","_treeHelper","wrapTreePathInfo","TEXT_PADDING","ITEM_GAP","ARRAY_LENGTH","Breadcrumb","containerGroup","this","group","Group","add","makeItemPoints","itemWidth","itemHeight","head","tail","points","splice","packEventData","el","itemNode","eventData","componentType","componentSubType","componentIndex","seriesIndex","seriesName","name","seriesType","selfType","nodeData","treePathInfo","prototype","constructor","render","targetNode","onSelect","model","getModel","thisGroup","removeAll","normalStyleModel","textStyleModel","layoutParam","pos","top","box","emptyItemWidth","totalWidth","renderList","_prepare","_renderContent","positionElement","text","textRect","getTextRect","max","lastX","availableSize","getAvailableSize","item","Polygon","shape","style","defaults","getItemStyle","lineJoin","textFill","getTextColor","textFont","getFont","z","onclick","curry","remove","SeriesModel","Tree","Model","_format","encodeHTML","addCommas","extend","layoutMode","dependencies","preventUsingHoverLayer","_viewRoot","defaultOption","progressive","sort","clipWindow","squareRatio","sqrt","leafDepth","drillDownIcon","zoomToNodeRatio","roam","nodeClick","animation","animationDurationUpdate","animationEasing","breadcrumb","show","itemStyle","color","borderColor","borderWidth","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textStyle","emphasis","label","distance","padding","position","ellipsis","upperLabel","verticalAlign","colorAlpha","colorSaturation","gapWidth","borderColorSaturation","visualDimension","visualMin","visualMax","colorMappingBy","visibleMin","childrenVisibleMin","levels","getInitialData","option","data","completeTreeValue","setDefault","levelModels","map","levelDefine","createTree","beforeLink","wrapMethod","idx","levelModel","parentModel","optionUpdated","resetViewRoot","formatTooltip","value","getRawValue","formattedValue","isArray","getName","getDataParams","params","apply","setLayoutInfo","mapIdToIndex","id","idIndexMap","_idIndexMap","createHashMap","_idIndexMapCount","index","set","getViewRoot","viewRoot","getRawData","contains","dataNode","sum","each","childValue","thisValue","isNaN","globalColorList","hasColorDefine","modelColor","level0","slice","DataDiffer","helper","RoamController","BoundingRect","matrix","animationUtil","makeStyleMapper","windowOpen","bind","Rect","DRAG_THRESHOLD","PATH_LABEL_NOAMAL","PATH_LABEL_EMPHASIS","PATH_UPPERLABEL_NORMAL","PATH_UPPERLABEL_EMPHASIS","Z_BASE","Z_BG","Z_CONTENT","getItemStyleEmphasis","getItemStyleNormal","stroke","fill","lineWidth","extendChartView","o","_containerGroup","_storage","createStorage","_oldTree","_breadcrumb","_controller","_state","models","findComponents","indexOf","types","targetInfo","retrieveTargetInfo","payloadType","isInit","thisStorage","reRoot","rootNodeGroup","nodeGroup","getRawIndex","direction","_giveContainerGroup","renderResult","_doRender","renderFinally","_doAnimation","_resetController","_renderBreadcrumb","_initEvents","attr","thisTree","oldTree","lastsForAnimation","oldStorage","willInvisibleEls","doRenderNode","renderNode","dualTravel","willDeleteEls","clearStorage","thisViewChildren","oldViewChildren","parentGroup","sameTree","getKey","getId","processNode","newIndex","oldIndex","thisNode","oldNode","viewChildren","isRemoved","execute","storage","store","storageName","delEls","__tmWillDelete","els","parent","invisible","dirty","duration","easing","animationWrap","createWrap","rawIndex","target","__tmNodeWidth","__tmNodeHeight","opacity","targetX","targetY","last","old","setShape","fadein","setStyle","done","start","controller","getZr","enable","on","_onPan","_onZoom","rect","setPointerChecker","e","contain","_clearController","dispose","abs","dx","dy","rootLayout","dispatchAction","from","uid","seriesId","rootRect","mouseX","originX","mouseY","originY","m","create","translate","scale","applyTransform","findTarget","offsetX","offsetY","isLeafRoot","_rootToNode","_zoomToNode","itemModel","hostTree","getItemModel","link","linkTarget","aboveViewRoot","eachNode","order","bgEl","background","point","transformCoordToLocal","content","thisLayout","setItemGraphicEl","isInView","thisWidth","thisHeight","thisInvisible","thisRawIndex","oldRawIndex","upperHeight","isParent","itemStyleNormalModel","itemStyleEmphasisModel","giveGraphic","isAboveViewRoot","nodeModel","bg","renderBackground","upperLabelHeight","isHighDownDispatcher","setAsHighDownDispatcher","renderContent","useUpperLabel","processInvisible","visualBorderColor","getVisual","emphasisBorderColor","normalStyle","emphasisStyle","upperLabelWidth","prepareText","setElementHoverStyle","contentWidth","contentHeight","culling","visualColor","element","upperLabelRect","defaultText","normalLabelModel","emphasisLabelModel","isShow","getShallow","setLabelStyle","autoColor","isRectText","labelFetcher","labelDataIndex","labelProp","addDrillDownIcon","clone","truncate","outerWidth","outerHeight","minChar","iconChar","Ctor","lasts","prepareAnimationWhenHasOld","calculateZ","__tmDepth","__tmStorageName","prepareAnimationWhenNoOld","lastCfg","parentOldX","parentOldY","parentOldBg","zInLevel","zb","noop","actionTypes","handleRootToNode","originViewRoot","_number","parsePercent","MAX_SAFE_INTEGER","mathMax","mathMin","retrieveValue","retrieve","PATH_BORDER_WIDTH","PATH_GAP_WIDTH","PATH_UPPER_LABEL_SHOW","PATH_UPPER_LABEL_HEIGHT","reset","ecWidth","ecHeight","seriesOption","size","containerWidth","containerHeight","viewAbovePath","getPathToRoot","rootSize","estimateRootSize","options","clearLayouts","viewRootLayout","area","squarify","getValue","dataExtent","treeRoot","calculateRootPosition","prunning","hideChildren","halfGapWidth","getUpperLabelHeight","layoutOffset","layoutOffsetUpper","totalArea","initChildren","rowFixedLength","best","Infinity","row","len","score","worst","orderBy","overLeafDepth","filter","info","statistic","filterByThreshold","orderedChildren","deletePoint","a","b","diff","dimension","reverse","NaN","ratio","areaMax","areaMin","squareArea","f","flush","idx0WhenH","idx1WhenH","xy","wh","rowOtherLength","rowLen","nodeLayout","step","wh1","remain","modWH","wh0","currNode","defaultSize","viewArea","currNodeValue","pow","defaultPosition","targetCenter","clipRect","nodeInViewAbovePath","intersect","childClipRect","VisualMapping","zrColor","ITEM_STYLE_NORMAL","seriesItemStyleModel","levelItemStyles","travelTree","getAncestors","designatedVisual","viewRootAncestors","thisNodeColor","nodeItemStyleModel","levelItemStyle","visuals","buildVisuals","calculateColor","calculateBorderColor","setVisual","mapping","buildVisualMapping","childVisual","mapVisual","visualName","val","getValueVisualDefine","modifyHSL","modifyAlpha","rangeVisual","getRangeVisual","opt","visual","range","mappingMethod","loop","__drColorMappingBy","childVisuals","mappingType","mapValueToVisual"],"sourceRoot":""}
|