{"version":3,"sources":["webpack:///./node_modules/echarts/lib/chart/graph/categoryFilter.js","webpack:///./node_modules/echarts/lib/chart/graph/categoryVisual.js","webpack:///./node_modules/echarts/lib/chart/graph/edgeVisual.js","webpack:///./node_modules/echarts/lib/chart/graph/simpleLayoutHelper.js","webpack:///./node_modules/echarts/lib/chart/graph/simpleLayout.js","webpack:///./node_modules/echarts/lib/chart/graph/graphHelper.js","webpack:///./node_modules/echarts/lib/chart/graph/circularLayoutHelper.js","webpack:///./node_modules/echarts/lib/chart/graph/circularLayout.js","webpack:///./node_modules/echarts/lib/chart/graph/forceHelper.js","webpack:///./node_modules/echarts/lib/chart/graph/forceLayout.js","webpack:///./node_modules/echarts/lib/chart/graph/createView.js","webpack:///./node_modules/echarts/lib/chart/graph/adjustEdge.js","webpack:///./node_modules/echarts/lib/chart/graph/GraphView.js","webpack:///./node_modules/echarts/lib/chart/graph/GraphSeries.js","webpack:///./node_modules/echarts/lib/chart/graph/install.js","webpack:///./node_modules/echarts/lib/action/roamHelper.js","webpack:///./node_modules/echarts/lib/chart/bar/BaseBarSeries.js","webpack:///./node_modules/echarts/lib/chart/bar/BarSeries.js","webpack:///./node_modules/echarts/lib/chart/bar/BarView.js","webpack:///./node_modules/echarts/lib/chart/bar/install.js"],"names":["categoryFilter","ecModel","legendModels","findComponents","mainType","length","eachSeriesByType","graphSeries","categoriesData","getCategoriesData","data","getGraph","categoryNames","mapArray","getName","filterSelf","idx","category","getItemModel","getShallow","i","isSelected","categoryVisual","paletteScope","seriesModel","getData","categoryNameIdxMap","each","name","itemModel","style","getModel","getItemStyle","fill","getColorFromPalette","setItemVisual","symbolVisualList","symbolVisual","count","categoryIdx","categoryStyle","getItemVisual","ensureUniqueItemVisual","visualList","normalize","a","Array","graphEdgeVisual","graph","edgeData","getEdgeData","symbolType","get","symbolSize","setVisual","getLineStyle","edge","getEdgeByIndex","existsStyle","stroke","nodeStyle","node1","getVisual","node2","simpleLayout","coordSys","coordinateSystem","type","eachNode","node","model","setLayout","simpleLayoutEdge","eachEdge","index","curveness","p1","getLayout","p2","points","push","graphSimpleLayout","api","layout","data_1","dimensions_1","dimensions","coordDim","concat","mapDimensionsAll","dataIndex","value","hasValue","val","isNaN","setItemLayout","dataToPoint","NaN","getNodeGlobalScale","nodeScaleRatio","option","groupZoom","scaleX","getZoom","getSymbolSize","PI","Math","_symbolRadiansHalf","circularLayout","basedOn","rect","getBoundingRect","nodeData","cx","width","x","cy","height","y","r","min","_layoutNodesBasedOn","cp1","x12","y12","angle","sum","getSum","unitAngle","getValue","radianHalf","cos","sin","sumRadian","nodeScale","symbolRadianHalf","asin","halfRemainRadian","graphCircularLayout","scaleAndAdd","graphForceLayout","preservedPoints_1","preservedPoints","graph_1","nodeData_1","forceModel","initLayout","id","getId","nodeDataExtent_1","getDataExtent","edgeDataExtent_1","repulsion","edgeLength","repulsionArr_1","edgeLengthArr_1","nodes_1","point","getItemLayout","rep","w","fixed","p","edges","d","edgeModel","n1","n2","ignoreForceLayout","forceInstance","inNodes","inEdges","opts","nodes","center","gravity","n","random","pp","beforeStepCallback","afterStepCallback","initialFriction","friction","warmUp","setFixed","setUnfixed","beforeStep","cb","afterStep","step","v12","nLen","e","j","repFact","v","finished","l","getNodeByIndex","stopped","slice","forceLayout","createViewCoordSys","viewList","coordSysType","positions","max","bbox","aspect","viewRect","getBoxLayoutParams","getWidth","getHeight","getViewRect","bbWidth","bbHeight","viewWidth","viewHeight","viewCoordSys","View","zoomLimit","setBoundingRect","setViewRect","setCenter","setZoom","v1","v2","v3","quadraticAt","curve","v2DistSquare","mathAbs","abs","intersectCurveCircle","curvePoints","radius","t","p0","Infinity","radiusSquare","interval","_t","diff","next","nextDiff","adjustEdge","scale","tmp0","quadraticSubdivide","pts","pts2","linePoints","fromSymbol","toSymbol","__original","originalPoints","isViewCoordSys","_super","GraphView","_this","apply","this","arguments","prototype","init","symbolDraw","SymbolDraw","lineDraw","LineDraw","group","_controller","RoamController","getZr","_controllerHost","target","add","_symbolDraw","_lineDraw","_firstRender","render","_model","groupNewProp","scaleY","attr","graphic","updateData","_updateNodeAndLinkScale","_updateController","clearTimeout","_layoutTimeout","layoutAnimation","_startForceLayoutIteration","el","getGraphicEl","off","draggable","on","_layouting","setDraggable","focus","getAdjacentDataIndices","circularRotateLabel","eachItemGraphicEl","labelRotate","symbolPath","getSymbolPath","pos","rad","atan2","isLeft","textPosition","setTextConfig","rotation","position","origin","emphasisState","ensureState","textConfig","dispose","self","updateLayout","setTimeout","controller","controllerHost","setPointerChecker","applyTransform","transform","contain","enable","zoom","roamHelper","dx","dy","dispatchAction","seriesId","originX","originY","updateLabelLayout","disable","setSymbolScale","remove","Chart","GraphSeries","GraphSeriesModel","hasSymbolVisual","_categoriesData","legendVisualProvider","LegendVisualProvider","fillDataTextStyle","links","_updateCategoriesData","mergeOption","mergeDefaultAndTheme","getInitialData","createGraphFromNodeEdge","wrapMethod","categoryModel","_categoriesModels","parentModel","oldGetModel","Model","newGetModel","path","call","resolveParentPath","pathArr","newPathArr","formatTooltip","multipleSeries","dataType","params","getDataParams","sourceName","targetName","nameArr","join","noValue","series","categories","List","initData","isAnimationEnabled","dependencies","defaultOption","zlevel","z","legendHoverLink","circular","rotateLabel","force","left","top","symbol","edgeSymbol","edgeSymbolSize","edgeLabel","distance","roam","label","show","formatter","itemStyle","lineStyle","color","opacity","emphasis","select","borderColor","Series","actionInfo","event","update","install","registers","registerChartView","registerSeriesModel","registerProcessor","registerVisual","registerLayout","PRIORITY","VISUAL","POST_CHART_LAYOUT","registerCoordinateSystem","create","registerAction","payload","eachComponent","query","res","view","previousZoom","getCenter","pointToData","zoomMin","zoomMax","fixX","fixY","updateTransform","updateCenterAndZoom","BaseBarSeriesModel","createListFromArray","getSource","useEncodeDefaulter","getMarkerPosition","pt","clampData","offset","size","getBaseAxis","isHorizontal","barMinHeight","barMinAngle","large","largeThreshold","progressive","progressiveChunkMode","registerClass","BaseBarSeries","BarSeries","BarSeriesModel","createInvertedIndices","getProgressive","getProgressiveThreshold","progressiveThreshold","brushSelector","selectors","clip","roundCap","showBackground","backgroundStyle","borderWidth","borderType","borderRadius","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","realtimeSort","_eventPos","mathMax","mathMin","BarView","_isFirstFrame","_removeOnRenderedListener","_updateDrawMode","coordinateSystemType","_isLargeDraw","_renderLarge","_renderNormal","incrementalPrepareRender","_clear","_updateLargeClip","incrementalRender","_incrementalRenderLarge","isLargeDraw","pipelineContext","isHorizontalOrRadial","oldData","_data","coord","baseAxis","dim","animationModel","realtimeSortCfg","realtimeSortOption","otherAxis","getOtherAxis","shouldRealtimeSort","_enableRealtimeSort","needsClip","coordSysClipArea","getArea","onBand","expandWidth","getClipArea","removeClipPath","drawBackground","backgroundModel","barBorderRadius","bgEls","oldBgEls","_backgroundEls","isInitSort","isChangeOrder","createBackground","bgLayout","bgEl","Sector","Rect","shape","createBackgroundShape","silent","z2","createBackgroundEl","useStyle","setShape","isClipped","elementCreator","updateStyle","updateRealtimeAnimation","setItemGraphicEl","ignore","newIndex","oldIndex","getItemGraphicEl","execute","bgGroup","_backgroundGroup","Group","removeAll","createLarge","_removeBackground","clipPath","setClipPath","_dispatchInitSort","orderMapping_1","_onRendered","_updateSortWithinSameData","_dataSort","orderMapping","info","mapDimension","ordinalNumber","dataIdx","mappedValue","sort","b","ordinalNumbers","item","_isOrderChangedWithinSameData","ordinalDataDim","lastValue","Number","MAX_VALUE","tickNum","len","getOrdinalMeta","rawIdx","rawIndexOf","getRawOrdinalNumber","MIN_VALUE","indexOfRawIndex","_isOrderDifferentInView","orderInfo","extent","getExtent","tickMax","sortInfo","componentType","axisId","sortResult","animation","duration","cartesian2d","coordSysBoundingRect","signWidth","signHeight","coordSysX2","coordSysY2","x2","y2","xClipped","yClipped","polar","signR","r0","tmp","clipped","axisModel","isUpdate","__dataIndex","isRadial","clockwise","startAngle","endAngle","sector","animateProperty","animateTarget","seriesAnimationModel","seriesTarget","axisTarget","axisAnimationModel","fixedLineWidth","rawLayout","lineWidth","getLineWidth","signX","signY","isPolar","cursorStyle","labelPositionOutside","labelStatesModels","labelFetcher","labelDataIndex","defaultText","inheritColor","defaultOpacity","defaultOutsidePosition","getTextContent","getRawValue","emphasisModel","isZeroOnPolar","states","state","LagePathShape","LargePath","getDefaultShape","buildPath","ctx","startPoint","__startPoint","baseDimIdx","__baseDimIdx","moveTo","lineTo","Path","incremental","largeDataIndices","barWidth","backgroundStartPoint","__largeDataIndices","__barWidth","setLargeBackgroundStyle","globalStyle","setLargeStyle","seriesIndex","largePathUpdateDataIndex","throttle","largePath","valueDimIdx","barWidthHalf","startValueVal","pointerBaseVal","pointerValueVal","baseLowerBound","baseUpperBound","ii","barBaseVal","barValueVal","largePathFindDataIndex","offsetX","offsetY","rectShape","coordLayout","sectorShape","LAYOUT","PROGRESSIVE_LAYOUT","PROCESSOR","STATISTIC","dataSample","componentModel","axis","setCategorySortInfo"],"mappings":"4FA2Ce,SAASA,EAAeC,GACrC,IAAIC,EAAeD,EAAQE,eAAe,CACxCC,SAAU,WAGPF,GAAiBA,EAAaG,QAInCJ,EAAQK,iBAAiB,SAAS,SAAUC,GAC1C,IAAIC,EAAiBD,EAAYE,oBAE7BC,KADQH,EAAYI,WACPD,KACbE,EAAgBJ,EAAeK,SAASL,EAAeM,SAC3DJ,KAAKK,YAAW,SAAUC,GACxB,IACIC,EADQP,KAAKQ,aAAaF,GACTG,WAAW,YAEhC,GAAgB,MAAZF,EAAkB,CACI,iBAAbA,IACTA,EAAWL,EAAcK,IAI3B,IAAK,IAAIG,EAAI,EAAGA,EAAIlB,EAAaG,OAAQe,IACvC,IAAKlB,EAAakB,GAAGC,WAAWJ,GAC9B,OAAO,EAKb,OAAO,Q,WC9BE,SAASK,EAAerB,GACrC,IAAIsB,EAAe,GACnBtB,EAAQK,iBAAiB,SAAS,SAAUkB,GAC1C,IAAIhB,EAAiBgB,EAAYf,oBAC7BC,KAAOc,EAAYC,UACnBC,EAAqB,GACzBlB,EAAemB,MAAK,SAAUX,G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Q,OAAQ,IAAa,IAAQ,QAGhFhR,EAAUK,eAAeL,EAAUM,SAASC,OAAO0Q,mBAAoB,KAEvEjR,EAAUG,kBAAkBH,EAAUM,SAAS4Q,UAAUC,UAAW,OAAAC,EAAA,GAAW,QAW/EpR,EAAUW,eAAe,CACvBrW,KAAM,kBACNuV,MAAO,kBACPC,OAAQ,WACP,SAAUc,EAASxa,GACpB,IAAI2kB,EAAgBnK,EAAQmK,eAAiB,SAC7C3kB,EAAQya,cAAc,CACpBta,SAAUwkB,EACVjK,MAAOF,IACN,SAAUyQ,GACPzQ,EAAQkK,UACVuG,EAAeC,KAAKC,oBAAoB3Q,EAAQkK,gB","file":"vendors~app~44ae273e.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\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nexport default function categoryFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n\n if (!legendModels || !legendModels.length) {\n return;\n }\n\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var categoriesData = graphSeries.getCategoriesData();\n var graph = graphSeries.getGraph();\n var data = graph.data;\n var categoryNames = categoriesData.mapArray(categoriesData.getName);\n data.filterSelf(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\n\n if (category != null) {\n if (typeof category === 'number') {\n category = categoryNames[category];\n } // If in any legend component the status is not selected.\n\n\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(category)) {\n return false;\n }\n }\n }\n\n return true;\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\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport { extend } from 'zrender/lib/core/util';\nexport default function categoryVisual(ecModel) {\n var paletteScope = {};\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var categoriesData = seriesModel.getCategoriesData();\n var data = seriesModel.getData();\n var categoryNameIdxMap = {};\n categoriesData.each(function (idx) {\n var name = categoriesData.getName(idx); // Add prefix to avoid conflict with Object.prototype.\n\n categoryNameIdxMap['ec-' + name] = idx;\n var itemModel = categoriesData.getItemModel(idx);\n var style = itemModel.getModel('itemStyle').getItemStyle();\n\n if (!style.fill) {\n // Get color from palette.\n style.fill = seriesModel.getColorFromPalette(name, paletteScope);\n }\n\n categoriesData.setItemVisual(idx, 'style', style);\n var symbolVisualList = ['symbol', 'symbolSize', 'symbolKeepAspect'];\n\n for (var i = 0; i < symbolVisualList.length; i++) {\n var symbolVisual = itemModel.getShallow(symbolVisualList[i], true);\n\n if (symbolVisual != null) {\n categoriesData.setItemVisual(idx, symbolVisualList[i], symbolVisual);\n }\n }\n }); // Assign category color to visual\n\n if (categoriesData.count()) {\n data.each(function (idx) {\n var model = data.getItemModel(idx);\n var categoryIdx = model.getShallow('category');\n\n if (categoryIdx != null) {\n if (typeof categoryIdx === 'string') {\n categoryIdx = categoryNameIdxMap['ec-' + categoryIdx];\n }\n\n var categoryStyle = categoriesData.getItemVisual(categoryIdx, 'style');\n var style = data.ensureUniqueItemVisual(idx, 'style');\n extend(style, categoryStyle);\n var visualList = ['symbol', 'symbolSize', 'symbolKeepAspect'];\n\n for (var i = 0; i < visualList.length; i++) {\n data.setItemVisual(idx, visualList[i], categoriesData.getItemVisual(categoryIdx, visualList[i]));\n }\n }\n });\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\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport { extend } from 'zrender/lib/core/util';\n\nfunction normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n}\n\nexport default function graphEdgeVisual(ecModel) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var graph = seriesModel.getGraph();\n var edgeData = seriesModel.getEdgeData();\n var symbolType = normalize(seriesModel.get('edgeSymbol'));\n var symbolSize = normalize(seriesModel.get('edgeSymbolSize')); // const colorQuery = ['lineStyle', 'color'] as const;\n // const opacityQuery = ['lineStyle', 'opacity'] as const;\n\n edgeData.setVisual('fromSymbol', symbolType && symbolType[0]);\n edgeData.setVisual('toSymbol', symbolType && symbolType[1]);\n edgeData.setVisual('fromSymbolSize', symbolSize && symbolSize[0]);\n edgeData.setVisual('toSymbolSize', symbolSize && symbolSize[1]);\n edgeData.setVisual('style', seriesModel.getModel('lineStyle').getLineStyle());\n edgeData.each(function (idx) {\n var itemModel = edgeData.getItemModel(idx);\n var edge = graph.getEdgeByIndex(idx);\n var symbolType = normalize(itemModel.getShallow('symbol', true));\n var symbolSize = normalize(itemModel.getShallow('symbolSize', true)); // Edge visual must after node visual\n\n var style = itemModel.getModel('lineStyle').getLineStyle();\n var existsStyle = edgeData.ensureUniqueItemVisual(idx, 'style');\n extend(existsStyle, style);\n\n switch (existsStyle.stroke) {\n case 'source':\n {\n var nodeStyle = edge.node1.getVisual('style');\n existsStyle.stroke = nodeStyle && nodeStyle.fill;\n break;\n }\n\n case 'target':\n {\n var nodeStyle = edge.node2.getVisual('style');\n existsStyle.stroke = nodeStyle && nodeStyle.fill;\n break;\n }\n }\n\n symbolType[0] && edge.setVisual('fromSymbol', symbolType[0]);\n symbolType[1] && edge.setVisual('toSymbol', symbolType[1]);\n symbolSize[0] && edge.setVisual('fromSymbolSize', symbolSize[0]);\n symbolSize[1] && edge.setVisual('toSymbolSize', symbolSize[1]);\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\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport * as vec2 from 'zrender/lib/core/vector';\nimport * as zrUtil from 'zrender/lib/core/util';\nimport { getCurvenessForEdge } from '../helper/multipleGraphEdgeHelper';\nexport function simpleLayout(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n\n var graph = seriesModel.getGraph();\n graph.eachNode(function (node) {\n var model = node.getModel();\n node.setLayout([+model.get('x'), +model.get('y')]);\n });\n simpleLayoutEdge(graph, seriesModel);\n}\nexport function simpleLayoutEdge(graph, seriesModel) {\n graph.eachEdge(function (edge, index) {\n var curveness = zrUtil.retrieve3(edge.getModel().get(['lineStyle', 'curveness']), -getCurvenessForEdge(edge, seriesModel, index, true), 0);\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var points = [p1, p2];\n\n if (+curveness) {\n points.push([(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness]);\n }\n\n edge.setLayout(points);\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/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport { each } from 'zrender/lib/core/util';\nimport { simpleLayout, simpleLayoutEdge } from './simpleLayoutHelper';\nexport default function graphSimpleLayout(ecModel, api) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var layout = seriesModel.get('layout');\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && coordSys.type !== 'view') {\n var data_1 = seriesModel.getData();\n var dimensions_1 = [];\n each(coordSys.dimensions, function (coordDim) {\n dimensions_1 = dimensions_1.concat(data_1.mapDimensionsAll(coordDim));\n });\n\n for (var dataIndex = 0; dataIndex < data_1.count(); dataIndex++) {\n var value = [];\n var hasValue = false;\n\n for (var i = 0; i < dimensions_1.length; i++) {\n var val = data_1.get(dimensions_1[i], dataIndex);\n\n if (!isNaN(val)) {\n hasValue = true;\n }\n\n value.push(val);\n }\n\n if (hasValue) {\n data_1.setItemLayout(dataIndex, coordSys.dataToPoint(value));\n } else {\n // Also {Array.}, not undefined to avoid if...else... statement\n data_1.setItemLayout(dataIndex, [NaN, NaN]);\n }\n }\n\n simpleLayoutEdge(data_1.graph, seriesModel);\n } else if (!layout || layout === 'none') {\n simpleLayout(seriesModel);\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\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nexport function getNodeGlobalScale(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys.type !== 'view') {\n return 1;\n }\n\n var nodeScaleRatio = seriesModel.option.nodeScaleRatio;\n var groupZoom = coordSys.scaleX; // Scale node when zoom changes\n\n var roamZoom = coordSys.getZoom();\n var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1;\n return nodeScale / groupZoom;\n}\nexport function getSymbolSize(node) {\n var symbolSize = node.getVisual('symbolSize');\n\n if (symbolSize instanceof Array) {\n symbolSize = (symbolSize[0] + symbolSize[1]) / 2;\n }\n\n return +symbolSize;\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/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport * as vec2 from 'zrender/lib/core/vector';\nimport { getSymbolSize, getNodeGlobalScale } from './graphHelper';\nimport * as zrUtil from 'zrender/lib/core/util';\nimport { getCurvenessForEdge } from '../helper/multipleGraphEdgeHelper';\nvar PI = Math.PI;\nvar _symbolRadiansHalf = [];\n/**\n * `basedOn` can be:\n * 'value':\n * This layout is not accurate and have same bad case. For example,\n * if the min value is very smaller than the max value, the nodes\n * with the min value probably overlap even though there is enough\n * space to layout them. So we only use this approach in the as the\n * init layout of the force layout.\n * FIXME\n * Probably we do not need this method any more but use\n * `basedOn: 'symbolSize'` in force layout if\n * delay its init operations to GraphView.\n * 'symbolSize':\n * This approach work only if all of the symbol size calculated.\n * That is, the progressive rendering is not applied to graph.\n * FIXME\n * If progressive rendering is applied to graph some day,\n * probably we have to use `basedOn: 'value'`.\n */\n\nexport function circularLayout(seriesModel, basedOn) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n\n var rect = coordSys.getBoundingRect();\n var nodeData = seriesModel.getData();\n var graph = nodeData.graph;\n var cx = rect.width / 2 + rect.x;\n var cy = rect.height / 2 + rect.y;\n var r = Math.min(rect.width, rect.height) / 2;\n var count = nodeData.count();\n nodeData.setLayout({\n cx: cx,\n cy: cy\n });\n\n if (!count) {\n return;\n }\n\n _layoutNodesBasedOn[basedOn](seriesModel, graph, nodeData, r, cx, cy, count);\n\n graph.eachEdge(function (edge, index) {\n var curveness = zrUtil.retrieve3(edge.getModel().get(['lineStyle', 'curveness']), getCurvenessForEdge(edge, seriesModel, index), 0);\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var cp1;\n var x12 = (p1[0] + p2[0]) / 2;\n var y12 = (p1[1] + p2[1]) / 2;\n\n if (+curveness) {\n curveness *= 3;\n cp1 = [cx * curveness + x12 * (1 - curveness), cy * curveness + y12 * (1 - curveness)];\n }\n\n edge.setLayout([p1, p2, cp1]);\n });\n}\nvar _layoutNodesBasedOn = {\n value: function (seriesModel, graph, nodeData, r, cx, cy, count) {\n var angle = 0;\n var sum = nodeData.getSum('value');\n var unitAngle = Math.PI * 2 / (sum || count);\n graph.eachNode(function (node) {\n var value = node.getValue('value');\n var radianHalf = unitAngle * (sum ? value : 1) / 2;\n angle += radianHalf;\n node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]);\n angle += radianHalf;\n });\n },\n symbolSize: function (seriesModel, graph, nodeData, r, cx, cy, count) {\n var sumRadian = 0;\n _symbolRadiansHalf.length = count;\n var nodeScale = getNodeGlobalScale(seriesModel);\n graph.eachNode(function (node) {\n var symbolSize = getSymbolSize(node); // Normally this case will not happen, but we still add\n // some the defensive code (2px is an arbitrary value).\n\n isNaN(symbolSize) && (symbolSize = 2);\n symbolSize < 0 && (symbolSize = 0);\n symbolSize *= nodeScale;\n var symbolRadianHalf = Math.asin(symbolSize / 2 / r); // when `symbolSize / 2` is bigger than `r`.\n\n isNaN(symbolRadianHalf) && (symbolRadianHalf = PI / 2);\n _symbolRadiansHalf[node.dataIndex] = symbolRadianHalf;\n sumRadian += symbolRadianHalf * 2;\n });\n var halfRemainRadian = (2 * PI - sumRadian) / count / 2;\n var angle = 0;\n graph.eachNode(function (node) {\n var radianHalf = halfRemainRadian + _symbolRadiansHalf[node.dataIndex];\n angle += radianHalf;\n node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]);\n angle += radianHalf;\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\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport { circularLayout } from './circularLayoutHelper';\nexport default function graphCircularLayout(ecModel) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n if (seriesModel.get('layout') === 'circular') {\n circularLayout(seriesModel, 'symbolSize');\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\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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* A third-party license is embeded for some of the code in this file:\n* Some formulas were originally copied from \"d3.js\" with some\n* modifications made for this project.\n* (See more details in the comment of the method \"step\" 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* ).\n*/\nimport * as vec2 from 'zrender/lib/core/vector';\nvar scaleAndAdd = vec2.scaleAndAdd; // function adjacentNode(n, e) {\n// return e.n1 === n ? e.n2 : e.n1;\n// }\n\nexport function forceLayout(inNodes, inEdges, opts) {\n var nodes = inNodes;\n var edges = inEdges;\n var rect = opts.rect;\n var width = rect.width;\n var height = rect.height;\n var center = [rect.x + width / 2, rect.y + height / 2]; // let scale = opts.scale || 1;\n\n var gravity = opts.gravity == null ? 0.1 : opts.gravity; // for (let i = 0; i < edges.length; i++) {\n // let e = edges[i];\n // let n1 = e.n1;\n // let n2 = e.n2;\n // n1.edges = n1.edges || [];\n // n2.edges = n2.edges || [];\n // n1.edges.push(e);\n // n2.edges.push(e);\n // }\n // Init position\n\n for (var i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n\n if (!n.p) {\n n.p = vec2.create(width * (Math.random() - 0.5) + center[0], height * (Math.random() - 0.5) + center[1]);\n }\n\n n.pp = vec2.clone(n.p);\n n.edges = null;\n } // Formula in 'Graph Drawing by Force-directed Placement'\n // let k = scale * Math.sqrt(width * height / nodes.length);\n // let k2 = k * k;\n\n\n var initialFriction = opts.friction == null ? 0.6 : opts.friction;\n var friction = initialFriction;\n var beforeStepCallback;\n var afterStepCallback;\n return {\n warmUp: function () {\n friction = initialFriction * 0.8;\n },\n setFixed: function (idx) {\n nodes[idx].fixed = true;\n },\n setUnfixed: function (idx) {\n nodes[idx].fixed = false;\n },\n\n /**\n * Before step hook\n */\n beforeStep: function (cb) {\n beforeStepCallback = cb;\n },\n\n /**\n * After step hook\n */\n afterStep: function (cb) {\n afterStepCallback = cb;\n },\n\n /**\n * Some formulas were originally copied from \"d3.js\"\n * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js\n * with some modifications made for this project.\n * See the license statement at the head of this file.\n */\n step: function (cb) {\n beforeStepCallback && beforeStepCallback(nodes, edges);\n var v12 = [];\n var nLen = nodes.length;\n\n for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n\n if (e.ignoreForceLayout) {\n continue;\n }\n\n var n1 = e.n1;\n var n2 = e.n2;\n vec2.sub(v12, n2.p, n1.p);\n var d = vec2.len(v12) - e.d;\n var w = n2.w / (n1.w + n2.w);\n\n if (isNaN(w)) {\n w = 0;\n }\n\n vec2.normalize(v12, v12);\n !n1.fixed && scaleAndAdd(n1.p, n1.p, v12, w * d * friction);\n !n2.fixed && scaleAndAdd(n2.p, n2.p, v12, -(1 - w) * d * friction);\n } // Gravity\n\n\n for (var i = 0; i < nLen; i++) {\n var n = nodes[i];\n\n if (!n.fixed) {\n vec2.sub(v12, center, n.p); // let d = vec2.len(v12);\n // vec2.scale(v12, v12, 1 / d);\n // let gravityFactor = gravity;\n\n scaleAndAdd(n.p, n.p, v12, gravity * friction);\n }\n } // Repulsive\n // PENDING\n\n\n for (var i = 0; i < nLen; i++) {\n var n1 = nodes[i];\n\n for (var j = i + 1; j < nLen; j++) {\n var n2 = nodes[j];\n vec2.sub(v12, n2.p, n1.p);\n var d = vec2.len(v12);\n\n if (d === 0) {\n // Random repulse\n vec2.set(v12, Math.random() - 0.5, Math.random() - 0.5);\n d = 1;\n }\n\n var repFact = (n1.rep + n2.rep) / d / d;\n !n1.fixed && scaleAndAdd(n1.pp, n1.pp, v12, repFact);\n !n2.fixed && scaleAndAdd(n2.pp, n2.pp, v12, -repFact);\n }\n }\n\n var v = [];\n\n for (var i = 0; i < nLen; i++) {\n var n = nodes[i];\n\n if (!n.fixed) {\n vec2.sub(v, n.p, n.pp);\n scaleAndAdd(n.p, n.p, v, friction);\n vec2.copy(n.pp, n.p);\n }\n }\n\n friction = friction * 0.992;\n var finished = friction < 0.01;\n afterStepCallback && afterStepCallback(nodes, edges, finished);\n cb && cb(finished);\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\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport { forceLayout } from './forceHelper';\nimport { simpleLayout } from './simpleLayoutHelper';\nimport { circularLayout } from './circularLayoutHelper';\nimport { linearMap } from '../../util/number';\nimport * as vec2 from 'zrender/lib/core/vector';\nimport * as zrUtil from 'zrender/lib/core/util';\nimport { getCurvenessForEdge } from '../helper/multipleGraphEdgeHelper';\nexport default function graphForceLayout(ecModel) {\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var coordSys = graphSeries.coordinateSystem;\n\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n\n if (graphSeries.get('layout') === 'force') {\n var preservedPoints_1 = graphSeries.preservedPoints || {};\n var graph_1 = graphSeries.getGraph();\n var nodeData_1 = graph_1.data;\n var edgeData = graph_1.edgeData;\n var forceModel = graphSeries.getModel('force');\n var initLayout = forceModel.get('initLayout');\n\n if (graphSeries.preservedPoints) {\n nodeData_1.each(function (idx) {\n var id = nodeData_1.getId(idx);\n nodeData_1.setItemLayout(idx, preservedPoints_1[id] || [NaN, NaN]);\n });\n } else if (!initLayout || initLayout === 'none') {\n simpleLayout(graphSeries);\n } else if (initLayout === 'circular') {\n circularLayout(graphSeries, 'value');\n }\n\n var nodeDataExtent_1 = nodeData_1.getDataExtent('value');\n var edgeDataExtent_1 = edgeData.getDataExtent('value'); // let edgeDataExtent = edgeData.getDataExtent('value');\n\n var repulsion = forceModel.get('repulsion');\n var edgeLength = forceModel.get('edgeLength');\n var repulsionArr_1 = zrUtil.isArray(repulsion) ? repulsion : [repulsion, repulsion];\n var edgeLengthArr_1 = zrUtil.isArray(edgeLength) ? edgeLength : [edgeLength, edgeLength]; // Larger value has smaller length\n\n edgeLengthArr_1 = [edgeLengthArr_1[1], edgeLengthArr_1[0]];\n var nodes_1 = nodeData_1.mapArray('value', function (value, idx) {\n var point = nodeData_1.getItemLayout(idx);\n var rep = linearMap(value, nodeDataExtent_1, repulsionArr_1);\n\n if (isNaN(rep)) {\n rep = (repulsionArr_1[0] + repulsionArr_1[1]) / 2;\n }\n\n return {\n w: rep,\n rep: rep,\n fixed: nodeData_1.getItemModel(idx).get('fixed'),\n p: !point || isNaN(point[0]) || isNaN(point[1]) ? null : point\n };\n });\n var edges = edgeData.mapArray('value', function (value, idx) {\n var edge = graph_1.getEdgeByIndex(idx);\n var d = linearMap(value, edgeDataExtent_1, edgeLengthArr_1);\n\n if (isNaN(d)) {\n d = (edgeLengthArr_1[0] + edgeLengthArr_1[1]) / 2;\n }\n\n var edgeModel = edge.getModel();\n var curveness = zrUtil.retrieve3(edge.getModel().get(['lineStyle', 'curveness']), -getCurvenessForEdge(edge, graphSeries, idx, true), 0);\n return {\n n1: nodes_1[edge.node1.dataIndex],\n n2: nodes_1[edge.node2.dataIndex],\n d: d,\n curveness: curveness,\n ignoreForceLayout: edgeModel.get('ignoreForceLayout')\n };\n }); // let coordSys = graphSeries.coordinateSystem;\n\n var rect = coordSys.getBoundingRect();\n var forceInstance = forceLayout(nodes_1, edges, {\n rect: rect,\n gravity: forceModel.get('gravity'),\n friction: forceModel.get('friction')\n });\n forceInstance.beforeStep(function (nodes, edges) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n if (nodes[i].fixed) {\n // Write back to layout instance\n vec2.copy(nodes[i].p, graph_1.getNodeByIndex(i).getLayout());\n }\n }\n });\n forceInstance.afterStep(function (nodes, edges, stopped) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n if (!nodes[i].fixed) {\n graph_1.getNodeByIndex(i).setLayout(nodes[i].p);\n }\n\n preservedPoints_1[nodeData_1.getId(i)] = nodes[i].p;\n }\n\n for (var i = 0, l = edges.length; i < l; i++) {\n var e = edges[i];\n var edge = graph_1.getEdgeByIndex(i);\n var p1 = e.n1.p;\n var p2 = e.n2.p;\n var points = edge.getLayout();\n points = points ? points.slice() : [];\n points[0] = points[0] || [];\n points[1] = points[1] || [];\n vec2.copy(points[0], p1);\n vec2.copy(points[1], p2);\n\n if (+e.curveness) {\n points[2] = [(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * e.curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * e.curveness];\n }\n\n edge.setLayout(points);\n }\n });\n graphSeries.forceLayout = forceInstance;\n graphSeries.preservedPoints = preservedPoints_1; // Step to get the layout\n\n forceInstance.step();\n } else {\n // Remove prev injected forceLayout instance\n graphSeries.forceLayout = null;\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\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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// FIXME Where to create the simple view coordinate system\nimport View from '../../coord/View';\nimport { getLayoutRect } from '../../util/layout';\nimport * as bbox from 'zrender/lib/core/bbox';\nimport { extend } from 'zrender/lib/core/util';\n\nfunction getViewRect(seriesModel, api, aspect) {\n var option = extend(seriesModel.getBoxLayoutParams(), {\n aspect: aspect\n });\n return getLayoutRect(option, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n\nexport default function createViewCoordSys(ecModel, api) {\n var viewList = [];\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var coordSysType = seriesModel.get('coordinateSystem');\n\n if (!coordSysType || coordSysType === 'view') {\n var data_1 = seriesModel.getData();\n var positions = data_1.mapArray(function (idx) {\n var itemModel = data_1.getItemModel(idx);\n return [+itemModel.get('x'), +itemModel.get('y')];\n });\n var min = [];\n var max = [];\n bbox.fromPoints(positions, min, max); // If width or height is 0\n\n if (max[0] - min[0] === 0) {\n max[0] += 1;\n min[0] -= 1;\n }\n\n if (max[1] - min[1] === 0) {\n max[1] += 1;\n min[1] -= 1;\n }\n\n var aspect = (max[0] - min[0]) / (max[1] - min[1]); // FIXME If get view rect after data processed?\n\n var viewRect = getViewRect(seriesModel, api, aspect); // Position may be NaN, use view rect instead\n\n if (isNaN(aspect)) {\n min = [viewRect.x, viewRect.y];\n max = [viewRect.x + viewRect.width, viewRect.y + viewRect.height];\n }\n\n var bbWidth = max[0] - min[0];\n var bbHeight = max[1] - min[1];\n var viewWidth = viewRect.width;\n var viewHeight = viewRect.height;\n var viewCoordSys = seriesModel.coordinateSystem = new View();\n viewCoordSys.zoomLimit = seriesModel.get('scaleLimit');\n viewCoordSys.setBoundingRect(min[0], min[1], bbWidth, bbHeight);\n viewCoordSys.setViewRect(viewRect.x, viewRect.y, viewWidth, viewHeight); // Update roam info\n\n viewCoordSys.setCenter(seriesModel.get('center'));\n viewCoordSys.setZoom(seriesModel.get('zoom'));\n viewList.push(viewCoordSys);\n }\n });\n return viewList;\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/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport * as curveTool from 'zrender/lib/core/curve';\nimport * as vec2 from 'zrender/lib/core/vector';\nimport { getSymbolSize } from './graphHelper';\nvar v1 = [];\nvar v2 = [];\nvar v3 = [];\nvar quadraticAt = curveTool.quadraticAt;\nvar v2DistSquare = vec2.distSquare;\nvar mathAbs = Math.abs;\n\nfunction intersectCurveCircle(curvePoints, center, radius) {\n var p0 = curvePoints[0];\n var p1 = curvePoints[1];\n var p2 = curvePoints[2];\n var d = Infinity;\n var t;\n var radiusSquare = radius * radius;\n var interval = 0.1;\n\n for (var _t = 0.1; _t <= 0.9; _t += 0.1) {\n v1[0] = quadraticAt(p0[0], p1[0], p2[0], _t);\n v1[1] = quadraticAt(p0[1], p1[1], p2[1], _t);\n var diff = mathAbs(v2DistSquare(v1, center) - radiusSquare);\n\n if (diff < d) {\n d = diff;\n t = _t;\n }\n } // Assume the segment is monotone,Find root through Bisection method\n // At most 32 iteration\n\n\n for (var i = 0; i < 32; i++) {\n // let prev = t - interval;\n var next = t + interval; // v1[0] = quadraticAt(p0[0], p1[0], p2[0], prev);\n // v1[1] = quadraticAt(p0[1], p1[1], p2[1], prev);\n\n v2[0] = quadraticAt(p0[0], p1[0], p2[0], t);\n v2[1] = quadraticAt(p0[1], p1[1], p2[1], t);\n v3[0] = quadraticAt(p0[0], p1[0], p2[0], next);\n v3[1] = quadraticAt(p0[1], p1[1], p2[1], next);\n var diff = v2DistSquare(v2, center) - radiusSquare;\n\n if (mathAbs(diff) < 1e-2) {\n break;\n } // let prevDiff = v2DistSquare(v1, center) - radiusSquare;\n\n\n var nextDiff = v2DistSquare(v3, center) - radiusSquare;\n interval /= 2;\n\n if (diff < 0) {\n if (nextDiff >= 0) {\n t = t + interval;\n } else {\n t = t - interval;\n }\n } else {\n if (nextDiff >= 0) {\n t = t - interval;\n } else {\n t = t + interval;\n }\n }\n }\n\n return t;\n} // Adjust edge to avoid\n\n\nexport default function adjustEdge(graph, scale) {\n var tmp0 = [];\n var quadraticSubdivide = curveTool.quadraticSubdivide;\n var pts = [[], [], []];\n var pts2 = [[], []];\n var v = [];\n scale /= 2;\n graph.eachEdge(function (edge, idx) {\n var linePoints = edge.getLayout();\n var fromSymbol = edge.getVisual('fromSymbol');\n var toSymbol = edge.getVisual('toSymbol');\n\n if (!linePoints.__original) {\n linePoints.__original = [vec2.clone(linePoints[0]), vec2.clone(linePoints[1])];\n\n if (linePoints[2]) {\n linePoints.__original.push(vec2.clone(linePoints[2]));\n }\n }\n\n var originalPoints = linePoints.__original; // Quadratic curve\n\n if (linePoints[2] != null) {\n vec2.copy(pts[0], originalPoints[0]);\n vec2.copy(pts[1], originalPoints[2]);\n vec2.copy(pts[2], originalPoints[1]);\n\n if (fromSymbol && fromSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node1);\n var t = intersectCurveCircle(pts, originalPoints[0], symbolSize * scale); // Subdivide and get the second\n\n quadraticSubdivide(pts[0][0], pts[1][0], pts[2][0], t, tmp0);\n pts[0][0] = tmp0[3];\n pts[1][0] = tmp0[4];\n quadraticSubdivide(pts[0][1], pts[1][1], pts[2][1], t, tmp0);\n pts[0][1] = tmp0[3];\n pts[1][1] = tmp0[4];\n }\n\n if (toSymbol && toSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node2);\n var t = intersectCurveCircle(pts, originalPoints[1], symbolSize * scale); // Subdivide and get the first\n\n quadraticSubdivide(pts[0][0], pts[1][0], pts[2][0], t, tmp0);\n pts[1][0] = tmp0[1];\n pts[2][0] = tmp0[2];\n quadraticSubdivide(pts[0][1], pts[1][1], pts[2][1], t, tmp0);\n pts[1][1] = tmp0[1];\n pts[2][1] = tmp0[2];\n } // Copy back to layout\n\n\n vec2.copy(linePoints[0], pts[0]);\n vec2.copy(linePoints[1], pts[2]);\n vec2.copy(linePoints[2], pts[1]);\n } // Line\n else {\n vec2.copy(pts2[0], originalPoints[0]);\n vec2.copy(pts2[1], originalPoints[1]);\n vec2.sub(v, pts2[1], pts2[0]);\n vec2.normalize(v, v);\n\n if (fromSymbol && fromSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node1);\n vec2.scaleAndAdd(pts2[0], pts2[0], v, symbolSize * scale);\n }\n\n if (toSymbol && toSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node2);\n vec2.scaleAndAdd(pts2[1], pts2[1], v, -symbolSize * scale);\n }\n\n vec2.copy(linePoints[0], pts2[0]);\n vec2.copy(linePoints[1], pts2[1]);\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\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util';\nimport SymbolDraw from '../helper/SymbolDraw';\nimport LineDraw from '../helper/LineDraw';\nimport RoamController from '../../component/helper/RoamController';\nimport * as roamHelper from '../../component/helper/roamHelper';\nimport { onIrrelevantElement } from '../../component/helper/cursorHelper';\nimport * as graphic from '../../util/graphic';\nimport adjustEdge from './adjustEdge';\nimport { getNodeGlobalScale } from './graphHelper';\nimport ChartView from '../../view/Chart';\nimport { getECData } from '../../util/innerStore';\n\nfunction isViewCoordSys(coordSys) {\n return coordSys.type === 'view';\n}\n\nvar GraphView =\n/** @class */\nfunction (_super) {\n __extends(GraphView, _super);\n\n function GraphView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = GraphView.type;\n return _this;\n }\n\n GraphView.prototype.init = function (ecModel, api) {\n var symbolDraw = new SymbolDraw();\n var lineDraw = new LineDraw();\n var group = this.group;\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {\n target: group\n };\n group.add(symbolDraw.group);\n group.add(lineDraw.group);\n this._symbolDraw = symbolDraw;\n this._lineDraw = lineDraw;\n this._firstRender = true;\n };\n\n GraphView.prototype.render = function (seriesModel, ecModel, api) {\n var _this = this;\n\n var coordSys = seriesModel.coordinateSystem;\n this._model = seriesModel;\n var symbolDraw = this._symbolDraw;\n var lineDraw = this._lineDraw;\n var group = this.group;\n\n if (isViewCoordSys(coordSys)) {\n var groupNewProp = {\n x: coordSys.x,\n y: coordSys.y,\n scaleX: coordSys.scaleX,\n scaleY: coordSys.scaleY\n };\n\n if (this._firstRender) {\n group.attr(groupNewProp);\n } else {\n graphic.updateProps(group, groupNewProp, seriesModel);\n }\n } // Fix edge contact point with node\n\n\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n var data = seriesModel.getData();\n symbolDraw.updateData(data);\n var edgeData = seriesModel.getEdgeData(); // TODO: TYPE\n\n lineDraw.updateData(edgeData);\n\n this._updateNodeAndLinkScale();\n\n this._updateController(seriesModel, ecModel, api);\n\n clearTimeout(this._layoutTimeout);\n var forceLayout = seriesModel.forceLayout;\n var layoutAnimation = seriesModel.get(['force', 'layoutAnimation']);\n\n if (forceLayout) {\n this._startForceLayoutIteration(forceLayout, layoutAnimation);\n }\n\n data.graph.eachNode(function (node) {\n var idx = node.dataIndex;\n var el = node.getGraphicEl();\n var itemModel = node.getModel(); // Update draggable\n\n el.off('drag').off('dragend');\n var draggable = itemModel.get('draggable');\n\n if (draggable) {\n el.on('drag', function () {\n if (forceLayout) {\n forceLayout.warmUp();\n !_this._layouting && _this._startForceLayoutIteration(forceLayout, layoutAnimation);\n forceLayout.setFixed(idx); // Write position back to layout\n\n data.setItemLayout(idx, [el.x, el.y]);\n }\n }).on('dragend', function () {\n if (forceLayout) {\n forceLayout.setUnfixed(idx);\n }\n });\n }\n\n el.setDraggable(draggable && !!forceLayout);\n var focus = itemModel.get(['emphasis', 'focus']);\n\n if (focus === 'adjacency') {\n getECData(el).focus = node.getAdjacentDataIndices();\n }\n });\n data.graph.eachEdge(function (edge) {\n var el = edge.getGraphicEl();\n var focus = edge.getModel().get(['emphasis', 'focus']);\n\n if (focus === 'adjacency') {\n getECData(el).focus = {\n edge: [edge.dataIndex],\n node: [edge.node1.dataIndex, edge.node2.dataIndex]\n };\n }\n });\n var circularRotateLabel = seriesModel.get('layout') === 'circular' && seriesModel.get(['circular', 'rotateLabel']);\n var cx = data.getLayout('cx');\n var cy = data.getLayout('cy');\n data.eachItemGraphicEl(function (el, idx) {\n var itemModel = data.getItemModel(idx);\n var labelRotate = itemModel.get(['label', 'rotate']) || 0;\n var symbolPath = el.getSymbolPath();\n\n if (circularRotateLabel) {\n var pos = data.getItemLayout(idx);\n var rad = Math.atan2(pos[1] - cy, pos[0] - cx);\n\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n\n var isLeft = pos[0] < cx;\n\n if (isLeft) {\n rad = rad - Math.PI;\n }\n\n var textPosition = isLeft ? 'left' : 'right';\n symbolPath.setTextConfig({\n rotation: -rad,\n position: textPosition,\n origin: 'center'\n });\n var emphasisState = symbolPath.ensureState('emphasis');\n zrUtil.extend(emphasisState.textConfig || (emphasisState.textConfig = {}), {\n position: textPosition\n });\n } else {\n symbolPath.setTextConfig({\n rotation: labelRotate *= Math.PI / 180\n });\n }\n });\n this._firstRender = false;\n };\n\n GraphView.prototype.dispose = function () {\n this._controller && this._controller.dispose();\n this._controllerHost = null;\n };\n\n GraphView.prototype._startForceLayoutIteration = function (forceLayout, layoutAnimation) {\n var self = this;\n\n (function step() {\n forceLayout.step(function (stopped) {\n self.updateLayout(self._model);\n (self._layouting = !stopped) && (layoutAnimation ? self._layoutTimeout = setTimeout(step, 16) : step());\n });\n })();\n };\n\n GraphView.prototype._updateController = function (seriesModel, ecModel, api) {\n var _this = this;\n\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n var group = this.group;\n controller.setPointerChecker(function (e, x, y) {\n var rect = group.getBoundingRect();\n rect.applyTransform(group.transform);\n return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel);\n });\n\n if (!isViewCoordSys(seriesModel.coordinateSystem)) {\n controller.disable();\n return;\n }\n\n controller.enable(seriesModel.get('roam'));\n controllerHost.zoomLimit = seriesModel.get('scaleLimit');\n controllerHost.zoom = seriesModel.coordinateSystem.getZoom();\n controller.off('pan').off('zoom').on('pan', function (e) {\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'graphRoam',\n dx: e.dx,\n dy: e.dy\n });\n }).on('zoom', function (e) {\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'graphRoam',\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY\n });\n\n _this._updateNodeAndLinkScale();\n\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n\n _this._lineDraw.updateLayout(); // Only update label layout on zoom\n\n\n api.updateLabelLayout();\n });\n };\n\n GraphView.prototype._updateNodeAndLinkScale = function () {\n var seriesModel = this._model;\n var data = seriesModel.getData();\n var nodeScale = getNodeGlobalScale(seriesModel);\n data.eachItemGraphicEl(function (el, idx) {\n el.setSymbolScale(nodeScale);\n });\n };\n\n GraphView.prototype.updateLayout = function (seriesModel) {\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n\n this._symbolDraw.updateLayout();\n\n this._lineDraw.updateLayout();\n };\n\n GraphView.prototype.remove = function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove();\n this._lineDraw && this._lineDraw.remove();\n };\n\n GraphView.type = 'graph';\n return GraphView;\n}(ChartView);\n\nexport default GraphView;","\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/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport { __extends } from \"tslib\";\nimport List from '../../data/List';\nimport * as zrUtil from 'zrender/lib/core/util';\nimport { defaultEmphasis } from '../../util/model';\nimport Model from '../../model/Model';\nimport createGraphFromNodeEdge from '../helper/createGraphFromNodeEdge';\nimport LegendVisualProvider from '../../visual/LegendVisualProvider';\nimport SeriesModel from '../../model/Series';\nimport { createTooltipMarkup } from '../../component/tooltip/tooltipMarkup';\nimport { defaultSeriesFormatTooltip } from '../../component/tooltip/seriesFormatTooltip';\nimport { initCurvenessList, createEdgeMapForCurveness } from '../helper/multipleGraphEdgeHelper';\n\nvar GraphSeriesModel =\n/** @class */\nfunction (_super) {\n __extends(GraphSeriesModel, _super);\n\n function GraphSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = GraphSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n\n GraphSeriesModel.prototype.init = function (option) {\n _super.prototype.init.apply(this, arguments);\n\n var self = this;\n\n function getCategoriesData() {\n return self._categoriesData;\n } // Provide data for legend select\n\n\n this.legendVisualProvider = new LegendVisualProvider(getCategoriesData, getCategoriesData);\n this.fillDataTextStyle(option.edges || option.links);\n\n this._updateCategoriesData();\n };\n\n GraphSeriesModel.prototype.mergeOption = function (option) {\n _super.prototype.mergeOption.apply(this, arguments);\n\n this.fillDataTextStyle(option.edges || option.links);\n\n this._updateCategoriesData();\n };\n\n GraphSeriesModel.prototype.mergeDefaultAndTheme = function (option) {\n _super.prototype.mergeDefaultAndTheme.apply(this, arguments);\n\n defaultEmphasis(option, 'edgeLabel', ['show']);\n };\n\n GraphSeriesModel.prototype.getInitialData = function (option, ecModel) {\n var edges = option.edges || option.links || [];\n var nodes = option.data || option.nodes || [];\n var self = this;\n\n if (nodes && edges) {\n // auto curveness\n initCurvenessList(this);\n var graph = createGraphFromNodeEdge(nodes, edges, this, true, beforeLink);\n zrUtil.each(graph.edges, function (edge) {\n createEdgeMapForCurveness(edge.node1, edge.node2, this, edge.dataIndex);\n }, this);\n return graph.data;\n }\n\n function beforeLink(nodeData, edgeData) {\n // Overwrite nodeData.getItemModel to\n nodeData.wrapMethod('getItemModel', function (model) {\n var categoriesModels = self._categoriesModels;\n var categoryIdx = model.getShallow('category');\n var categoryModel = categoriesModels[categoryIdx];\n\n if (categoryModel) {\n categoryModel.parentModel = model.parentModel;\n model.parentModel = categoryModel;\n }\n\n return model;\n }); // TODO Inherit resolveParentPath by default in Model#getModel?\n\n var oldGetModel = Model.prototype.getModel;\n\n function newGetModel(path, parentModel) {\n var model = oldGetModel.call(this, path, parentModel);\n model.resolveParentPath = resolveParentPath;\n return model;\n }\n\n edgeData.wrapMethod('getItemModel', function (model) {\n model.resolveParentPath = resolveParentPath;\n model.getModel = newGetModel;\n return model;\n });\n\n function resolveParentPath(pathArr) {\n if (pathArr && (pathArr[0] === 'label' || pathArr[1] === 'label')) {\n var newPathArr = pathArr.slice();\n\n if (pathArr[0] === 'label') {\n newPathArr[0] = 'edgeLabel';\n } else if (pathArr[1] === 'label') {\n newPathArr[1] = 'edgeLabel';\n }\n\n return newPathArr;\n }\n\n return pathArr;\n }\n }\n };\n\n GraphSeriesModel.prototype.getGraph = function () {\n return this.getData().graph;\n };\n\n GraphSeriesModel.prototype.getEdgeData = function () {\n return this.getGraph().edgeData;\n };\n\n GraphSeriesModel.prototype.getCategoriesData = function () {\n return this._categoriesData;\n };\n\n GraphSeriesModel.prototype.formatTooltip = function (dataIndex, multipleSeries, dataType) {\n if (dataType === 'edge') {\n var nodeData = this.getData();\n var params = this.getDataParams(dataIndex, dataType);\n var edge = nodeData.graph.getEdgeByIndex(dataIndex);\n var sourceName = nodeData.getName(edge.node1.dataIndex);\n var targetName = nodeData.getName(edge.node2.dataIndex);\n var nameArr = [];\n sourceName != null && nameArr.push(sourceName);\n targetName != null && nameArr.push(targetName);\n return createTooltipMarkup('nameValue', {\n name: nameArr.join(' > '),\n value: params.value,\n noValue: params.value == null\n });\n } // dataType === 'node' or empty\n\n\n var nodeMarkup = defaultSeriesFormatTooltip({\n series: this,\n dataIndex: dataIndex,\n multipleSeries: multipleSeries\n });\n return nodeMarkup;\n };\n\n GraphSeriesModel.prototype._updateCategoriesData = function () {\n var categories = zrUtil.map(this.option.categories || [], function (category) {\n // Data must has value\n return category.value != null ? category : zrUtil.extend({\n value: 0\n }, category);\n });\n var categoriesData = new List(['value'], this);\n categoriesData.initData(categories);\n this._categoriesData = categoriesData;\n this._categoriesModels = categoriesData.mapArray(function (idx) {\n return categoriesData.getItemModel(idx);\n });\n };\n\n GraphSeriesModel.prototype.setZoom = function (zoom) {\n this.option.zoom = zoom;\n };\n\n GraphSeriesModel.prototype.setCenter = function (center) {\n this.option.center = center;\n };\n\n GraphSeriesModel.prototype.isAnimationEnabled = function () {\n return _super.prototype.isAnimationEnabled.call(this) // Not enable animation when do force layout\n && !(this.get('layout') === 'force' && this.get(['force', 'layoutAnimation']));\n };\n\n GraphSeriesModel.type = 'series.graph';\n GraphSeriesModel.dependencies = ['grid', 'polar', 'geo', 'singleAxis', 'calendar'];\n GraphSeriesModel.defaultOption = {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n // Default option for all coordinate systems\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // polarIndex: 0,\n // geoIndex: 0,\n legendHoverLink: true,\n layout: null,\n // Configuration of circular layout\n circular: {\n rotateLabel: false\n },\n // Configuration of force directed layout\n force: {\n initLayout: null,\n // Node repulsion. Can be an array to represent range.\n repulsion: [0, 50],\n gravity: 0.1,\n // Initial friction\n friction: 0.6,\n // Edge length. Can be an array to represent range.\n edgeLength: 30,\n layoutAnimation: true\n },\n left: 'center',\n top: 'center',\n // right: null,\n // bottom: null,\n // width: '80%',\n // height: '80%',\n symbol: 'circle',\n symbolSize: 10,\n edgeSymbol: ['none', 'none'],\n edgeSymbolSize: 10,\n edgeLabel: {\n position: 'middle',\n distance: 5\n },\n draggable: false,\n roam: false,\n // Default on center of graph\n center: null,\n zoom: 1,\n // Symbol size scale ratio in roam\n nodeScaleRatio: 0.6,\n // cursor: null,\n // categories: [],\n // data: []\n // Or\n // nodes: []\n //\n // links: []\n // Or\n // edges: []\n label: {\n show: false,\n formatter: '{b}'\n },\n itemStyle: {},\n lineStyle: {\n color: '#aaa',\n width: 1,\n opacity: 0.5\n },\n emphasis: {\n scale: true,\n label: {\n show: true\n }\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n }\n };\n return GraphSeriesModel;\n}(SeriesModel);\n\nexport default GraphSeriesModel;","\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/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport categoryFilter from './categoryFilter';\nimport categoryVisual from './categoryVisual';\nimport edgeVisual from './edgeVisual';\nimport simpleLayout from './simpleLayout';\nimport circularLayout from './circularLayout';\nimport forceLayout from './forceLayout';\nimport createView from './createView';\nimport View from '../../coord/View';\nimport GraphView from './GraphView';\nimport GraphSeriesModel from './GraphSeries';\nimport { updateCenterAndZoom } from '../../action/roamHelper';\nvar actionInfo = {\n type: 'graphRoam',\n event: 'graphRoam',\n update: 'none'\n};\nexport function install(registers) {\n registers.registerChartView(GraphView);\n registers.registerSeriesModel(GraphSeriesModel);\n registers.registerProcessor(categoryFilter);\n registers.registerVisual(categoryVisual);\n registers.registerVisual(edgeVisual);\n registers.registerLayout(simpleLayout);\n registers.registerLayout(registers.PRIORITY.VISUAL.POST_CHART_LAYOUT, circularLayout);\n registers.registerLayout(forceLayout);\n registers.registerCoordinateSystem('graphView', {\n dimensions: View.dimensions,\n create: createView\n }); // Register legacy focus actions\n\n registers.registerAction({\n type: 'focusNodeAdjacency',\n event: 'focusNodeAdjacency',\n update: 'series:focusNodeAdjacency'\n }, function () {});\n registers.registerAction({\n type: 'unfocusNodeAdjacency',\n event: 'unfocusNodeAdjacency',\n update: 'series:unfocusNodeAdjacency'\n }, function () {}); // Register roam action.\n\n registers.registerAction(actionInfo, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\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/*\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/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nexport function updateCenterAndZoom(view, payload, zoomLimit) {\n var previousZoom = view.getZoom();\n var center = view.getCenter();\n var zoom = payload.zoom;\n var point = view.dataToPoint(center);\n\n if (payload.dx != null && payload.dy != null) {\n point[0] -= payload.dx;\n point[1] -= payload.dy;\n view.setCenter(view.pointToData(point));\n }\n\n if (zoom != null) {\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n zoom = Math.max(Math.min(previousZoom * zoom, zoomMax), zoomMin) / previousZoom;\n } // Zoom on given point(originX, originY)\n\n\n view.scaleX *= zoom;\n view.scaleY *= zoom;\n var fixX = (payload.originX - view.x) * (zoom - 1);\n var fixY = (payload.originY - view.y) * (zoom - 1);\n view.x -= fixX;\n view.y -= fixY;\n view.updateTransform(); // Get the new center\n\n view.setCenter(view.pointToData(point));\n view.setZoom(zoom * previousZoom);\n }\n\n return {\n center: view.getCenter(),\n zoom: view.getZoom()\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/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport { __extends } from \"tslib\";\nimport SeriesModel from '../../model/Series';\nimport createListFromArray from '../helper/createListFromArray';\n\nvar BaseBarSeriesModel =\n/** @class */\nfunction (_super) {\n __extends(BaseBarSeriesModel, _super);\n\n function BaseBarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = BaseBarSeriesModel.type;\n return _this;\n }\n\n BaseBarSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {\n useEncodeDefaulter: true\n });\n };\n\n BaseBarSeriesModel.prototype.getMarkerPosition = function (value) {\n var coordSys = this.coordinateSystem;\n\n if (coordSys) {\n // PENDING if clamp ?\n var pt = coordSys.dataToPoint(coordSys.clampData(value));\n var data = this.getData();\n var offset = data.getLayout('offset');\n var size = data.getLayout('size');\n var offsetIndex = coordSys.getBaseAxis().isHorizontal() ? 0 : 1;\n pt[offsetIndex] += offset + size / 2;\n return pt;\n }\n\n return [NaN, NaN];\n };\n\n BaseBarSeriesModel.type = 'series.__base_bar__';\n BaseBarSeriesModel.defaultOption = {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n // stack: null\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n barMinHeight: 0,\n barMinAngle: 0,\n // cursor: null,\n large: false,\n largeThreshold: 400,\n progressive: 3e3,\n progressiveChunkMode: 'mod'\n };\n return BaseBarSeriesModel;\n}(SeriesModel);\n\nSeriesModel.registerClass(BaseBarSeriesModel);\nexport default BaseBarSeriesModel;","\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/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport { __extends } from \"tslib\";\nimport BaseBarSeriesModel from './BaseBarSeries';\nimport createListFromArray from '../helper/createListFromArray';\nimport { inheritDefaultOption } from '../../util/component';\n\nvar BarSeriesModel =\n/** @class */\nfunction (_super) {\n __extends(BarSeriesModel, _super);\n\n function BarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = BarSeriesModel.type;\n return _this;\n }\n\n BarSeriesModel.prototype.getInitialData = function () {\n return createListFromArray(this.getSource(), this, {\n useEncodeDefaulter: true,\n createInvertedIndices: !!this.get('realtimeSort', true) || null\n });\n };\n /**\n * @override\n */\n\n\n BarSeriesModel.prototype.getProgressive = function () {\n // Do not support progressive in normal mode.\n return this.get('large') ? this.get('progressive') : false;\n };\n /**\n * @override\n */\n\n\n BarSeriesModel.prototype.getProgressiveThreshold = function () {\n // Do not support progressive in normal mode.\n var progressiveThreshold = this.get('progressiveThreshold');\n var largeThreshold = this.get('largeThreshold');\n\n if (largeThreshold > progressiveThreshold) {\n progressiveThreshold = largeThreshold;\n }\n\n return progressiveThreshold;\n };\n\n BarSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n return selectors.rect(data.getItemLayout(dataIndex));\n };\n\n BarSeriesModel.type = 'series.bar';\n BarSeriesModel.dependencies = ['grid', 'polar'];\n BarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeriesModel.defaultOption, {\n // If clipped\n // Only available on cartesian2d\n clip: true,\n roundCap: false,\n showBackground: false,\n backgroundStyle: {\n color: 'rgba(180, 180, 180, 0.2)',\n borderColor: null,\n borderWidth: 0,\n borderType: 'solid',\n borderRadius: 0,\n shadowBlur: 0,\n shadowColor: null,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n opacity: 1\n },\n select: {\n itemStyle: {\n borderColor: '#212121'\n }\n },\n realtimeSort: false\n });\n return BarSeriesModel;\n}(BaseBarSeriesModel);\n\nexport default BarSeriesModel;","\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/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport { __extends } from \"tslib\";\nimport Path from 'zrender/lib/graphic/Path';\nimport Group from 'zrender/lib/graphic/Group';\nimport { extend, defaults, each, map } from 'zrender/lib/core/util';\nimport { Rect, Sector, updateProps, initProps, removeElementWithFadeOut } from '../../util/graphic';\nimport { getECData } from '../../util/innerStore';\nimport { enableHoverEmphasis, setStatesStylesFromModel } from '../../util/states';\nimport { setLabelStyle, getLabelStatesModels, setLabelValueAnimation } from '../../label/labelStyle';\nimport { throttle } from '../../util/throttle';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys';\nimport Sausage from '../../util/shape/sausage';\nimport ChartView from '../../view/Chart';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem';\nimport { getDefaultLabel, getDefaultInterpolatedLabel } from '../helper/labelHelper';\nimport { warn } from '../../util/log';\nvar _eventPos = [0, 0];\nvar mathMax = Math.max;\nvar mathMin = Math.min;\n\nfunction getClipArea(coord, data) {\n var coordSysClipArea = coord.getArea && coord.getArea();\n\n if (isCoordinateSystemType(coord, 'cartesian2d')) {\n var baseAxis = coord.getBaseAxis(); // When boundaryGap is false or using time axis. bar may exceed the grid.\n // We should not clip this part.\n // See test/bar2.html\n\n if (baseAxis.type !== 'category' || !baseAxis.onBand) {\n var expandWidth = data.getLayout('bandWidth');\n\n if (baseAxis.isHorizontal()) {\n coordSysClipArea.x -= expandWidth;\n coordSysClipArea.width += expandWidth * 2;\n } else {\n coordSysClipArea.y -= expandWidth;\n coordSysClipArea.height += expandWidth * 2;\n }\n }\n }\n\n return coordSysClipArea;\n}\n\nvar BarView =\n/** @class */\nfunction (_super) {\n __extends(BarView, _super);\n\n function BarView() {\n var _this = _super.call(this) || this;\n\n _this.type = BarView.type;\n _this._isFirstFrame = true;\n return _this;\n }\n\n BarView.prototype.render = function (seriesModel, ecModel, api, payload) {\n this._model = seriesModel;\n\n this._removeOnRenderedListener(api);\n\n this._updateDrawMode(seriesModel);\n\n var coordinateSystemType = seriesModel.get('coordinateSystem');\n\n if (coordinateSystemType === 'cartesian2d' || coordinateSystemType === 'polar') {\n this._isLargeDraw ? this._renderLarge(seriesModel, ecModel, api) : this._renderNormal(seriesModel, ecModel, api, payload);\n } else if (process.env.NODE_ENV !== 'production') {\n warn('Only cartesian2d and polar supported for bar.');\n }\n };\n\n BarView.prototype.incrementalPrepareRender = function (seriesModel) {\n this._clear();\n\n this._updateDrawMode(seriesModel); // incremental also need to clip, otherwise might be overlow.\n // But must not set clip in each frame, otherwise all of the children will be marked redraw.\n\n\n this._updateLargeClip(seriesModel);\n };\n\n BarView.prototype.incrementalRender = function (params, seriesModel) {\n // Do not support progressive in normal mode.\n this._incrementalRenderLarge(params, seriesModel);\n };\n\n BarView.prototype._updateDrawMode = function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n\n if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n\n this._clear();\n }\n };\n\n BarView.prototype._renderNormal = function (seriesModel, ecModel, api, payload) {\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n var coord = seriesModel.coordinateSystem;\n var baseAxis = coord.getBaseAxis();\n var isHorizontalOrRadial;\n\n if (coord.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n } else if (coord.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n }\n\n var animationModel = seriesModel.isAnimationEnabled() ? seriesModel : null;\n var realtimeSortCfg = shouldRealtimeSort(seriesModel, coord);\n\n if (realtimeSortCfg) {\n this._enableRealtimeSort(realtimeSortCfg, data, api);\n }\n\n var needsClip = seriesModel.get('clip', true) || realtimeSortCfg;\n var coordSysClipArea = getClipArea(coord, data); // If there is clipPath created in large mode. Remove it.\n\n group.removeClipPath(); // We don't use clipPath in normal mode because we needs a perfect animation\n // And don't want the label are clipped.\n\n var roundCap = seriesModel.get('roundCap', true);\n var drawBackground = seriesModel.get('showBackground', true);\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var barBorderRadius = backgroundModel.get('borderRadius') || 0;\n var bgEls = [];\n var oldBgEls = this._backgroundEls;\n var isInitSort = payload && payload.isInitSort;\n var isChangeOrder = payload && payload.type === 'changeAxisOrder';\n\n function createBackground(dataIndex) {\n var bgLayout = getLayout[coord.type](data, dataIndex);\n var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);\n bgEl.useStyle(backgroundModel.getItemStyle()); // Only cartesian2d support borderRadius.\n\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n }\n\n bgEls[dataIndex] = bgEl;\n return bgEl;\n }\n\n ;\n data.diff(oldData).add(function (dataIndex) {\n var itemModel = data.getItemModel(dataIndex);\n var layout = getLayout[coord.type](data, dataIndex, itemModel);\n\n if (drawBackground) {\n createBackground(dataIndex);\n } // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in \"axisProxy\".\n\n\n if (!data.hasValue(dataIndex)) {\n return;\n }\n\n var isClipped = false;\n\n if (needsClip) {\n // Clip will modify the layout params.\n // And return a boolean to determine if the shape are fully clipped.\n isClipped = clip[coord.type](coordSysClipArea, layout);\n }\n\n var el = elementCreator[coord.type](seriesModel, data, dataIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, false, roundCap);\n updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\n\n if (isInitSort) {\n el.attr({\n shape: layout\n });\n } else if (realtimeSortCfg) {\n updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, dataIndex, isHorizontalOrRadial, false, false);\n } else {\n initProps(el, {\n shape: layout\n }, seriesModel, dataIndex);\n }\n\n data.setItemGraphicEl(dataIndex, el);\n group.add(el);\n el.ignore = isClipped;\n }).update(function (newIndex, oldIndex) {\n var itemModel = data.getItemModel(newIndex);\n var layout = getLayout[coord.type](data, newIndex, itemModel);\n\n if (drawBackground) {\n var bgEl = void 0;\n\n if (oldBgEls.length === 0) {\n bgEl = createBackground(oldIndex);\n } else {\n bgEl = oldBgEls[oldIndex];\n bgEl.useStyle(backgroundModel.getItemStyle()); // Only cartesian2d support borderRadius.\n\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n }\n\n bgEls[newIndex] = bgEl;\n }\n\n var bgLayout = getLayout[coord.type](data, newIndex);\n var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);\n updateProps(bgEl, {\n shape: shape\n }, animationModel, newIndex);\n }\n\n var el = oldData.getItemGraphicEl(oldIndex);\n\n if (!data.hasValue(newIndex)) {\n group.remove(el);\n el = null;\n return;\n }\n\n var isClipped = false;\n\n if (needsClip) {\n isClipped = clip[coord.type](coordSysClipArea, layout);\n\n if (isClipped) {\n group.remove(el);\n }\n }\n\n if (!el) {\n el = elementCreator[coord.type](seriesModel, data, newIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, !!el, roundCap);\n } // Not change anything if only order changed.\n // Especially not change label.\n\n\n if (!isChangeOrder) {\n updateStyle(el, data, newIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\n }\n\n if (isInitSort) {\n el.attr({\n shape: layout\n });\n } else if (realtimeSortCfg) {\n updateRealtimeAnimation(realtimeSortCfg, animationModel, el, layout, newIndex, isHorizontalOrRadial, true, isChangeOrder);\n } else {\n updateProps(el, {\n shape: layout\n }, seriesModel, newIndex, null);\n }\n\n data.setItemGraphicEl(newIndex, el);\n el.ignore = isClipped;\n group.add(el);\n }).remove(function (dataIndex) {\n var el = oldData.getItemGraphicEl(dataIndex);\n el && removeElementWithFadeOut(el, seriesModel, dataIndex);\n }).execute();\n var bgGroup = this._backgroundGroup || (this._backgroundGroup = new Group());\n bgGroup.removeAll();\n\n for (var i = 0; i < bgEls.length; ++i) {\n bgGroup.add(bgEls[i]);\n }\n\n group.add(bgGroup);\n this._backgroundEls = bgEls;\n this._data = data;\n };\n\n BarView.prototype._renderLarge = function (seriesModel, ecModel, api) {\n this._clear();\n\n createLarge(seriesModel, this.group);\n\n this._updateLargeClip(seriesModel);\n };\n\n BarView.prototype._incrementalRenderLarge = function (params, seriesModel) {\n this._removeBackground();\n\n createLarge(seriesModel, this.group, true);\n };\n\n BarView.prototype._updateLargeClip = function (seriesModel) {\n // Use clipPath in large mode.\n var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;\n\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n };\n\n BarView.prototype._enableRealtimeSort = function (realtimeSortCfg, data, api) {\n var _this = this; // If no data in the first frame, wait for data to initSort\n\n\n if (!data.count()) {\n return;\n }\n\n var baseAxis = realtimeSortCfg.baseAxis;\n\n if (this._isFirstFrame) {\n this._dispatchInitSort(data, realtimeSortCfg, api);\n\n this._isFirstFrame = false;\n } else {\n var orderMapping_1 = function (idx) {\n var el = data.getItemGraphicEl(idx);\n\n if (el) {\n var shape = el.shape; // If data is NaN, shape.xxx may be NaN, so use || 0 here in case\n\n return (baseAxis.isHorizontal() // The result should be consistent with the initial sort by data value.\n // Do not support the case that both positive and negative exist.\n ? Math.abs(shape.height) : Math.abs(shape.width)) || 0;\n } else {\n return 0;\n }\n };\n\n this._onRendered = function () {\n _this._updateSortWithinSameData(data, orderMapping_1, baseAxis, api);\n };\n\n api.getZr().on('rendered', this._onRendered);\n }\n };\n\n BarView.prototype._dataSort = function (data, baseAxis, orderMapping) {\n var info = [];\n data.each(data.mapDimension(baseAxis.dim), function (ordinalNumber, dataIdx) {\n var mappedValue = orderMapping(dataIdx);\n mappedValue = mappedValue == null ? NaN : mappedValue;\n info.push({\n dataIndex: dataIdx,\n mappedValue: mappedValue,\n ordinalNumber: ordinalNumber\n });\n });\n info.sort(function (a, b) {\n // If NaN, it will be treated as min val.\n return b.mappedValue - a.mappedValue;\n });\n return {\n ordinalNumbers: map(info, function (item) {\n return item.ordinalNumber;\n })\n };\n };\n\n BarView.prototype._isOrderChangedWithinSameData = function (data, orderMapping, baseAxis) {\n var scale = baseAxis.scale;\n var ordinalDataDim = data.mapDimension(baseAxis.dim);\n var lastValue = Number.MAX_VALUE;\n\n for (var tickNum = 0, len = scale.getOrdinalMeta().categories.length; tickNum < len; ++tickNum) {\n var rawIdx = data.rawIndexOf(ordinalDataDim, scale.getRawOrdinalNumber(tickNum));\n var value = rawIdx < 0 // If some tick have no bar, the tick will be treated as min.\n ? Number.MIN_VALUE // PENDING: if dataZoom on baseAxis exits, is it a performance issue?\n : orderMapping(data.indexOfRawIndex(rawIdx));\n\n if (value > lastValue) {\n return true;\n }\n\n lastValue = value;\n }\n\n return false;\n };\n /*\n * Consider the case when A and B changed order, whose representing\n * bars are both out of sight, we don't wish to trigger reorder action\n * as long as the order in the view doesn't change.\n */\n\n\n BarView.prototype._isOrderDifferentInView = function (orderInfo, baseAxis) {\n var scale = baseAxis.scale;\n var extent = scale.getExtent();\n var tickNum = Math.max(0, extent[0]);\n var tickMax = Math.min(extent[1], scale.getOrdinalMeta().categories.length - 1);\n\n for (; tickNum <= tickMax; ++tickNum) {\n if (orderInfo.ordinalNumbers[tickNum] !== scale.getRawOrdinalNumber(tickNum)) {\n return true;\n }\n }\n };\n\n BarView.prototype._updateSortWithinSameData = function (data, orderMapping, baseAxis, api) {\n if (!this._isOrderChangedWithinSameData(data, orderMapping, baseAxis)) {\n return;\n }\n\n var sortInfo = this._dataSort(data, baseAxis, orderMapping);\n\n if (this._isOrderDifferentInView(sortInfo, baseAxis)) {\n this._removeOnRenderedListener(api);\n\n api.dispatchAction({\n type: 'changeAxisOrder',\n componentType: baseAxis.dim + 'Axis',\n axisId: baseAxis.index,\n sortInfo: sortInfo\n });\n }\n };\n\n BarView.prototype._dispatchInitSort = function (data, realtimeSortCfg, api) {\n var baseAxis = realtimeSortCfg.baseAxis;\n\n var sortResult = this._dataSort(data, baseAxis, function (dataIdx) {\n return data.get(data.mapDimension(realtimeSortCfg.otherAxis.dim), dataIdx);\n });\n\n api.dispatchAction({\n type: 'changeAxisOrder',\n componentType: baseAxis.dim + 'Axis',\n isInitSort: true,\n axisId: baseAxis.index,\n sortInfo: sortResult,\n animation: {\n // Update the axis label from the natural initial layout to\n // sorted layout should has no animation.\n duration: 0\n }\n });\n };\n\n BarView.prototype.remove = function (ecModel, api) {\n this._clear(this._model);\n\n this._removeOnRenderedListener(api);\n };\n\n BarView.prototype.dispose = function (ecModel, api) {\n this._removeOnRenderedListener(api);\n };\n\n BarView.prototype._removeOnRenderedListener = function (api) {\n if (this._onRendered) {\n api.getZr().off('rendered', this._onRendered);\n this._onRendered = null;\n }\n };\n\n BarView.prototype._clear = function (model) {\n var group = this.group;\n var data = this._data;\n\n if (model && model.isAnimationEnabled() && data && !this._isLargeDraw) {\n this._removeBackground();\n\n this._backgroundEls = [];\n data.eachItemGraphicEl(function (el) {\n removeElementWithFadeOut(el, model, getECData(el).dataIndex);\n });\n } else {\n group.removeAll();\n }\n\n this._data = null;\n this._isFirstFrame = true;\n };\n\n BarView.prototype._removeBackground = function () {\n this.group.remove(this._backgroundGroup);\n this._backgroundGroup = null;\n };\n\n BarView.type = 'bar';\n return BarView;\n}(ChartView);\n\nvar clip = {\n cartesian2d: function (coordSysBoundingRect, layout) {\n var signWidth = layout.width < 0 ? -1 : 1;\n var signHeight = layout.height < 0 ? -1 : 1; // Needs positive width and height\n\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n\n var coordSysX2 = coordSysBoundingRect.x + coordSysBoundingRect.width;\n var coordSysY2 = coordSysBoundingRect.y + coordSysBoundingRect.height;\n var x = mathMax(layout.x, coordSysBoundingRect.x);\n var x2 = mathMin(layout.x + layout.width, coordSysX2);\n var y = mathMax(layout.y, coordSysBoundingRect.y);\n var y2 = mathMin(layout.y + layout.height, coordSysY2);\n var xClipped = x2 < x;\n var yClipped = y2 < y; // When xClipped or yClipped, the element will be marked as `ignore`.\n // But we should also place the element at the edge of the coord sys bounding rect.\n // Beause if data changed and the bar show again, its transition animaiton\n // will begin at this place.\n\n layout.x = xClipped && x > coordSysX2 ? x2 : x;\n layout.y = yClipped && y > coordSysY2 ? y2 : y;\n layout.width = xClipped ? 0 : x2 - x;\n layout.height = yClipped ? 0 : y2 - y; // Reverse back\n\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n\n return xClipped || yClipped;\n },\n polar: function (coordSysClipArea, layout) {\n var signR = layout.r0 <= layout.r ? 1 : -1; // Make sure r is larger than r0\n\n if (signR < 0) {\n var tmp = layout.r;\n layout.r = layout.r0;\n layout.r0 = tmp;\n }\n\n var r = mathMin(layout.r, coordSysClipArea.r);\n var r0 = mathMax(layout.r0, coordSysClipArea.r0);\n layout.r = r;\n layout.r0 = r0;\n var clipped = r - r0 < 0; // Reverse back\n\n if (signR < 0) {\n var tmp = layout.r;\n layout.r = layout.r0;\n layout.r0 = tmp;\n }\n\n return clipped;\n }\n};\nvar elementCreator = {\n cartesian2d: function (seriesModel, data, newIndex, layout, isHorizontal, animationModel, axisModel, isUpdate, roundCap) {\n var rect = new Rect({\n shape: extend({}, layout),\n z2: 1\n });\n rect.__dataIndex = newIndex;\n rect.name = 'item';\n\n if (animationModel) {\n var rectShape = rect.shape;\n var animateProperty = isHorizontal ? 'height' : 'width';\n rectShape[animateProperty] = 0;\n }\n\n return rect;\n },\n polar: function (seriesModel, data, newIndex, layout, isRadial, animationModel, axisModel, isUpdate, roundCap) {\n // Keep the same logic with bar in catesion: use end value to control\n // direction. Notice that if clockwise is true (by default), the sector\n // will always draw clockwisely, no matter whether endAngle is greater\n // or less than startAngle.\n var clockwise = layout.startAngle < layout.endAngle;\n var ShapeClass = !isRadial && roundCap ? Sausage : Sector;\n var sector = new ShapeClass({\n shape: defaults({\n clockwise: clockwise\n }, layout),\n z2: 1\n });\n sector.name = 'item'; // Animation\n\n if (animationModel) {\n var sectorShape = sector.shape;\n var animateProperty = isRadial ? 'r' : 'endAngle';\n var animateTarget = {};\n sectorShape[animateProperty] = isRadial ? 0 : layout.startAngle;\n animateTarget[animateProperty] = layout[animateProperty];\n (isUpdate ? updateProps : initProps)(sector, {\n shape: animateTarget // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue\n\n }, animationModel);\n }\n\n return sector;\n }\n};\n\nfunction shouldRealtimeSort(seriesModel, coordSys) {\n var realtimeSortOption = seriesModel.get('realtimeSort', true);\n var baseAxis = coordSys.getBaseAxis();\n\n if (process.env.NODE_ENV !== 'production') {\n if (realtimeSortOption) {\n if (baseAxis.type !== 'category') {\n warn('`realtimeSort` will not work because this bar series is not based on a category axis.');\n }\n\n if (coordSys.type !== 'cartesian2d') {\n warn('`realtimeSort` will not work because this bar series is not on cartesian2d.');\n }\n }\n }\n\n if (realtimeSortOption && baseAxis.type === 'category' && coordSys.type === 'cartesian2d') {\n return {\n baseAxis: baseAxis,\n otherAxis: coordSys.getOtherAxis(baseAxis)\n };\n }\n}\n\nfunction updateRealtimeAnimation(realtimeSortCfg, seriesAnimationModel, el, layout, newIndex, isHorizontal, isUpdate, isChangeOrder) {\n var seriesTarget;\n var axisTarget;\n\n if (isHorizontal) {\n axisTarget = {\n x: layout.x,\n width: layout.width\n };\n seriesTarget = {\n y: layout.y,\n height: layout.height\n };\n } else {\n axisTarget = {\n y: layout.y,\n height: layout.height\n };\n seriesTarget = {\n x: layout.x,\n width: layout.width\n };\n }\n\n if (!isChangeOrder) {\n // Keep the original growth animation if only axis order changed.\n // Not start a new animation.\n (isUpdate ? updateProps : initProps)(el, {\n shape: seriesTarget\n }, seriesAnimationModel, newIndex, null);\n }\n\n var axisAnimationModel = seriesAnimationModel ? realtimeSortCfg.baseAxis.model : null;\n (isUpdate ? updateProps : initProps)(el, {\n shape: axisTarget\n }, axisAnimationModel, newIndex);\n}\n\nvar getLayout = {\n // itemModel is only used to get borderWidth, which is not needed\n // when calculating bar background layout.\n cartesian2d: function (data, dataIndex, itemModel) {\n var layout = data.getItemLayout(dataIndex);\n var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0; // fix layout with lineWidth\n\n var signX = layout.width > 0 ? 1 : -1;\n var signY = layout.height > 0 ? 1 : -1;\n return {\n x: layout.x + signX * fixedLineWidth / 2,\n y: layout.y + signY * fixedLineWidth / 2,\n width: layout.width - signX * fixedLineWidth,\n height: layout.height - signY * fixedLineWidth\n };\n },\n polar: function (data, dataIndex, itemModel) {\n var layout = data.getItemLayout(dataIndex);\n return {\n cx: layout.cx,\n cy: layout.cy,\n r0: layout.r0,\n r: layout.r,\n startAngle: layout.startAngle,\n endAngle: layout.endAngle\n };\n }\n};\n\nfunction isZeroOnPolar(layout) {\n return layout.startAngle != null && layout.endAngle != null && layout.startAngle === layout.endAngle;\n}\n\nfunction updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontal, isPolar) {\n var style = data.getItemVisual(dataIndex, 'style');\n\n if (!isPolar) {\n el.setShape('r', itemModel.get(['itemStyle', 'borderRadius']) || 0);\n }\n\n el.useStyle(style);\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && el.attr('cursor', cursorStyle);\n\n if (!isPolar) {\n var labelPositionOutside = isHorizontal ? layout.height > 0 ? 'bottom' : 'top' : layout.width > 0 ? 'left' : 'right';\n var labelStatesModels = getLabelStatesModels(itemModel);\n setLabelStyle(el, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: dataIndex,\n defaultText: getDefaultLabel(seriesModel.getData(), dataIndex),\n inheritColor: style.fill,\n defaultOpacity: style.opacity,\n defaultOutsidePosition: labelPositionOutside\n });\n var label = el.getTextContent();\n setLabelValueAnimation(label, labelStatesModels, seriesModel.getRawValue(dataIndex), function (value) {\n return getDefaultInterpolatedLabel(data, value);\n });\n }\n\n var emphasisModel = itemModel.getModel(['emphasis']);\n enableHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'));\n setStatesStylesFromModel(el, itemModel);\n\n if (isZeroOnPolar(layout)) {\n el.style.fill = 'none';\n el.style.stroke = 'none';\n each(el.states, function (state) {\n if (state.style) {\n state.style.fill = state.style.stroke = 'none';\n }\n });\n }\n} // In case width or height are too small.\n\n\nfunction getLineWidth(itemModel, rawLayout) {\n // Has no border.\n var borderColor = itemModel.get(['itemStyle', 'borderColor']);\n\n if (!borderColor || borderColor === 'none') {\n return 0;\n }\n\n var lineWidth = itemModel.get(['itemStyle', 'borderWidth']) || 0; // width or height may be NaN for empty data\n\n var width = isNaN(rawLayout.width) ? Number.MAX_VALUE : Math.abs(rawLayout.width);\n var height = isNaN(rawLayout.height) ? Number.MAX_VALUE : Math.abs(rawLayout.height);\n return Math.min(lineWidth, width, height);\n}\n\nvar LagePathShape =\n/** @class */\nfunction () {\n function LagePathShape() {}\n\n return LagePathShape;\n}();\n\nvar LargePath =\n/** @class */\nfunction (_super) {\n __extends(LargePath, _super);\n\n function LargePath(opts) {\n var _this = _super.call(this, opts) || this;\n\n _this.type = 'largeBar';\n return _this;\n }\n\n ;\n\n LargePath.prototype.getDefaultShape = function () {\n return new LagePathShape();\n };\n\n LargePath.prototype.buildPath = function (ctx, shape) {\n // Drawing lines is more efficient than drawing\n // a whole line or drawing rects.\n var points = shape.points;\n var startPoint = this.__startPoint;\n var baseDimIdx = this.__baseDimIdx;\n\n for (var i = 0; i < points.length; i += 2) {\n startPoint[baseDimIdx] = points[i + baseDimIdx];\n ctx.moveTo(startPoint[0], startPoint[1]);\n ctx.lineTo(points[i], points[i + 1]);\n }\n };\n\n return LargePath;\n}(Path);\n\nfunction createLarge(seriesModel, group, incremental) {\n // TODO support polar\n var data = seriesModel.getData();\n var startPoint = [];\n var baseDimIdx = data.getLayout('valueAxisHorizontal') ? 1 : 0;\n startPoint[1 - baseDimIdx] = data.getLayout('valueAxisStart');\n var largeDataIndices = data.getLayout('largeDataIndices');\n var barWidth = data.getLayout('barWidth');\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var drawBackground = seriesModel.get('showBackground', true);\n\n if (drawBackground) {\n var points = data.getLayout('largeBackgroundPoints');\n var backgroundStartPoint = [];\n backgroundStartPoint[1 - baseDimIdx] = data.getLayout('backgroundStart');\n var bgEl = new LargePath({\n shape: {\n points: points\n },\n incremental: !!incremental,\n silent: true,\n z2: 0\n });\n bgEl.__startPoint = backgroundStartPoint;\n bgEl.__baseDimIdx = baseDimIdx;\n bgEl.__largeDataIndices = largeDataIndices;\n bgEl.__barWidth = barWidth;\n setLargeBackgroundStyle(bgEl, backgroundModel, data);\n group.add(bgEl);\n }\n\n var el = new LargePath({\n shape: {\n points: data.getLayout('largePoints')\n },\n incremental: !!incremental\n });\n el.__startPoint = startPoint;\n el.__baseDimIdx = baseDimIdx;\n el.__largeDataIndices = largeDataIndices;\n el.__barWidth = barWidth;\n group.add(el);\n setLargeStyle(el, seriesModel, data); // Enable tooltip and user mouse/touch event handlers.\n\n getECData(el).seriesIndex = seriesModel.seriesIndex;\n\n if (!seriesModel.get('silent')) {\n el.on('mousedown', largePathUpdateDataIndex);\n el.on('mousemove', largePathUpdateDataIndex);\n }\n} // Use throttle to avoid frequently traverse to find dataIndex.\n\n\nvar largePathUpdateDataIndex = throttle(function (event) {\n var largePath = this;\n var dataIndex = largePathFindDataIndex(largePath, event.offsetX, event.offsetY);\n getECData(largePath).dataIndex = dataIndex >= 0 ? dataIndex : null;\n}, 30, false);\n\nfunction largePathFindDataIndex(largePath, x, y) {\n var baseDimIdx = largePath.__baseDimIdx;\n var valueDimIdx = 1 - baseDimIdx;\n var points = largePath.shape.points;\n var largeDataIndices = largePath.__largeDataIndices;\n var barWidthHalf = Math.abs(largePath.__barWidth / 2);\n var startValueVal = largePath.__startPoint[valueDimIdx];\n _eventPos[0] = x;\n _eventPos[1] = y;\n var pointerBaseVal = _eventPos[baseDimIdx];\n var pointerValueVal = _eventPos[1 - baseDimIdx];\n var baseLowerBound = pointerBaseVal - barWidthHalf;\n var baseUpperBound = pointerBaseVal + barWidthHalf;\n\n for (var i = 0, len = points.length / 2; i < len; i++) {\n var ii = i * 2;\n var barBaseVal = points[ii + baseDimIdx];\n var barValueVal = points[ii + valueDimIdx];\n\n if (barBaseVal >= baseLowerBound && barBaseVal <= baseUpperBound && (startValueVal <= barValueVal ? pointerValueVal >= startValueVal && pointerValueVal <= barValueVal : pointerValueVal >= barValueVal && pointerValueVal <= startValueVal)) {\n return largeDataIndices[i];\n }\n }\n\n return -1;\n}\n\nfunction setLargeStyle(el, seriesModel, data) {\n var globalStyle = data.getVisual('style');\n el.useStyle(extend({}, globalStyle)); // Use stroke instead of fill.\n\n el.style.fill = null;\n el.style.stroke = globalStyle.fill;\n el.style.lineWidth = data.getLayout('barWidth');\n}\n\nfunction setLargeBackgroundStyle(el, backgroundModel, data) {\n var borderColor = backgroundModel.get('borderColor') || backgroundModel.get('color');\n var itemStyle = backgroundModel.getItemStyle();\n el.useStyle(itemStyle);\n el.style.fill = null;\n el.style.stroke = borderColor;\n el.style.lineWidth = data.getLayout('barWidth');\n}\n\nfunction createBackgroundShape(isHorizontalOrRadial, layout, coord) {\n if (isCoordinateSystemType(coord, 'cartesian2d')) {\n var rectShape = layout;\n var coordLayout = coord.getArea();\n return {\n x: isHorizontalOrRadial ? rectShape.x : coordLayout.x,\n y: isHorizontalOrRadial ? coordLayout.y : rectShape.y,\n width: isHorizontalOrRadial ? rectShape.width : coordLayout.width,\n height: isHorizontalOrRadial ? coordLayout.height : rectShape.height\n };\n } else {\n var coordLayout = coord.getArea();\n var sectorShape = layout;\n return {\n cx: coordLayout.cx,\n cy: coordLayout.cy,\n r0: isHorizontalOrRadial ? coordLayout.r0 : sectorShape.r0,\n r: isHorizontalOrRadial ? coordLayout.r : sectorShape.r,\n startAngle: isHorizontalOrRadial ? sectorShape.startAngle : 0,\n endAngle: isHorizontalOrRadial ? sectorShape.endAngle : Math.PI * 2\n };\n }\n}\n\nfunction createBackgroundEl(coord, isHorizontalOrRadial, layout) {\n var ElementClz = coord.type === 'polar' ? Sector : Rect;\n return new ElementClz({\n shape: createBackgroundShape(isHorizontalOrRadial, layout, coord),\n silent: true,\n z2: 0\n });\n}\n\nexport default BarView;","\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/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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*/\nimport * as zrUtil from 'zrender/lib/core/util';\nimport { layout, largeLayout } from '../../layout/barGrid';\nimport dataSample from '../../processor/dataSample';\nimport BarSeries from './BarSeries';\nimport BarView from './BarView';\nexport function install(registers) {\n registers.registerChartView(BarView);\n registers.registerSeriesModel(BarSeries);\n registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, zrUtil.curry(layout, 'bar')); // Use higher prority to avoid to be blocked by other overall layout, which do not\n // only exist in this module, but probably also exist in other modules, like `barPolar`.\n\n registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, largeLayout); // Down sample after filter\n\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('bar'));\n /**\n * @payload\n * @property {string} [componentType=series]\n * @property {number} [dx]\n * @property {number} [dy]\n * @property {number} [zoom]\n * @property {number} [originX]\n * @property {number} [originY]\n */\n\n registers.registerAction({\n type: 'changeAxisOrder',\n event: 'changeAxisOrder',\n update: 'update'\n }, function (payload, ecModel) {\n var componentType = payload.componentType || 'series';\n ecModel.eachComponent({\n mainType: componentType,\n query: payload\n }, function (componentModel) {\n if (payload.sortInfo) {\n componentModel.axis.setCategorySortInfo(payload.sortInfo);\n }\n });\n });\n}"],"sourceRoot":""}