{"version":3,"sources":["webpack:///./node_modules/echarts/lib/model/referHelper.js","webpack:///./node_modules/echarts/lib/chart/helper/createSeriesData.js","webpack:///./node_modules/echarts/lib/chart/line/LineSeries.js","webpack:///./node_modules/echarts/lib/chart/helper/Symbol.js","webpack:///./node_modules/echarts/lib/chart/helper/SymbolDraw.js","webpack:///./node_modules/echarts/lib/chart/line/helper.js","webpack:///./node_modules/echarts/lib/chart/line/lineAnimationDiff.js","webpack:///./node_modules/echarts/lib/chart/line/poly.js","webpack:///./node_modules/echarts/lib/chart/line/LineView.js","webpack:///./node_modules/echarts/lib/layout/points.js","webpack:///./node_modules/echarts/lib/chart/line/install.js","webpack:///./node_modules/echarts/lib/chart/bar/BaseBarSeries.js","webpack:///./node_modules/echarts/lib/chart/bar/BarSeries.js","webpack:///./node_modules/echarts/lib/label/sectorLabel.js","webpack:///./node_modules/echarts/lib/chart/bar/BarView.js","webpack:///./node_modules/echarts/lib/chart/bar/install.js","webpack:///./node_modules/echarts/lib/coord/CoordinateSystem.js","webpack:///./node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js","webpack:///./node_modules/echarts/lib/util/shape/sausage.js","webpack:///./node_modules/echarts/lib/chart/helper/labelHelper.js","webpack:///./node_modules/echarts/lib/processor/dataSample.js"],"names":["CoordSysInfo","coordSysName","this","coordSysDims","axisMap","categoryAxisMap","getCoordSysInfoBySeries","seriesModel","get","result","fetch","fetchers","cartesian2d","xAxisModel","getReferringComponents","models","yAxisModel","set","isCategory","firstCategoryDimIndex","singleAxis","singleAxisModel","polar","polarModel","radiusAxisModel","findAxisModel","angleAxisModel","geo","parallel","ecModel","parallelModel","getComponent","dimensions","slice","parallelAxisIndex","axisIndex","index","axisModel","axisDim","getCoordSysDimDefs","coordSysInfo","coordSysDimDefs","registeredCoordSys","CoordinateSystem","dim","dimInfo","name","axisType","type","getDimensionsInfo","injectOrdinalMeta","dimInfoList","createInvertedIndices","hasNameEncode","dimIndex","coordDim","categoryAxisModel","ordinalMeta","getOrdinalMeta","otherDims","itemName","createSeriesData","sourceRaw","opt","source","sourceManager","getSourceManager","isOriginalSource","getSource","sourceFormat","useEncodeDefaulter","encodeDefaulter","createDimensionOptions","coordDimensions","generateCoord","encodeDefine","getEncode","canOmitUnusedDimensions","schema","store","getSharedDataStore","stackCalculationInfo","data","SeriesData","setCalculationInfo","dimValueGetter","isNeedCompleteOrdinalData","itemOpt","dimName","dataIndex","defaultDimValueGetter","hasItemOption","initData","sampleItem","firstDataNotNull","arr","i","length","_super","LineSeriesModel","_this","apply","arguments","hasSymbolVisual","prototype","getInitialData","option","getLegendIcon","group","Group","line","itemHeight","itemWidth","lineStyle","stroke","add","setStyle","visualType","getData","getVisual","visualRotate","symbolType","size","symbol","itemStyle","fill","symbolRotate","iconRotate","rotation","Math","PI","setOrigin","indexOf","style","lineWidth","dependencies","defaultOption","z","coordinateSystem","legendHoverLink","clip","label","position","endLabel","show","valueAnimation","distance","width","emphasis","scale","step","smooth","smoothMonotone","symbolSize","showSymbol","showAllSymbol","connectNulls","sampling","animationEasing","progressive","hoverLayerThreshold","Infinity","universalTransition","divideShape","triggerLineEvent","Series","LineSeries","Symbol","idx","seriesScope","opts","call","updateData","_createSymbol","keepAspect","removeAll","symbolPath","attr","z2","culling","scaleX","scaleY","drift","driftSymbol","_symbolType","stopSymbolAnimation","toLastFrame","childAt","stopAnimation","getSymbolType","getSymbolPath","highlight","downplay","setZ","zlevel","setDraggable","draggable","hasCursorOption","cursor","silent","getItemVisual","hostModel","getSymbolSize","isInit","disableAnimation","target","_updateCommon","_sizeX","_sizeY","opacity","emphasisItemStyle","blurItemStyle","selectItemStyle","focus","blurScope","emphasisDisabled","labelStatesModels","hoverScale","cursorStyle","itemModel","getItemModel","emphasisModel","getModel","getItemStyle","getShallow","symbolOffset","x","y","symbolStyle","visualColor","pathStyle","useStyle","image","height","__isEmptyBrush","decal","setColor","symbolInnerColor","strokeNoScale","liftZ","z2Origin","_z2","useNameLabel","getLabelDefaultText","getName","labelFetcher","labelDataIndex","defaultText","inheritColor","defaultOpacity","emphasisState","ensureState","scaleRatio","max","isFinite","setSymbolScale","fadeOut","cb","animationOpt","animation","fadeLabel","textContent","getTextContent","removeOpt","removeTextContent","dx","dy","parent","symbolNeedsDraw","point","isNaN","isIgnore","clipShape","contain","normalizeUpdateOpt","makeSeriesScope","SymbolDraw","SymbolCtor","_SymbolCtor","_progressiveEls","oldData","_data","symbolUpdateOpt","getSymbolPoint","getItemLayout","diff","newIdx","symbolEl","setPosition","setItemGraphicEl","update","oldIdx","getItemGraphicEl","newSymbolType","oldSymbolType","remove","el","execute","_getSymbolPoint","updateLayout","eachItemGraphicEl","markRedraw","incrementalPrepareUpdate","_seriesScope","incrementalUpdate","taskParams","updateIncrementalAndHover","isGroup","incremental","hoverLayer","start","end","traverse","push","eachRendered","graphic","enableAnimation","prepareDataCoordInfo","coordSys","valueOrigin","baseAxis","getBaseAxis","valueAxis","getOtherAxis","valueStart","getValueStart","baseAxisDim","valueAxisDim","valueDim","mapDimension","baseDim","baseDataOffset","dims","stacked","stackResultDim","getCalculationInfo","dataDimsForPoint","stackedOverDimension","extent","getExtent","getStackedOnPoint","dataCoordInfo","value","NaN","stackedData","dataToPoint","diffData","newData","diffResult","cmd","idx1","lineAnimationDiff","oldStackedOnPoints","newStackedOnPoints","oldCoordSys","newCoordSys","oldValueOrigin","newValueOrigin","currPoints","nextPoints","currStackedPoints","nextStackedPoints","status","sortedIndices","rawIndices","newDataOldCoordInfo","oldPoints","getLayout","newPoints","diffItem","pointAdded","oldIdx2","newIdx2","currentX","currentY","nextX","nextY","getRawIndex","newDataDimsForPoint","oldPt","stackedOnPoint","sort","a","b","len","sortedCurrPoints","sortedNextPoints","sortedCurrStackedPoints","sortedNextStackedPoints","sortedStatus","i2","idx2","current","next","stackedOnCurrent","stackedOnNext","mathMin","min","mathMax","isPointNull","drawSegment","ctx","points","segLen","allLen","dir","prevX","prevY","cpx0","cpy0","cpx1","cpy1","k","nextIdx","tmpK","ratioNextSeg","vx","vy","nextCpx0","nextCpy0","dx0","dx1","dy0","dy1","lenPrevSeg","lenNextSeg","abs","dir_1","dir_2","sqrt","bezierCurveTo","lineTo","ECPolylineShape","smoothConstraint","ECPolyline","getDefaultStyle","getDefaultShape","buildPath","shape","getPointOn","xOrY","path","createPathProxy","x0","y0","CMD","PathProxy","isDimX","roots","x2","y2","x3","y3","t","M","L","val","C","nRoot","i_1","t_1","Path","ECPolygonShape","ECPolygon","stackedOnPoints","stackedOnSmooth","closePath","isPointsSame","points1","points2","bboxFromPoints","minX","minY","maxX","maxY","getBoundingDiff","_a","min1","max1","_b","min2","max2","getSmooth","getStackedOnPoints","count","pt","turnPointsIntoStep","stepTurnAt","baseIndex","stepPoints","stepPt","nextPt","filteredPoints","middle","stepPt2","clipColorStops","colorStops","maxSize","prevOutOfRangeColorStop","prevInRangeColorStop","newColorStops","lerpStop","stop0","stop1","clippedCoord","coord0","coord","p","color","stop_1","getVisualGradient","api","visualMetaList","visualMeta","getDimensionInfo","dimension","axis","getAxis","stops","stop","toGlobalCoord","dataToCoord","stopLen","outerColors","reverse","colorStopsInRange","getWidth","getHeight","inRangeStopLen","tinyExtent","minCoord","maxCoord","coordSpan","offset","unshift","gradient","getIsIgnoreFunc","isAuto","categoryAxis","getAxesByScale","canShowAllSymbolForCategory","categoryDataDim","labelMap","getViewLabels","labelItem","ordinalNumber","getRawOrdinalNumber","tickValue","hasOwnProperty","axisExtent","availSize","dataLen","round","isHorizontal","getLastIndexNotNull","getPointAtIndex","getIndexRange","dimIdx","prevIndex","nextIndex","range","anyStateShowEndLabel","createLineClipPath","lineView","hasAnimation","endLabelModel_1","valueAnimation_1","data_1","labelAnimationRecord_1","lastFrameIndex","during","percent","clipRect","_endLabelOnDuring","clipPath","_endLabel","originalX","originalY","rectShape","expandSize","getEndLabelStateSpecified","endLabelModel","isBaseInversed","inverse","align","verticalAlign","normal","LineView","init","lineGroup","symbolDraw","_symbolDraw","_lineGroup","render","lineStyleModel","areaStyleModel","isCoordSysPolar","prevCoordSys","_coordSys","polyline","_polyline","polygon","_polygon","ssr","isAreaChart","isEmpty","isIgnoreFunc","__temp","clipShapeForSymbol","getArea","r0","r","_clipShapeForSymbol","_step","_newPolygon","_initOrUpdateEndLabel","oldClipPath","getClipPath","newClipPath","setClipPath","_stackedOnPoints","_points","_doUpdateAnimation","setShape","_initSymbolLabelAnimation","_newPolyline","getLineStyle","lineJoin","emphasisLineStyle","getState","seriesIndex","stackedOnSeries","getAreaStyle","changePolyState","toState","_changePolyState","onHoverStateChange","_valueOrigin","packEventData","eventData","componentType","componentSubType","componentIndex","seriesName","seriesType","payload","model","Array","symbolLabel","Chart","segmentIgnoreThreshold","isHorizontalOrRadial","isAxisInverse","seriesDuration","seriesDelay","seriesDelayValue","polarClip","pointToCoord","startAngle","endAngle","gridClip","ratio","delay","text","animateTo","duration","setToFinal","animateFrom","disableLabelAnimation","data_2","ignoreClip","setTextContent","interpolatedValue","enableTextSetter","textConfig","animationRecord","precision","distanceX","distanceY","dataIndexRange","indices","getRawValue","startValue","endValue","inner","setLabelText","__points","updatedDataInfo","diffStatus","ptIdx","animators","dirtyShape","pointsLayout","forceStoreInTypedArray","plan","createRenderPlanner","reset","pipelineContext","useTypedArray","large","dimLen","getStore","dimIdx0","getDimensionIndex","dimIdx1","progress","params","segCount","tmpIn","tmpOut","setItemLayout","setLayout","install","registers","registerChartView","registerSeriesModel","registerLayout","registerVisual","setVisual","registerProcessor","PRIORITY","PROCESSOR","STATISTIC","dataSample","BaseBarSeriesModel","getMarkerPosition","startingAtTick","clampData","clampData_1","pt_1","getAxes","tickCoords","getTicksCoords","alignTicksWithLabel","getTickModel","targetTickId","isEnd","leftCoord","stepTickValue","tickCoord","offsetIndex","barMinHeight","barMinAngle","largeThreshold","progressiveChunkMode","registerClass","BaseBarSeries","BarSeriesModel","getProgressive","getProgressiveThreshold","progressiveThreshold","brushSelector","selectors","rect","roundCap","showBackground","backgroundStyle","borderColor","borderWidth","borderType","borderRadius","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","select","realtimeSort","BarSeries","createSectorCalculateTextPosition","positionMapping","isRoundCap","out","boundingRect","textPosition","mappedSectorPosition","sector","cx","cy","middleR","middleAngle","extraDist","mathCos","cos","mathSin","sin","textAlign","textVerticalAlign","adjustAngleDistanceX","adjustAngleDistanceY","setSectorTextRotation","rotateType","setTextConfig","anchorAngle","clockwise","rotate","angle","getClipArea","coordSysClipArea","onBand","expandWidth","BarView","_isFirstFrame","_model","_removeOnRenderedListener","_updateDrawMode","coordinateSystemType","_isLargeDraw","_renderLarge","_renderNormal","incrementalPrepareRender","_clear","_updateLargeClip","incrementalRender","_incrementalRenderLarge","isLargeDraw","animationModel","isAnimationEnabled","realtimeSortCfg","shouldRealtimeSort","_enableRealtimeSort","needsClip","removeClipPath","drawBackground","backgroundModel","barBorderRadius","bgEls","oldBgEls","_backgroundEls","isInitSort","isChangeOrder","createBackground","bgLayout","bgEl","createBackgroundEl","layout","hasValue","isValidLayout","isClipped","elementCreator","forceLabelAnimation","updateStyle","updateRealtimeAnimation","ignore","newIndex","oldIndex","createBackgroundShape","textEl","labelInnerStore","prevValue","bgGroup","_backgroundGroup","createLarge","_removeBackground","_dispatchInitSort","orderMapping_1","_onRendered","_updateSortWithinSameData","getZr","on","_dataSort","orderMapping","info","each","dataIdx","mappedValue","ordinalNumbers","item","_isOrderChangedWithinSameData","ordinalDataDim","lastValue","Number","MAX_VALUE","tickNum","categories","rawIdx","rawIndexOf","MIN_VALUE","indexOfRawIndex","_isOrderDifferentInView","orderInfo","tickMax","sortInfo","dispatchAction","axisId","sortResult","otherAxis","dispose","off","coordSysBoundingRect","signWidth","signHeight","coordSysX2","coordSysY2","xClipped","yClipped","signR","tmp","clipped","isUpdate","Rect","__dataIndex","animateProperty","isRadial","ShapeClass","Sector","positionMap","createPolarPositionMapping","calculateTextPosition","sectorShape","animateTarget","realtimeSortOption","seriesAnimationModel","seriesTarget","axisTarget","axisAnimationModel","checkPropertiesNotValid","obj","props","rectPropties","polarPropties","fixedLineWidth","getLineWidth","signX","signY","isZeroOnPolar","arcOrAngle","isPolar","cornerRadius","labelPositionOutside","defaultOutsidePosition","inside","states","state","rawLayout","LagePathShape","LargePath","baseDimIdx","valueDimIdx","startPoint","barWidth","progressiveEls","largeDataIndices","bgPoints","ignoreCoarsePointer","largePathUpdateDataIndex","throttle","event","largePath","largePathFindDataIndex","offsetX","offsetY","ii","coordLayout","ElementClz","VISUAL","LAYOUT","PROGRESSIVE_LAYOUT","registerAction","eachComponent","mainType","query","componentModel","setCategorySortInfo","isCoordinateSystemType","createGridClipPath","cartesian","done","ceil","floor","isAxisInversed","duringCb","createPolarClipPath","sectorArea","createClipPath","SausageShape","SausagePath","dr","rCenter","PI2","lessThanCircle","unitStartX","unitStartY","unitEndX","unitEndY","moveTo","arc","getDefaultLabel","labelDims","mapDimensionsAll","rawVal","vals","join","getDefaultInterpolatedLabel","samplers","average","frame","sum","minmax","turningPointAbsoluteValue","turningPointOriginalValue","originalValue","absoluteValue","nearest","indexSampler","dpr","getDevicePixelRatio","rate","setData","lttbDownSample","sampler","downSample"],"mappings":"4LAwEI,EAA4B,WAC9B,SAASA,EAAaC,GACpBC,KAAKC,aAAe,GACpBD,KAAKE,QAAU,iBACfF,KAAKG,gBAAkB,iBACvBH,KAAKD,aAAeA,EAEtB,OAAOD,EAPuB,GASzB,SAASM,EAAwBC,GACtC,IAAIN,EAAeM,EAAYC,IAAI,oBAC/BC,EAAS,IAAI,EAAaR,GAC1BS,EAAQC,EAASV,GACrB,GAAIS,EAEF,OADAA,EAAMH,EAAaE,EAAQA,EAAOL,QAASK,EAAOJ,iBAC3CI,EAGX,IAAIE,EAAW,CACbC,YAAa,SAAUL,EAAaE,EAAQL,EAASC,GACnD,IAAIQ,EAAaN,EAAYO,uBAAuB,QAAS,QAAkBC,OAAO,GAClFC,EAAaT,EAAYO,uBAAuB,QAAS,QAAkBC,OAAO,GAStFN,EAAON,aAAe,CAAC,IAAK,KAC5BC,EAAQ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Q,MAA0B6G,EAAU,CAC7D,IAAImK,EAAWF,EAASG,cACpBC,EAAYJ,EAASK,aAAaH,GAClCkB,EAASlB,EAASmB,YAClBypB,EAAM7e,EAAI8e,sBAEVn3B,EAAOO,KAAKyS,IAAIxF,EAAO,GAAKA,EAAO,KAAO0pB,GAAO,GACjDE,EAAO72B,KAAKua,MAAMpE,EAAQ1W,GAC9B,GAAIoI,SAASgvB,IAASA,EAAO,EAAG,CACb,SAAbj1B,GACFtJ,EAAYw+B,QAAQ75B,EAAK85B,eAAe95B,EAAKuP,aAAaP,EAAUtR,KAAM,EAAIk8B,IAEhF,IAAIG,OAAU,EACV,eAASp1B,GACXo1B,EAAUhB,EAASp0B,GACV,eAAWA,KACpBo1B,EAAUp1B,GAERo1B,GAEF1+B,EAAYw+B,QAAQ75B,EAAKg6B,WAAWh6B,EAAKuP,aAAaP,EAAUtR,KAAM,EAAIk8B,EAAMG,EAASN","file":"js/chunk-cbe5e828.e3ce310b.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*/\n/**\n * Helper for model references.\n * There are many manners to refer axis/coordSys.\n */\n// TODO\n// merge relevant logic to this file?\n// check: \"modelHelper\" of tooltip and \"BrushTargetManager\".\nimport { createHashMap, retrieve, each } from 'zrender/lib/core/util.js';\nimport { SINGLE_REFERRING } from '../util/model.js';\n/**\n * @class\n * For example:\n * {\n * coordSysName: 'cartesian2d',\n * coordSysDims: ['x', 'y', ...],\n * axisMap: HashMap({\n * x: xAxisModel,\n * y: yAxisModel\n * }),\n * categoryAxisMap: HashMap({\n * x: xAxisModel,\n * y: undefined\n * }),\n * // The index of the first category axis in `coordSysDims`.\n * // `null/undefined` means no category axis exists.\n * firstCategoryDimIndex: 1,\n * // To replace user specified encode.\n * }\n */\nvar CoordSysInfo = /** @class */function () {\n function CoordSysInfo(coordSysName) {\n this.coordSysDims = [];\n this.axisMap = createHashMap();\n this.categoryAxisMap = createHashMap();\n this.coordSysName = coordSysName;\n }\n return CoordSysInfo;\n}();\nexport function getCoordSysInfoBySeries(seriesModel) {\n var coordSysName = seriesModel.get('coordinateSystem');\n var result = new CoordSysInfo(coordSysName);\n var fetch = fetchers[coordSysName];\n if (fetch) {\n fetch(seriesModel, result, result.axisMap, result.categoryAxisMap);\n return result;\n }\n}\nvar fetchers = {\n cartesian2d: function (seriesModel, result, axisMap, categoryAxisMap) {\n var xAxisModel = seriesModel.getReferringComponents('xAxis', SINGLE_REFERRING).models[0];\n var yAxisModel = seriesModel.getReferringComponents('yAxis', SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!xAxisModel) {\n throw new Error('xAxis \"' + retrieve(seriesModel.get('xAxisIndex'), seriesModel.get('xAxisId'), 0) + '\" not found');\n }\n if (!yAxisModel) {\n throw new Error('yAxis \"' + retrieve(seriesModel.get('xAxisIndex'), seriesModel.get('yAxisId'), 0) + '\" not found');\n }\n }\n result.coordSysDims = ['x', 'y'];\n axisMap.set('x', xAxisModel);\n axisMap.set('y', yAxisModel);\n if (isCategory(xAxisModel)) {\n categoryAxisMap.set('x', xAxisModel);\n result.firstCategoryDimIndex = 0;\n }\n if (isCategory(yAxisModel)) {\n categoryAxisMap.set('y', yAxisModel);\n result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1);\n }\n },\n singleAxis: function (seriesModel, result, axisMap, categoryAxisMap) {\n var singleAxisModel = seriesModel.getReferringComponents('singleAxis', SINGLE_REFERRING).models[0];\n if (process.env.NODE_ENV !== 'production') {\n if (!singleAxisModel) {\n throw new Error('singleAxis should be specified.');\n }\n }\n result.coordSysDims = ['single'];\n axisMap.set('single', singleAxisModel);\n if (isCategory(singleAxisModel)) {\n categoryAxisMap.set('single', singleAxisModel);\n result.firstCategoryDimIndex = 0;\n }\n },\n polar: function (seriesModel, result, axisMap, categoryAxisMap) {\n var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n if (process.env.NODE_ENV !== 'production') {\n if (!angleAxisModel) {\n throw new Error('angleAxis option not found');\n }\n if (!radiusAxisModel) {\n throw new Error('radiusAxis option not found');\n }\n }\n result.coordSysDims = ['radius', 'angle'];\n axisMap.set('radius', radiusAxisModel);\n axisMap.set('angle', angleAxisModel);\n if (isCategory(radiusAxisModel)) {\n categoryAxisMap.set('radius', radiusAxisModel);\n result.firstCategoryDimIndex = 0;\n }\n if (isCategory(angleAxisModel)) {\n categoryAxisMap.set('angle', angleAxisModel);\n result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1);\n }\n },\n geo: function (seriesModel, result, axisMap, categoryAxisMap) {\n result.coordSysDims = ['lng', 'lat'];\n },\n parallel: function (seriesModel, result, axisMap, categoryAxisMap) {\n var ecModel = seriesModel.ecModel;\n var parallelModel = ecModel.getComponent('parallel', seriesModel.get('parallelIndex'));\n var coordSysDims = result.coordSysDims = parallelModel.dimensions.slice();\n each(parallelModel.parallelAxisIndex, function (axisIndex, index) {\n var axisModel = ecModel.getComponent('parallelAxis', axisIndex);\n var axisDim = coordSysDims[index];\n axisMap.set(axisDim, axisModel);\n if (isCategory(axisModel)) {\n categoryAxisMap.set(axisDim, axisModel);\n if (result.firstCategoryDimIndex == null) {\n result.firstCategoryDimIndex = index;\n }\n }\n });\n }\n};\nfunction isCategory(axisModel) {\n return axisModel.get('type') === 'category';\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 zrUtil from 'zrender/lib/core/util.js';\nimport SeriesData from '../../data/SeriesData.js';\nimport prepareSeriesDataSchema from '../../data/helper/createDimensions.js';\nimport { getDimensionTypeByAxis } from '../../data/helper/dimensionHelper.js';\nimport { getDataItemValue } from '../../util/model.js';\nimport CoordinateSystem from '../../core/CoordinateSystem.js';\nimport { getCoordSysInfoBySeries } from '../../model/referHelper.js';\nimport { createSourceFromSeriesDataOption } from '../../data/Source.js';\nimport { enableDataStack } from '../../data/helper/dataStackHelper.js';\nimport { makeSeriesEncodeForAxisCoordSys } from '../../data/helper/sourceHelper.js';\nimport { SOURCE_FORMAT_ORIGINAL } from '../../util/types.js';\nfunction getCoordSysDimDefs(seriesModel, coordSysInfo) {\n var coordSysName = seriesModel.get('coordinateSystem');\n var registeredCoordSys = CoordinateSystem.get(coordSysName);\n var coordSysDimDefs;\n if (coordSysInfo && coordSysInfo.coordSysDims) {\n coordSysDimDefs = zrUtil.map(coordSysInfo.coordSysDims, function (dim) {\n var dimInfo = {\n name: dim\n };\n var axisModel = coordSysInfo.axisMap.get(dim);\n if (axisModel) {\n var axisType = axisModel.get('type');\n dimInfo.type = getDimensionTypeByAxis(axisType);\n }\n return dimInfo;\n });\n }\n if (!coordSysDimDefs) {\n // Get dimensions from registered coordinate system\n coordSysDimDefs = registeredCoordSys && (registeredCoordSys.getDimensionsInfo ? registeredCoordSys.getDimensionsInfo() : registeredCoordSys.dimensions.slice()) || ['x', 'y'];\n }\n return coordSysDimDefs;\n}\nfunction injectOrdinalMeta(dimInfoList, createInvertedIndices, coordSysInfo) {\n var firstCategoryDimIndex;\n var hasNameEncode;\n coordSysInfo && zrUtil.each(dimInfoList, function (dimInfo, dimIndex) {\n var coordDim = dimInfo.coordDim;\n var categoryAxisModel = coordSysInfo.categoryAxisMap.get(coordDim);\n if (categoryAxisModel) {\n if (firstCategoryDimIndex == null) {\n firstCategoryDimIndex = dimIndex;\n }\n dimInfo.ordinalMeta = categoryAxisModel.getOrdinalMeta();\n if (createInvertedIndices) {\n dimInfo.createInvertedIndices = true;\n }\n }\n if (dimInfo.otherDims.itemName != null) {\n hasNameEncode = true;\n }\n });\n if (!hasNameEncode && firstCategoryDimIndex != null) {\n dimInfoList[firstCategoryDimIndex].otherDims.itemName = 0;\n }\n return firstCategoryDimIndex;\n}\n/**\n * Caution: there are side effects to `sourceManager` in this method.\n * Should better only be called in `Series['getInitialData']`.\n */\nfunction createSeriesData(sourceRaw, seriesModel, opt) {\n opt = opt || {};\n var sourceManager = seriesModel.getSourceManager();\n var source;\n var isOriginalSource = false;\n if (sourceRaw) {\n isOriginalSource = true;\n source = createSourceFromSeriesDataOption(sourceRaw);\n } else {\n source = sourceManager.getSource();\n // Is series.data. not dataset.\n isOriginalSource = source.sourceFormat === SOURCE_FORMAT_ORIGINAL;\n }\n var coordSysInfo = getCoordSysInfoBySeries(seriesModel);\n var coordSysDimDefs = getCoordSysDimDefs(seriesModel, coordSysInfo);\n var useEncodeDefaulter = opt.useEncodeDefaulter;\n var encodeDefaulter = zrUtil.isFunction(useEncodeDefaulter) ? useEncodeDefaulter : useEncodeDefaulter ? zrUtil.curry(makeSeriesEncodeForAxisCoordSys, coordSysDimDefs, seriesModel) : null;\n var createDimensionOptions = {\n coordDimensions: coordSysDimDefs,\n generateCoord: opt.generateCoord,\n encodeDefine: seriesModel.getEncode(),\n encodeDefaulter: encodeDefaulter,\n canOmitUnusedDimensions: !isOriginalSource\n };\n var schema = prepareSeriesDataSchema(source, createDimensionOptions);\n var firstCategoryDimIndex = injectOrdinalMeta(schema.dimensions, opt.createInvertedIndices, coordSysInfo);\n var store = !isOriginalSource ? sourceManager.getSharedDataStore(schema) : null;\n var stackCalculationInfo = enableDataStack(seriesModel, {\n schema: schema,\n store: store\n });\n var data = new SeriesData(schema, seriesModel);\n data.setCalculationInfo(stackCalculationInfo);\n var dimValueGetter = firstCategoryDimIndex != null && isNeedCompleteOrdinalData(source) ? function (itemOpt, dimName, dataIndex, dimIndex) {\n // Use dataIndex as ordinal value in categoryAxis\n return dimIndex === firstCategoryDimIndex ? dataIndex : this.defaultDimValueGetter(itemOpt, dimName, dataIndex, dimIndex);\n } : null;\n data.hasItemOption = false;\n data.initData(\n // Try to reuse the data store in sourceManager if using dataset.\n isOriginalSource ? source : store, null, dimValueGetter);\n return data;\n}\nfunction isNeedCompleteOrdinalData(source) {\n if (source.sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n var sampleItem = firstDataNotNull(source.data || []);\n return !zrUtil.isArray(getDataItemValue(sampleItem));\n }\n}\nfunction firstDataNotNull(arr) {\n var i = 0;\n while (i < arr.length && arr[i] == null) {\n i++;\n }\n return arr[i];\n}\nexport default createSeriesData;","\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 createSeriesData from '../helper/createSeriesData.js';\nimport SeriesModel from '../../model/Series.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { Group } from '../../util/graphic.js';\nvar LineSeriesModel = /** @class */function (_super) {\n __extends(LineSeriesModel, _super);\n function LineSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LineSeriesModel.type;\n _this.hasSymbolVisual = true;\n return _this;\n }\n LineSeriesModel.prototype.getInitialData = function (option) {\n if (process.env.NODE_ENV !== 'production') {\n var coordSys = option.coordinateSystem;\n if (coordSys !== 'polar' && coordSys !== 'cartesian2d') {\n throw new Error('Line not support coordinateSystem besides cartesian and polar');\n }\n }\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n LineSeriesModel.prototype.getLegendIcon = function (opt) {\n var group = new Group();\n var line = createSymbol('line', 0, opt.itemHeight / 2, opt.itemWidth, 0, opt.lineStyle.stroke, false);\n group.add(line);\n line.setStyle(opt.lineStyle);\n var visualType = this.getData().getVisual('symbol');\n var visualRotate = this.getData().getVisual('symbolRotate');\n var symbolType = visualType === 'none' ? 'circle' : visualType;\n // Symbol size is 80% when there is a line\n var size = opt.itemHeight * 0.8;\n var symbol = createSymbol(symbolType, (opt.itemWidth - size) / 2, (opt.itemHeight - size) / 2, size, size, opt.itemStyle.fill);\n group.add(symbol);\n symbol.setStyle(opt.itemStyle);\n var symbolRotate = opt.iconRotate === 'inherit' ? visualRotate : opt.iconRotate || 0;\n symbol.rotation = symbolRotate * Math.PI / 180;\n symbol.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symbolType.indexOf('empty') > -1) {\n symbol.style.stroke = symbol.style.fill;\n symbol.style.fill = '#fff';\n symbol.style.lineWidth = 2;\n }\n return group;\n };\n LineSeriesModel.type = 'series.line';\n LineSeriesModel.dependencies = ['grid', 'polar'];\n LineSeriesModel.defaultOption = {\n // zlevel: 0,\n z: 3,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n clip: true,\n label: {\n position: 'top'\n },\n // itemStyle: {\n // },\n endLabel: {\n show: false,\n valueAnimation: true,\n distance: 8\n },\n lineStyle: {\n width: 2,\n type: 'solid'\n },\n emphasis: {\n scale: true\n },\n // areaStyle: {\n // origin of areaStyle. Valid values:\n // `'auto'/null/undefined`: from axisLine to data\n // `'start'`: from min to data\n // `'end'`: from data to max\n // origin: 'auto'\n // },\n // false, 'start', 'end', 'middle'\n step: false,\n // Disabled if step is true\n smooth: false,\n smoothMonotone: null,\n symbol: 'emptyCircle',\n symbolSize: 4,\n symbolRotate: null,\n showSymbol: true,\n // `false`: follow the label interval strategy.\n // `true`: show all symbols.\n // `'auto'`: If possible, show all symbols, otherwise\n // follow the label interval strategy.\n showAllSymbol: 'auto',\n // Whether to connect break point.\n connectNulls: false,\n // Sampling for large data. Can be: 'average', 'max', 'min', 'sum', 'lttb'.\n sampling: 'none',\n animationEasing: 'linear',\n // Disable progressive\n progressive: 0,\n hoverLayerThreshold: Infinity,\n universalTransition: {\n divideShape: 'clone'\n },\n triggerLineEvent: false\n };\n return LineSeriesModel;\n}(SeriesModel);\nexport default LineSeriesModel;","\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 { createSymbol, normalizeSymbolOffset, normalizeSymbolSize } from '../../util/symbol.js';\nimport * as graphic from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { enterEmphasis, leaveEmphasis, toggleHoverEmphasis } from '../../util/states.js';\nimport { getDefaultLabel } from './labelHelper.js';\nimport { extend } from 'zrender/lib/core/util.js';\nimport { setLabelStyle, getLabelStatesModels } from '../../label/labelStyle.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar Symbol = /** @class */function (_super) {\n __extends(Symbol, _super);\n function Symbol(data, idx, seriesScope, opts) {\n var _this = _super.call(this) || this;\n _this.updateData(data, idx, seriesScope, opts);\n return _this;\n }\n Symbol.prototype._createSymbol = function (symbolType, data, idx, symbolSize, keepAspect) {\n // Remove paths created before\n this.removeAll();\n // let symbolPath = createSymbol(\n // symbolType, -0.5, -0.5, 1, 1, color\n // );\n // If width/height are set too small (e.g., set to 1) on ios10\n // and macOS Sierra, a circle stroke become a rect, no matter what\n // the scale is set. So we set width/height as 2. See #4150.\n var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, null, keepAspect);\n symbolPath.attr({\n z2: 100,\n culling: true,\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n });\n // Rewrite drift method\n symbolPath.drift = driftSymbol;\n this._symbolType = symbolType;\n this.add(symbolPath);\n };\n /**\n * Stop animation\n * @param {boolean} toLastFrame\n */\n Symbol.prototype.stopSymbolAnimation = function (toLastFrame) {\n this.childAt(0).stopAnimation(null, toLastFrame);\n };\n Symbol.prototype.getSymbolType = function () {\n return this._symbolType;\n };\n /**\n * FIXME:\n * Caution: This method breaks the encapsulation of this module,\n * but it indeed brings convenience. So do not use the method\n * unless you detailedly know all the implements of `Symbol`,\n * especially animation.\n *\n * Get symbol path element.\n */\n Symbol.prototype.getSymbolPath = function () {\n return this.childAt(0);\n };\n /**\n * Highlight symbol\n */\n Symbol.prototype.highlight = function () {\n enterEmphasis(this.childAt(0));\n };\n /**\n * Downplay symbol\n */\n Symbol.prototype.downplay = function () {\n leaveEmphasis(this.childAt(0));\n };\n /**\n * @param {number} zlevel\n * @param {number} z\n */\n Symbol.prototype.setZ = function (zlevel, z) {\n var symbolPath = this.childAt(0);\n symbolPath.zlevel = zlevel;\n symbolPath.z = z;\n };\n Symbol.prototype.setDraggable = function (draggable, hasCursorOption) {\n var symbolPath = this.childAt(0);\n symbolPath.draggable = draggable;\n symbolPath.cursor = !hasCursorOption && draggable ? 'move' : symbolPath.cursor;\n };\n /**\n * Update symbol properties\n */\n Symbol.prototype.updateData = function (data, idx, seriesScope, opts) {\n this.silent = false;\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var seriesModel = data.hostModel;\n var symbolSize = Symbol.getSymbolSize(data, idx);\n var isInit = symbolType !== this._symbolType;\n var disableAnimation = opts && opts.disableAnimation;\n if (isInit) {\n var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect');\n this._createSymbol(symbolType, data, idx, symbolSize, keepAspect);\n } else {\n var symbolPath = this.childAt(0);\n symbolPath.silent = false;\n var target = {\n scaleX: symbolSize[0] / 2,\n scaleY: symbolSize[1] / 2\n };\n disableAnimation ? symbolPath.attr(target) : graphic.updateProps(symbolPath, target, seriesModel, idx);\n saveOldStyle(symbolPath);\n }\n this._updateCommon(data, idx, symbolSize, seriesScope, opts);\n if (isInit) {\n var symbolPath = this.childAt(0);\n if (!disableAnimation) {\n var target = {\n scaleX: this._sizeX,\n scaleY: this._sizeY,\n style: {\n // Always fadeIn. Because it has fadeOut animation when symbol is removed..\n opacity: symbolPath.style.opacity\n }\n };\n symbolPath.scaleX = symbolPath.scaleY = 0;\n symbolPath.style.opacity = 0;\n graphic.initProps(symbolPath, target, seriesModel, idx);\n }\n }\n if (disableAnimation) {\n // Must stop leave transition manually if don't call initProps or updateProps.\n this.childAt(0).stopAnimation('leave');\n }\n };\n Symbol.prototype._updateCommon = function (data, idx, symbolSize, seriesScope, opts) {\n var symbolPath = this.childAt(0);\n var seriesModel = data.hostModel;\n var emphasisItemStyle;\n var blurItemStyle;\n var selectItemStyle;\n var focus;\n var blurScope;\n var emphasisDisabled;\n var labelStatesModels;\n var hoverScale;\n var cursorStyle;\n if (seriesScope) {\n emphasisItemStyle = seriesScope.emphasisItemStyle;\n blurItemStyle = seriesScope.blurItemStyle;\n selectItemStyle = seriesScope.selectItemStyle;\n focus = seriesScope.focus;\n blurScope = seriesScope.blurScope;\n labelStatesModels = seriesScope.labelStatesModels;\n hoverScale = seriesScope.hoverScale;\n cursorStyle = seriesScope.cursorStyle;\n emphasisDisabled = seriesScope.emphasisDisabled;\n }\n if (!seriesScope || data.hasItemOption) {\n var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx);\n var emphasisModel = itemModel.getModel('emphasis');\n emphasisItemStyle = emphasisModel.getModel('itemStyle').getItemStyle();\n selectItemStyle = itemModel.getModel(['select', 'itemStyle']).getItemStyle();\n blurItemStyle = itemModel.getModel(['blur', 'itemStyle']).getItemStyle();\n focus = emphasisModel.get('focus');\n blurScope = emphasisModel.get('blurScope');\n emphasisDisabled = emphasisModel.get('disabled');\n labelStatesModels = getLabelStatesModels(itemModel);\n hoverScale = emphasisModel.getShallow('scale');\n cursorStyle = itemModel.getShallow('cursor');\n }\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);\n var symbolOffset = normalizeSymbolOffset(data.getItemVisual(idx, 'symbolOffset'), symbolSize);\n if (symbolOffset) {\n symbolPath.x = symbolOffset[0];\n symbolPath.y = symbolOffset[1];\n }\n cursorStyle && symbolPath.attr('cursor', cursorStyle);\n var symbolStyle = data.getItemVisual(idx, 'style');\n var visualColor = symbolStyle.fill;\n if (symbolPath instanceof ZRImage) {\n var pathStyle = symbolPath.style;\n symbolPath.useStyle(extend({\n // TODO other properties like x, y ?\n image: pathStyle.image,\n x: pathStyle.x,\n y: pathStyle.y,\n width: pathStyle.width,\n height: pathStyle.height\n }, symbolStyle));\n } else {\n if (symbolPath.__isEmptyBrush) {\n // fill and stroke will be swapped if it's empty.\n // So we cloned a new style to avoid it affecting the original style in visual storage.\n // TODO Better implementation. No empty logic!\n symbolPath.useStyle(extend({}, symbolStyle));\n } else {\n symbolPath.useStyle(symbolStyle);\n }\n // Disable decal because symbol scale will been applied on the decal.\n symbolPath.style.decal = null;\n symbolPath.setColor(visualColor, opts && opts.symbolInnerColor);\n symbolPath.style.strokeNoScale = true;\n }\n var liftZ = data.getItemVisual(idx, 'liftZ');\n var z2Origin = this._z2;\n if (liftZ != null) {\n if (z2Origin == null) {\n this._z2 = symbolPath.z2;\n symbolPath.z2 += liftZ;\n }\n } else if (z2Origin != null) {\n symbolPath.z2 = z2Origin;\n this._z2 = null;\n }\n var useNameLabel = opts && opts.useNameLabel;\n setLabelStyle(symbolPath, labelStatesModels, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: getLabelDefaultText,\n inheritColor: visualColor,\n defaultOpacity: symbolStyle.opacity\n });\n // Do not execute util needed.\n function getLabelDefaultText(idx) {\n return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx);\n }\n this._sizeX = symbolSize[0] / 2;\n this._sizeY = symbolSize[1] / 2;\n var emphasisState = symbolPath.ensureState('emphasis');\n emphasisState.style = emphasisItemStyle;\n symbolPath.ensureState('select').style = selectItemStyle;\n symbolPath.ensureState('blur').style = blurItemStyle;\n // null / undefined / true means to use default strategy.\n // 0 / false / negative number / NaN / Infinity means no scale.\n var scaleRatio = hoverScale == null || hoverScale === true ? Math.max(1.1, 3 / this._sizeY)\n // PENDING: restrict hoverScale > 1? It seems unreasonable to scale down\n : isFinite(hoverScale) && hoverScale > 0 ? +hoverScale : 1;\n // always set scale to allow resetting\n emphasisState.scaleX = this._sizeX * scaleRatio;\n emphasisState.scaleY = this._sizeY * scaleRatio;\n this.setSymbolScale(1);\n toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);\n };\n Symbol.prototype.setSymbolScale = function (scale) {\n this.scaleX = this.scaleY = scale;\n };\n Symbol.prototype.fadeOut = function (cb, seriesModel, opt) {\n var symbolPath = this.childAt(0);\n var dataIndex = getECData(this).dataIndex;\n var animationOpt = opt && opt.animation;\n // Avoid mistaken hover when fading out\n this.silent = symbolPath.silent = true;\n // Not show text when animating\n if (opt && opt.fadeLabel) {\n var textContent = symbolPath.getTextContent();\n if (textContent) {\n graphic.removeElement(textContent, {\n style: {\n opacity: 0\n }\n }, seriesModel, {\n dataIndex: dataIndex,\n removeOpt: animationOpt,\n cb: function () {\n symbolPath.removeTextContent();\n }\n });\n }\n } else {\n symbolPath.removeTextContent();\n }\n graphic.removeElement(symbolPath, {\n style: {\n opacity: 0\n },\n scaleX: 0,\n scaleY: 0\n }, seriesModel, {\n dataIndex: dataIndex,\n cb: cb,\n removeOpt: animationOpt\n });\n };\n Symbol.getSymbolSize = function (data, idx) {\n return normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n };\n return Symbol;\n}(graphic.Group);\nfunction driftSymbol(dx, dy) {\n this.parent.drift(dx, dy);\n}\nexport default Symbol;","\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 graphic from '../../util/graphic.js';\nimport SymbolClz from './Symbol.js';\nimport { isObject } from 'zrender/lib/core/util.js';\nimport { getLabelStatesModels } from '../../label/labelStyle.js';\nfunction symbolNeedsDraw(data, point, idx, opt) {\n return point && !isNaN(point[0]) && !isNaN(point[1]) && !(opt.isIgnore && opt.isIgnore(idx))\n // We do not set clipShape on group, because it will cut part of\n // the symbol element shape. We use the same clip shape here as\n // the line clip.\n && !(opt.clipShape && !opt.clipShape.contain(point[0], point[1])) && data.getItemVisual(idx, 'symbol') !== 'none';\n}\nfunction normalizeUpdateOpt(opt) {\n if (opt != null && !isObject(opt)) {\n opt = {\n isIgnore: opt\n };\n }\n return opt || {};\n}\nfunction makeSeriesScope(data) {\n var seriesModel = data.hostModel;\n var emphasisModel = seriesModel.getModel('emphasis');\n return {\n emphasisItemStyle: emphasisModel.getModel('itemStyle').getItemStyle(),\n blurItemStyle: seriesModel.getModel(['blur', 'itemStyle']).getItemStyle(),\n selectItemStyle: seriesModel.getModel(['select', 'itemStyle']).getItemStyle(),\n focus: emphasisModel.get('focus'),\n blurScope: emphasisModel.get('blurScope'),\n emphasisDisabled: emphasisModel.get('disabled'),\n hoverScale: emphasisModel.get('scale'),\n labelStatesModels: getLabelStatesModels(seriesModel),\n cursorStyle: seriesModel.get('cursor')\n };\n}\nvar SymbolDraw = /** @class */function () {\n function SymbolDraw(SymbolCtor) {\n this.group = new graphic.Group();\n this._SymbolCtor = SymbolCtor || SymbolClz;\n }\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.updateData = function (data, opt) {\n // Remove progressive els.\n this._progressiveEls = null;\n opt = normalizeUpdateOpt(opt);\n var group = this.group;\n var seriesModel = data.hostModel;\n var oldData = this._data;\n var SymbolCtor = this._SymbolCtor;\n var disableAnimation = opt.disableAnimation;\n var seriesScope = makeSeriesScope(data);\n var symbolUpdateOpt = {\n disableAnimation: disableAnimation\n };\n var getSymbolPoint = opt.getSymbolPoint || function (idx) {\n return data.getItemLayout(idx);\n };\n // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n if (!oldData) {\n group.removeAll();\n }\n data.diff(oldData).add(function (newIdx) {\n var point = getSymbolPoint(newIdx);\n if (symbolNeedsDraw(data, point, newIdx, opt)) {\n var symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n data.setItemGraphicEl(newIdx, symbolEl);\n group.add(symbolEl);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n var point = getSymbolPoint(newIdx);\n if (!symbolNeedsDraw(data, point, newIdx, opt)) {\n group.remove(symbolEl);\n return;\n }\n var newSymbolType = data.getItemVisual(newIdx, 'symbol') || 'circle';\n var oldSymbolType = symbolEl && symbolEl.getSymbolType && symbolEl.getSymbolType();\n if (!symbolEl\n // Create a new if symbol type changed.\n || oldSymbolType && oldSymbolType !== newSymbolType) {\n group.remove(symbolEl);\n symbolEl = new SymbolCtor(data, newIdx, seriesScope, symbolUpdateOpt);\n symbolEl.setPosition(point);\n } else {\n symbolEl.updateData(data, newIdx, seriesScope, symbolUpdateOpt);\n var target = {\n x: point[0],\n y: point[1]\n };\n disableAnimation ? symbolEl.attr(target) : graphic.updateProps(symbolEl, target, seriesModel);\n }\n // Add back\n group.add(symbolEl);\n data.setItemGraphicEl(newIdx, symbolEl);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && el.fadeOut(function () {\n group.remove(el);\n }, seriesModel);\n }).execute();\n this._getSymbolPoint = getSymbolPoint;\n this._data = data;\n };\n ;\n SymbolDraw.prototype.updateLayout = function () {\n var _this = this;\n var data = this._data;\n if (data) {\n // Not use animation\n data.eachItemGraphicEl(function (el, idx) {\n var point = _this._getSymbolPoint(idx);\n el.setPosition(point);\n el.markRedraw();\n });\n }\n };\n ;\n SymbolDraw.prototype.incrementalPrepareUpdate = function (data) {\n this._seriesScope = makeSeriesScope(data);\n this._data = null;\n this.group.removeAll();\n };\n ;\n /**\n * Update symbols draw by new data\n */\n SymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) {\n // Clear\n this._progressiveEls = [];\n opt = normalizeUpdateOpt(opt);\n function updateIncrementalAndHover(el) {\n if (!el.isGroup) {\n el.incremental = true;\n el.ensureState('emphasis').hoverLayer = true;\n }\n }\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var point = data.getItemLayout(idx);\n if (symbolNeedsDraw(data, point, idx, opt)) {\n var el = new this._SymbolCtor(data, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n el.setPosition(point);\n this.group.add(el);\n data.setItemGraphicEl(idx, el);\n this._progressiveEls.push(el);\n }\n }\n };\n ;\n SymbolDraw.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n SymbolDraw.prototype.remove = function (enableAnimation) {\n var group = this.group;\n var data = this._data;\n // Incremental model do not have this._data.\n if (data && enableAnimation) {\n data.eachItemGraphicEl(function (el) {\n el.fadeOut(function () {\n group.remove(el);\n }, data.hostModel);\n });\n } else {\n group.removeAll();\n }\n };\n ;\n return SymbolDraw;\n}();\nexport default SymbolDraw;","\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 { isDimensionStacked } from '../../data/helper/dataStackHelper.js';\nimport { isNumber, map } from 'zrender/lib/core/util.js';\nexport function prepareDataCoordInfo(coordSys, data, valueOrigin) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueStart = getValueStart(valueAxis, valueOrigin);\n var baseAxisDim = baseAxis.dim;\n var valueAxisDim = valueAxis.dim;\n var valueDim = data.mapDimension(valueAxisDim);\n var baseDim = data.mapDimension(baseAxisDim);\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var dims = map(coordSys.dimensions, function (coordDim) {\n return data.mapDimension(coordDim);\n });\n var stacked = false;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n if (isDimensionStacked(data, dims[0] /* , dims[1] */)) {\n // jshint ignore:line\n stacked = true;\n dims[0] = stackResultDim;\n }\n if (isDimensionStacked(data, dims[1] /* , dims[0] */)) {\n // jshint ignore:line\n stacked = true;\n dims[1] = stackResultDim;\n }\n return {\n dataDimsForPoint: dims,\n valueStart: valueStart,\n valueAxisDim: valueAxisDim,\n baseAxisDim: baseAxisDim,\n stacked: !!stacked,\n valueDim: valueDim,\n baseDim: baseDim,\n baseDataOffset: baseDataOffset,\n stackedOverDimension: data.getCalculationInfo('stackedOverDimension')\n };\n}\nfunction getValueStart(valueAxis, valueOrigin) {\n var valueStart = 0;\n var extent = valueAxis.scale.getExtent();\n if (valueOrigin === 'start') {\n valueStart = extent[0];\n } else if (valueOrigin === 'end') {\n valueStart = extent[1];\n }\n // If origin is specified as a number, use it as\n // valueStart directly\n else if (isNumber(valueOrigin) && !isNaN(valueOrigin)) {\n valueStart = valueOrigin;\n }\n // auto\n else {\n // Both positive\n if (extent[0] > 0) {\n valueStart = extent[0];\n }\n // Both negative\n else if (extent[1] < 0) {\n valueStart = extent[1];\n }\n // If is one positive, and one negative, onZero shall be true\n }\n\n return valueStart;\n}\nexport function getStackedOnPoint(dataCoordInfo, coordSys, data, idx) {\n var value = NaN;\n if (dataCoordInfo.stacked) {\n value = data.get(data.getCalculationInfo('stackedOverDimension'), idx);\n }\n if (isNaN(value)) {\n value = dataCoordInfo.valueStart;\n }\n var baseDataOffset = dataCoordInfo.baseDataOffset;\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(dataCoordInfo.baseDim, idx);\n stackedData[1 - baseDataOffset] = value;\n return coordSys.dataToPoint(stackedData);\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 { prepareDataCoordInfo, getStackedOnPoint } from './helper.js';\nimport { createFloat32Array } from '../../util/vendor.js';\nfunction diffData(oldData, newData) {\n var diffResult = [];\n newData.diff(oldData).add(function (idx) {\n diffResult.push({\n cmd: '+',\n idx: idx\n });\n }).update(function (newIdx, oldIdx) {\n diffResult.push({\n cmd: '=',\n idx: oldIdx,\n idx1: newIdx\n });\n }).remove(function (idx) {\n diffResult.push({\n cmd: '-',\n idx: idx\n });\n }).execute();\n return diffResult;\n}\nexport default function lineAnimationDiff(oldData, newData, oldStackedOnPoints, newStackedOnPoints, oldCoordSys, newCoordSys, oldValueOrigin, newValueOrigin) {\n var diff = diffData(oldData, newData);\n // let newIdList = newData.mapArray(newData.getId);\n // let oldIdList = oldData.mapArray(oldData.getId);\n // convertToIntId(newIdList, oldIdList);\n // // FIXME One data ?\n // diff = arrayDiff(oldIdList, newIdList);\n var currPoints = [];\n var nextPoints = [];\n // Points for stacking base line\n var currStackedPoints = [];\n var nextStackedPoints = [];\n var status = [];\n var sortedIndices = [];\n var rawIndices = [];\n var newDataOldCoordInfo = prepareDataCoordInfo(oldCoordSys, newData, oldValueOrigin);\n // const oldDataNewCoordInfo = prepareDataCoordInfo(newCoordSys, oldData, newValueOrigin);\n var oldPoints = oldData.getLayout('points') || [];\n var newPoints = newData.getLayout('points') || [];\n for (var i = 0; i < diff.length; i++) {\n var diffItem = diff[i];\n var pointAdded = true;\n var oldIdx2 = void 0;\n var newIdx2 = void 0;\n // FIXME, animation is not so perfect when dataZoom window moves fast\n // Which is in case remvoing or add more than one data in the tail or head\n switch (diffItem.cmd) {\n case '=':\n oldIdx2 = diffItem.idx * 2;\n newIdx2 = diffItem.idx1 * 2;\n var currentX = oldPoints[oldIdx2];\n var currentY = oldPoints[oldIdx2 + 1];\n var nextX = newPoints[newIdx2];\n var nextY = newPoints[newIdx2 + 1];\n // If previous data is NaN, use next point directly\n if (isNaN(currentX) || isNaN(currentY)) {\n currentX = nextX;\n currentY = nextY;\n }\n currPoints.push(currentX, currentY);\n nextPoints.push(nextX, nextY);\n currStackedPoints.push(oldStackedOnPoints[oldIdx2], oldStackedOnPoints[oldIdx2 + 1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(diffItem.idx1));\n break;\n case '+':\n var newIdx = diffItem.idx;\n var newDataDimsForPoint = newDataOldCoordInfo.dataDimsForPoint;\n var oldPt = oldCoordSys.dataToPoint([newData.get(newDataDimsForPoint[0], newIdx), newData.get(newDataDimsForPoint[1], newIdx)]);\n newIdx2 = newIdx * 2;\n currPoints.push(oldPt[0], oldPt[1]);\n nextPoints.push(newPoints[newIdx2], newPoints[newIdx2 + 1]);\n var stackedOnPoint = getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, newIdx);\n currStackedPoints.push(stackedOnPoint[0], stackedOnPoint[1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(newIdx));\n break;\n case '-':\n pointAdded = false;\n }\n // Original indices\n if (pointAdded) {\n status.push(diffItem);\n sortedIndices.push(sortedIndices.length);\n }\n }\n // Diff result may be crossed if all items are changed\n // Sort by data index\n sortedIndices.sort(function (a, b) {\n return rawIndices[a] - rawIndices[b];\n });\n var len = currPoints.length;\n var sortedCurrPoints = createFloat32Array(len);\n var sortedNextPoints = createFloat32Array(len);\n var sortedCurrStackedPoints = createFloat32Array(len);\n var sortedNextStackedPoints = createFloat32Array(len);\n var sortedStatus = [];\n for (var i = 0; i < sortedIndices.length; i++) {\n var idx = sortedIndices[i];\n var i2 = i * 2;\n var idx2 = idx * 2;\n sortedCurrPoints[i2] = currPoints[idx2];\n sortedCurrPoints[i2 + 1] = currPoints[idx2 + 1];\n sortedNextPoints[i2] = nextPoints[idx2];\n sortedNextPoints[i2 + 1] = nextPoints[idx2 + 1];\n sortedCurrStackedPoints[i2] = currStackedPoints[idx2];\n sortedCurrStackedPoints[i2 + 1] = currStackedPoints[idx2 + 1];\n sortedNextStackedPoints[i2] = nextStackedPoints[idx2];\n sortedNextStackedPoints[i2 + 1] = nextStackedPoints[idx2 + 1];\n sortedStatus[i] = status[idx];\n }\n return {\n current: sortedCurrPoints,\n next: sortedNextPoints,\n stackedOnCurrent: sortedCurrStackedPoints,\n stackedOnNext: sortedNextStackedPoints,\n status: sortedStatus\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\";\n// Poly path support NaN point\nimport Path from 'zrender/lib/graphic/Path.js';\nimport PathProxy from 'zrender/lib/core/PathProxy.js';\nimport { cubicRootAt, cubicAt } from 'zrender/lib/core/curve.js';\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nfunction isPointNull(x, y) {\n return isNaN(x) || isNaN(y);\n}\n/**\n * Draw smoothed line in non-monotone, in may cause undesired curve in extreme\n * situations. This should be used when points are non-monotone neither in x or\n * y dimension.\n */\nfunction drawSegment(ctx, points, start, segLen, allLen, dir, smooth, smoothMonotone, connectNulls) {\n var prevX;\n var prevY;\n var cpx0;\n var cpy0;\n var cpx1;\n var cpy1;\n var idx = start;\n var k = 0;\n for (; k < segLen; k++) {\n var x = points[idx * 2];\n var y = points[idx * 2 + 1];\n if (idx >= allLen || idx < 0) {\n break;\n }\n if (isPointNull(x, y)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n break;\n }\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](x, y);\n cpx0 = x;\n cpy0 = y;\n } else {\n var dx = x - prevX;\n var dy = y - prevY;\n // Ignore tiny segment.\n if (dx * dx + dy * dy < 0.5) {\n idx += dir;\n continue;\n }\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextX = points[nextIdx * 2];\n var nextY = points[nextIdx * 2 + 1];\n // Ignore duplicate point\n while (nextX === x && nextY === y && k < segLen) {\n k++;\n nextIdx += dir;\n idx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n x = points[idx * 2];\n y = points[idx * 2 + 1];\n dx = x - prevX;\n dy = y - prevY;\n }\n var tmpK = k + 1;\n if (connectNulls) {\n // Find next point not null\n while (isPointNull(nextX, nextY) && tmpK < segLen) {\n tmpK++;\n nextIdx += dir;\n nextX = points[nextIdx * 2];\n nextY = points[nextIdx * 2 + 1];\n }\n }\n var ratioNextSeg = 0.5;\n var vx = 0;\n var vy = 0;\n var nextCpx0 = void 0;\n var nextCpy0 = void 0;\n // Is last point\n if (tmpK >= segLen || isPointNull(nextX, nextY)) {\n cpx1 = x;\n cpy1 = y;\n } else {\n vx = nextX - prevX;\n vy = nextY - prevY;\n var dx0 = x - prevX;\n var dx1 = nextX - x;\n var dy0 = y - prevY;\n var dy1 = nextY - y;\n var lenPrevSeg = void 0;\n var lenNextSeg = void 0;\n if (smoothMonotone === 'x') {\n lenPrevSeg = Math.abs(dx0);\n lenNextSeg = Math.abs(dx1);\n var dir_1 = vx > 0 ? 1 : -1;\n cpx1 = x - dir_1 * lenPrevSeg * smooth;\n cpy1 = y;\n nextCpx0 = x + dir_1 * lenNextSeg * smooth;\n nextCpy0 = y;\n } else if (smoothMonotone === 'y') {\n lenPrevSeg = Math.abs(dy0);\n lenNextSeg = Math.abs(dy1);\n var dir_2 = vy > 0 ? 1 : -1;\n cpx1 = x;\n cpy1 = y - dir_2 * lenPrevSeg * smooth;\n nextCpx0 = x;\n nextCpy0 = y + dir_2 * lenNextSeg * smooth;\n } else {\n lenPrevSeg = Math.sqrt(dx0 * dx0 + dy0 * dy0);\n lenNextSeg = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n // Use ratio of seg length\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n cpx1 = x - vx * smooth * (1 - ratioNextSeg);\n cpy1 = y - vy * smooth * (1 - ratioNextSeg);\n // cp0 of next segment\n nextCpx0 = x + vx * smooth * ratioNextSeg;\n nextCpy0 = y + vy * smooth * ratioNextSeg;\n // Smooth constraint between point and next point.\n // Avoid exceeding extreme after smoothing.\n nextCpx0 = mathMin(nextCpx0, mathMax(nextX, x));\n nextCpy0 = mathMin(nextCpy0, mathMax(nextY, y));\n nextCpx0 = mathMax(nextCpx0, mathMin(nextX, x));\n nextCpy0 = mathMax(nextCpy0, mathMin(nextY, y));\n // Reclaculate cp1 based on the adjusted cp0 of next seg.\n vx = nextCpx0 - x;\n vy = nextCpy0 - y;\n cpx1 = x - vx * lenPrevSeg / lenNextSeg;\n cpy1 = y - vy * lenPrevSeg / lenNextSeg;\n // Smooth constraint between point and prev point.\n // Avoid exceeding extreme after smoothing.\n cpx1 = mathMin(cpx1, mathMax(prevX, x));\n cpy1 = mathMin(cpy1, mathMax(prevY, y));\n cpx1 = mathMax(cpx1, mathMin(prevX, x));\n cpy1 = mathMax(cpy1, mathMin(prevY, y));\n // Adjust next cp0 again.\n vx = x - cpx1;\n vy = y - cpy1;\n nextCpx0 = x + vx * lenNextSeg / lenPrevSeg;\n nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;\n }\n }\n ctx.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);\n cpx0 = nextCpx0;\n cpy0 = nextCpy0;\n } else {\n ctx.lineTo(x, y);\n }\n }\n prevX = x;\n prevY = y;\n idx += dir;\n }\n return k;\n}\nvar ECPolylineShape = /** @class */function () {\n function ECPolylineShape() {\n this.smooth = 0;\n this.smoothConstraint = true;\n }\n return ECPolylineShape;\n}();\nvar ECPolyline = /** @class */function (_super) {\n __extends(ECPolyline, _super);\n function ECPolyline(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-polyline';\n return _this;\n }\n ECPolyline.prototype.getDefaultStyle = function () {\n return {\n stroke: '#000',\n fill: null\n };\n };\n ECPolyline.prototype.getDefaultShape = function () {\n return new ECPolylineShape();\n };\n ECPolyline.prototype.buildPath = function (ctx, shape) {\n var points = shape.points;\n var i = 0;\n var len = points.length / 2;\n // const result = getBoundingBox(points, shape.smoothConstraint);\n if (shape.connectNulls) {\n // Must remove first and last null values avoid draw error in polygon\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n for (; i < len; i++) {\n if (!isPointNull(points[i * 2], points[i * 2 + 1])) {\n break;\n }\n }\n }\n while (i < len) {\n i += drawSegment(ctx, points, i, len, len, 1, shape.smooth, shape.smoothMonotone, shape.connectNulls) + 1;\n }\n };\n ECPolyline.prototype.getPointOn = function (xOrY, dim) {\n if (!this.path) {\n this.createPathProxy();\n this.buildPath(this.path, this.shape);\n }\n var path = this.path;\n var data = path.data;\n var CMD = PathProxy.CMD;\n var x0;\n var y0;\n var isDimX = dim === 'x';\n var roots = [];\n for (var i = 0; i < data.length;) {\n var cmd = data[i++];\n var x = void 0;\n var y = void 0;\n var x2 = void 0;\n var y2 = void 0;\n var x3 = void 0;\n var y3 = void 0;\n var t = void 0;\n switch (cmd) {\n case CMD.M:\n x0 = data[i++];\n y0 = data[i++];\n break;\n case CMD.L:\n x = data[i++];\n y = data[i++];\n t = isDimX ? (xOrY - x0) / (x - x0) : (xOrY - y0) / (y - y0);\n if (t <= 1 && t >= 0) {\n var val = isDimX ? (y - y0) * t + y0 : (x - x0) * t + x0;\n return isDimX ? [xOrY, val] : [val, xOrY];\n }\n x0 = x;\n y0 = y;\n break;\n case CMD.C:\n x = data[i++];\n y = data[i++];\n x2 = data[i++];\n y2 = data[i++];\n x3 = data[i++];\n y3 = data[i++];\n var nRoot = isDimX ? cubicRootAt(x0, x, x2, x3, xOrY, roots) : cubicRootAt(y0, y, y2, y3, xOrY, roots);\n if (nRoot > 0) {\n for (var i_1 = 0; i_1 < nRoot; i_1++) {\n var t_1 = roots[i_1];\n if (t_1 <= 1 && t_1 >= 0) {\n var val = isDimX ? cubicAt(y0, y, y2, y3, t_1) : cubicAt(x0, x, x2, x3, t_1);\n return isDimX ? [xOrY, val] : [val, xOrY];\n }\n }\n }\n x0 = x3;\n y0 = y3;\n break;\n }\n }\n };\n return ECPolyline;\n}(Path);\nexport { ECPolyline };\nvar ECPolygonShape = /** @class */function (_super) {\n __extends(ECPolygonShape, _super);\n function ECPolygonShape() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ECPolygonShape;\n}(ECPolylineShape);\nvar ECPolygon = /** @class */function (_super) {\n __extends(ECPolygon, _super);\n function ECPolygon(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'ec-polygon';\n return _this;\n }\n ECPolygon.prototype.getDefaultShape = function () {\n return new ECPolygonShape();\n };\n ECPolygon.prototype.buildPath = function (ctx, shape) {\n var points = shape.points;\n var stackedOnPoints = shape.stackedOnPoints;\n var i = 0;\n var len = points.length / 2;\n var smoothMonotone = shape.smoothMonotone;\n if (shape.connectNulls) {\n // Must remove first and last null values avoid draw error in polygon\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n for (; i < len; i++) {\n if (!isPointNull(points[i * 2], points[i * 2 + 1])) {\n break;\n }\n }\n }\n while (i < len) {\n var k = drawSegment(ctx, points, i, len, len, 1, shape.smooth, smoothMonotone, shape.connectNulls);\n drawSegment(ctx, stackedOnPoints, i + k - 1, k, len, -1, shape.stackedOnSmooth, smoothMonotone, shape.connectNulls);\n i += k + 1;\n ctx.closePath();\n }\n };\n return ECPolygon;\n}(Path);\nexport { ECPolygon };","\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\";\n// FIXME step not support polar\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport SymbolDraw from '../helper/SymbolDraw.js';\nimport SymbolClz from '../helper/Symbol.js';\nimport lineAnimationDiff from './lineAnimationDiff.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as modelUtil from '../../util/model.js';\nimport { ECPolyline, ECPolygon } from './poly.js';\nimport ChartView from '../../view/Chart.js';\nimport { prepareDataCoordInfo, getStackedOnPoint } from './helper.js';\nimport { createGridClipPath, createPolarClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { setStatesStylesFromModel, setStatesFlag, toggleHoverEmphasis, SPECIAL_STATES } from '../../util/states.js';\nimport { setLabelStyle, getLabelStatesModels, labelInner } from '../../label/labelStyle.js';\nimport { getDefaultLabel, getDefaultInterpolatedLabel } from '../helper/labelHelper.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { createFloat32Array } from '../../util/vendor.js';\nimport { convertToColorString } from '../../util/format.js';\nimport { lerp } from 'zrender/lib/tool/color.js';\nfunction isPointsSame(points1, points2) {\n if (points1.length !== points2.length) {\n return;\n }\n for (var i = 0; i < points1.length; i++) {\n if (points1[i] !== points2[i]) {\n return;\n }\n }\n return true;\n}\nfunction bboxFromPoints(points) {\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n if (!isNaN(x)) {\n minX = Math.min(x, minX);\n maxX = Math.max(x, maxX);\n }\n if (!isNaN(y)) {\n minY = Math.min(y, minY);\n maxY = Math.max(y, maxY);\n }\n }\n return [[minX, minY], [maxX, maxY]];\n}\nfunction getBoundingDiff(points1, points2) {\n var _a = bboxFromPoints(points1),\n min1 = _a[0],\n max1 = _a[1];\n var _b = bboxFromPoints(points2),\n min2 = _b[0],\n max2 = _b[1];\n // Get a max value from each corner of two boundings.\n return Math.max(Math.abs(min1[0] - min2[0]), Math.abs(min1[1] - min2[1]), Math.abs(max1[0] - max2[0]), Math.abs(max1[1] - max2[1]));\n}\nfunction getSmooth(smooth) {\n return zrUtil.isNumber(smooth) ? smooth : smooth ? 0.5 : 0;\n}\nfunction getStackedOnPoints(coordSys, data, dataCoordInfo) {\n if (!dataCoordInfo.valueDim) {\n return [];\n }\n var len = data.count();\n var points = createFloat32Array(len * 2);\n for (var idx = 0; idx < len; idx++) {\n var pt = getStackedOnPoint(dataCoordInfo, coordSys, data, idx);\n points[idx * 2] = pt[0];\n points[idx * 2 + 1] = pt[1];\n }\n return points;\n}\nfunction turnPointsIntoStep(points, coordSys, stepTurnAt, connectNulls) {\n var baseAxis = coordSys.getBaseAxis();\n var baseIndex = baseAxis.dim === 'x' || baseAxis.dim === 'radius' ? 0 : 1;\n var stepPoints = [];\n var i = 0;\n var stepPt = [];\n var pt = [];\n var nextPt = [];\n var filteredPoints = [];\n if (connectNulls) {\n for (i = 0; i < points.length; i += 2) {\n if (!isNaN(points[i]) && !isNaN(points[i + 1])) {\n filteredPoints.push(points[i], points[i + 1]);\n }\n }\n points = filteredPoints;\n }\n for (i = 0; i < points.length - 2; i += 2) {\n nextPt[0] = points[i + 2];\n nextPt[1] = points[i + 3];\n pt[0] = points[i];\n pt[1] = points[i + 1];\n stepPoints.push(pt[0], pt[1]);\n switch (stepTurnAt) {\n case 'end':\n stepPt[baseIndex] = nextPt[baseIndex];\n stepPt[1 - baseIndex] = pt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n break;\n case 'middle':\n var middle = (pt[baseIndex] + nextPt[baseIndex]) / 2;\n var stepPt2 = [];\n stepPt[baseIndex] = stepPt2[baseIndex] = middle;\n stepPt[1 - baseIndex] = pt[1 - baseIndex];\n stepPt2[1 - baseIndex] = nextPt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n stepPoints.push(stepPt2[0], stepPt2[1]);\n break;\n default:\n // default is start\n stepPt[baseIndex] = pt[baseIndex];\n stepPt[1 - baseIndex] = nextPt[1 - baseIndex];\n stepPoints.push(stepPt[0], stepPt[1]);\n }\n }\n // Last points\n stepPoints.push(points[i++], points[i++]);\n return stepPoints;\n}\n/**\n * Clip color stops to edge. Avoid creating too large gradients.\n * Which may lead to blurry when GPU acceleration is enabled. See #15680\n *\n * The stops has been sorted from small to large.\n */\nfunction clipColorStops(colorStops, maxSize) {\n var newColorStops = [];\n var len = colorStops.length;\n // coord will always < 0 in prevOutOfRangeColorStop.\n var prevOutOfRangeColorStop;\n var prevInRangeColorStop;\n function lerpStop(stop0, stop1, clippedCoord) {\n var coord0 = stop0.coord;\n var p = (clippedCoord - coord0) / (stop1.coord - coord0);\n var color = lerp(p, [stop0.color, stop1.color]);\n return {\n coord: clippedCoord,\n color: color\n };\n }\n for (var i = 0; i < len; i++) {\n var stop_1 = colorStops[i];\n var coord = stop_1.coord;\n if (coord < 0) {\n prevOutOfRangeColorStop = stop_1;\n } else if (coord > maxSize) {\n if (prevInRangeColorStop) {\n newColorStops.push(lerpStop(prevInRangeColorStop, stop_1, maxSize));\n } else if (prevOutOfRangeColorStop) {\n // If there are two stops and coord range is between these two stops\n newColorStops.push(lerpStop(prevOutOfRangeColorStop, stop_1, 0), lerpStop(prevOutOfRangeColorStop, stop_1, maxSize));\n }\n // All following stop will be out of range. So just ignore them.\n break;\n } else {\n if (prevOutOfRangeColorStop) {\n newColorStops.push(lerpStop(prevOutOfRangeColorStop, stop_1, 0));\n // Reset\n prevOutOfRangeColorStop = null;\n }\n newColorStops.push(stop_1);\n prevInRangeColorStop = stop_1;\n }\n }\n return newColorStops;\n}\nfunction getVisualGradient(data, coordSys, api) {\n var visualMetaList = data.getVisual('visualMeta');\n if (!visualMetaList || !visualMetaList.length || !data.count()) {\n // When data.count() is 0, gradient range can not be calculated.\n return;\n }\n if (coordSys.type !== 'cartesian2d') {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Visual map on line style is only supported on cartesian2d.');\n }\n return;\n }\n var coordDim;\n var visualMeta;\n for (var i = visualMetaList.length - 1; i >= 0; i--) {\n var dimInfo = data.getDimensionInfo(visualMetaList[i].dimension);\n coordDim = dimInfo && dimInfo.coordDim;\n // Can only be x or y\n if (coordDim === 'x' || coordDim === 'y') {\n visualMeta = visualMetaList[i];\n break;\n }\n }\n if (!visualMeta) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Visual map on line style only support x or y dimension.');\n }\n return;\n }\n // If the area to be rendered is bigger than area defined by LinearGradient,\n // the canvas spec prescribes that the color of the first stop and the last\n // stop should be used. But if two stops are added at offset 0, in effect\n // browsers use the color of the second stop to render area outside\n // LinearGradient. So we can only infinitesimally extend area defined in\n // LinearGradient to render `outerColors`.\n var axis = coordSys.getAxis(coordDim);\n // dataToCoord mapping may not be linear, but must be monotonic.\n var colorStops = zrUtil.map(visualMeta.stops, function (stop) {\n // offset will be calculated later.\n return {\n coord: axis.toGlobalCoord(axis.dataToCoord(stop.value)),\n color: stop.color\n };\n });\n var stopLen = colorStops.length;\n var outerColors = visualMeta.outerColors.slice();\n if (stopLen && colorStops[0].coord > colorStops[stopLen - 1].coord) {\n colorStops.reverse();\n outerColors.reverse();\n }\n var colorStopsInRange = clipColorStops(colorStops, coordDim === 'x' ? api.getWidth() : api.getHeight());\n var inRangeStopLen = colorStopsInRange.length;\n if (!inRangeStopLen && stopLen) {\n // All stops are out of range. All will be the same color.\n return colorStops[0].coord < 0 ? outerColors[1] ? outerColors[1] : colorStops[stopLen - 1].color : outerColors[0] ? outerColors[0] : colorStops[0].color;\n }\n var tinyExtent = 10; // Arbitrary value: 10px\n var minCoord = colorStopsInRange[0].coord - tinyExtent;\n var maxCoord = colorStopsInRange[inRangeStopLen - 1].coord + tinyExtent;\n var coordSpan = maxCoord - minCoord;\n if (coordSpan < 1e-3) {\n return 'transparent';\n }\n zrUtil.each(colorStopsInRange, function (stop) {\n stop.offset = (stop.coord - minCoord) / coordSpan;\n });\n colorStopsInRange.push({\n // NOTE: inRangeStopLen may still be 0 if stoplen is zero.\n offset: inRangeStopLen ? colorStopsInRange[inRangeStopLen - 1].offset : 0.5,\n color: outerColors[1] || 'transparent'\n });\n colorStopsInRange.unshift({\n offset: inRangeStopLen ? colorStopsInRange[0].offset : 0.5,\n color: outerColors[0] || 'transparent'\n });\n var gradient = new graphic.LinearGradient(0, 0, 0, 0, colorStopsInRange, true);\n gradient[coordDim] = minCoord;\n gradient[coordDim + '2'] = maxCoord;\n return gradient;\n}\nfunction getIsIgnoreFunc(seriesModel, data, coordSys) {\n var showAllSymbol = seriesModel.get('showAllSymbol');\n var isAuto = showAllSymbol === 'auto';\n if (showAllSymbol && !isAuto) {\n return;\n }\n var categoryAxis = coordSys.getAxesByScale('ordinal')[0];\n if (!categoryAxis) {\n return;\n }\n // Note that category label interval strategy might bring some weird effect\n // in some scenario: users may wonder why some of the symbols are not\n // displayed. So we show all symbols as possible as we can.\n if (isAuto\n // Simplify the logic, do not determine label overlap here.\n && canShowAllSymbolForCategory(categoryAxis, data)) {\n return;\n }\n // Otherwise follow the label interval strategy on category axis.\n var categoryDataDim = data.mapDimension(categoryAxis.dim);\n var labelMap = {};\n zrUtil.each(categoryAxis.getViewLabels(), function (labelItem) {\n var ordinalNumber = categoryAxis.scale.getRawOrdinalNumber(labelItem.tickValue);\n labelMap[ordinalNumber] = 1;\n });\n return function (dataIndex) {\n return !labelMap.hasOwnProperty(data.get(categoryDataDim, dataIndex));\n };\n}\nfunction canShowAllSymbolForCategory(categoryAxis, data) {\n // In most cases, line is monotonous on category axis, and the label size\n // is close with each other. So we check the symbol size and some of the\n // label size alone with the category axis to estimate whether all symbol\n // can be shown without overlap.\n var axisExtent = categoryAxis.getExtent();\n var availSize = Math.abs(axisExtent[1] - axisExtent[0]) / categoryAxis.scale.count();\n isNaN(availSize) && (availSize = 0); // 0/0 is NaN.\n // Sampling some points, max 5.\n var dataLen = data.count();\n var step = Math.max(1, Math.round(dataLen / 5));\n for (var dataIndex = 0; dataIndex < dataLen; dataIndex += step) {\n if (SymbolClz.getSymbolSize(data, dataIndex\n // Only for cartesian, where `isHorizontal` exists.\n )[categoryAxis.isHorizontal() ? 1 : 0]\n // Empirical number\n * 1.5 > availSize) {\n return false;\n }\n }\n return true;\n}\nfunction isPointNull(x, y) {\n return isNaN(x) || isNaN(y);\n}\nfunction getLastIndexNotNull(points) {\n var len = points.length / 2;\n for (; len > 0; len--) {\n if (!isPointNull(points[len * 2 - 2], points[len * 2 - 1])) {\n break;\n }\n }\n return len - 1;\n}\nfunction getPointAtIndex(points, idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n}\nfunction getIndexRange(points, xOrY, dim) {\n var len = points.length / 2;\n var dimIdx = dim === 'x' ? 0 : 1;\n var a;\n var b;\n var prevIndex = 0;\n var nextIndex = -1;\n for (var i = 0; i < len; i++) {\n b = points[i * 2 + dimIdx];\n if (isNaN(b) || isNaN(points[i * 2 + 1 - dimIdx])) {\n continue;\n }\n if (i === 0) {\n a = b;\n continue;\n }\n if (a <= xOrY && b >= xOrY || a >= xOrY && b <= xOrY) {\n nextIndex = i;\n break;\n }\n prevIndex = i;\n a = b;\n }\n return {\n range: [prevIndex, nextIndex],\n t: (xOrY - a) / (b - a)\n };\n}\nfunction anyStateShowEndLabel(seriesModel) {\n if (seriesModel.get(['endLabel', 'show'])) {\n return true;\n }\n for (var i = 0; i < SPECIAL_STATES.length; i++) {\n if (seriesModel.get([SPECIAL_STATES[i], 'endLabel', 'show'])) {\n return true;\n }\n }\n return false;\n}\nfunction createLineClipPath(lineView, coordSys, hasAnimation, seriesModel) {\n if (isCoordinateSystemType(coordSys, 'cartesian2d')) {\n var endLabelModel_1 = seriesModel.getModel('endLabel');\n var valueAnimation_1 = endLabelModel_1.get('valueAnimation');\n var data_1 = seriesModel.getData();\n var labelAnimationRecord_1 = {\n lastFrameIndex: 0\n };\n var during = anyStateShowEndLabel(seriesModel) ? function (percent, clipRect) {\n lineView._endLabelOnDuring(percent, clipRect, data_1, labelAnimationRecord_1, valueAnimation_1, endLabelModel_1, coordSys);\n } : null;\n var isHorizontal = coordSys.getBaseAxis().isHorizontal();\n var clipPath = createGridClipPath(coordSys, hasAnimation, seriesModel, function () {\n var endLabel = lineView._endLabel;\n if (endLabel && hasAnimation) {\n if (labelAnimationRecord_1.originalX != null) {\n endLabel.attr({\n x: labelAnimationRecord_1.originalX,\n y: labelAnimationRecord_1.originalY\n });\n }\n }\n }, during);\n // Expand clip shape to avoid clipping when line value exceeds axis\n if (!seriesModel.get('clip', true)) {\n var rectShape = clipPath.shape;\n var expandSize = Math.max(rectShape.width, rectShape.height);\n if (isHorizontal) {\n rectShape.y -= expandSize;\n rectShape.height += expandSize * 2;\n } else {\n rectShape.x -= expandSize;\n rectShape.width += expandSize * 2;\n }\n }\n // Set to the final frame. To make sure label layout is right.\n if (during) {\n during(1, clipPath);\n }\n return clipPath;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n if (seriesModel.get(['endLabel', 'show'])) {\n console.warn('endLabel is not supported for lines in polar systems.');\n }\n }\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n }\n}\nfunction getEndLabelStateSpecified(endLabelModel, coordSys) {\n var baseAxis = coordSys.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isBaseInversed = baseAxis.inverse;\n var align = isHorizontal ? isBaseInversed ? 'right' : 'left' : 'center';\n var verticalAlign = isHorizontal ? 'middle' : isBaseInversed ? 'top' : 'bottom';\n return {\n normal: {\n align: endLabelModel.get('align') || align,\n verticalAlign: endLabelModel.get('verticalAlign') || verticalAlign\n }\n };\n}\nvar LineView = /** @class */function (_super) {\n __extends(LineView, _super);\n function LineView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n LineView.prototype.init = function () {\n var lineGroup = new graphic.Group();\n var symbolDraw = new SymbolDraw();\n this.group.add(symbolDraw.group);\n this._symbolDraw = symbolDraw;\n this._lineGroup = lineGroup;\n };\n LineView.prototype.render = function (seriesModel, ecModel, api) {\n var _this = this;\n var coordSys = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var lineStyleModel = seriesModel.getModel('lineStyle');\n var areaStyleModel = seriesModel.getModel('areaStyle');\n var points = data.getLayout('points') || [];\n var isCoordSysPolar = coordSys.type === 'polar';\n var prevCoordSys = this._coordSys;\n var symbolDraw = this._symbolDraw;\n var polyline = this._polyline;\n var polygon = this._polygon;\n var lineGroup = this._lineGroup;\n var hasAnimation = !ecModel.ssr && seriesModel.get('animation');\n var isAreaChart = !areaStyleModel.isEmpty();\n var valueOrigin = areaStyleModel.get('origin');\n var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin);\n var stackedOnPoints = isAreaChart && getStackedOnPoints(coordSys, data, dataCoordInfo);\n var showSymbol = seriesModel.get('showSymbol');\n var connectNulls = seriesModel.get('connectNulls');\n var isIgnoreFunc = showSymbol && !isCoordSysPolar && getIsIgnoreFunc(seriesModel, data, coordSys);\n // Remove temporary symbols\n var oldData = this._data;\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n // Remove previous created symbols if showSymbol changed to false\n if (!showSymbol) {\n symbolDraw.remove();\n }\n group.add(lineGroup);\n // FIXME step not support polar\n var step = !isCoordSysPolar ? seriesModel.get('step') : false;\n var clipShapeForSymbol;\n if (coordSys && coordSys.getArea && seriesModel.get('clip', true)) {\n clipShapeForSymbol = coordSys.getArea();\n // Avoid float number rounding error for symbol on the edge of axis extent.\n // See #7913 and `test/dataZoom-clip.html`.\n if (clipShapeForSymbol.width != null) {\n clipShapeForSymbol.x -= 0.1;\n clipShapeForSymbol.y -= 0.1;\n clipShapeForSymbol.width += 0.2;\n clipShapeForSymbol.height += 0.2;\n } else if (clipShapeForSymbol.r0) {\n clipShapeForSymbol.r0 -= 0.5;\n clipShapeForSymbol.r += 0.5;\n }\n }\n this._clipShapeForSymbol = clipShapeForSymbol;\n var visualColor = getVisualGradient(data, coordSys, api) || data.getVisual('style')[data.getVisual('drawType')];\n // Initialization animation or coordinate system changed\n if (!(polyline && prevCoordSys.type === coordSys.type && step === this._step)) {\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol,\n disableAnimation: true,\n getSymbolPoint: function (idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n }\n });\n hasAnimation && this._initSymbolLabelAnimation(data, coordSys, clipShapeForSymbol);\n if (step) {\n // TODO If stacked series is not step\n points = turnPointsIntoStep(points, coordSys, step, connectNulls);\n if (stackedOnPoints) {\n stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);\n }\n }\n polyline = this._newPolyline(points);\n if (isAreaChart) {\n polygon = this._newPolygon(points, stackedOnPoints);\n } // If areaStyle is removed\n else if (polygon) {\n lineGroup.remove(polygon);\n polygon = this._polygon = null;\n }\n // NOTE: Must update _endLabel before setClipPath.\n if (!isCoordSysPolar) {\n this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor));\n }\n lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel));\n } else {\n if (isAreaChart && !polygon) {\n // If areaStyle is added\n polygon = this._newPolygon(points, stackedOnPoints);\n } else if (polygon && !isAreaChart) {\n // If areaStyle is removed\n lineGroup.remove(polygon);\n polygon = this._polygon = null;\n }\n // NOTE: Must update _endLabel before setClipPath.\n if (!isCoordSysPolar) {\n this._initOrUpdateEndLabel(seriesModel, coordSys, convertToColorString(visualColor));\n }\n // Update clipPath\n var oldClipPath = lineGroup.getClipPath();\n if (oldClipPath) {\n var newClipPath = createLineClipPath(this, coordSys, false, seriesModel);\n graphic.initProps(oldClipPath, {\n shape: newClipPath.shape\n }, seriesModel);\n } else {\n lineGroup.setClipPath(createLineClipPath(this, coordSys, true, seriesModel));\n }\n // Always update, or it is wrong in the case turning on legend\n // because points are not changed.\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol,\n disableAnimation: true,\n getSymbolPoint: function (idx) {\n return [points[idx * 2], points[idx * 2 + 1]];\n }\n });\n // In the case data zoom triggered refreshing frequently\n // Data may not change if line has a category axis. So it should animate nothing.\n if (!isPointsSame(this._stackedOnPoints, stackedOnPoints) || !isPointsSame(this._points, points)) {\n if (hasAnimation) {\n this._doUpdateAnimation(data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls);\n } else {\n // Not do it in update with animation\n if (step) {\n // TODO If stacked series is not step\n points = turnPointsIntoStep(points, coordSys, step, connectNulls);\n if (stackedOnPoints) {\n stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);\n }\n }\n polyline.setShape({\n points: points\n });\n polygon && polygon.setShape({\n points: points,\n stackedOnPoints: stackedOnPoints\n });\n }\n }\n }\n var emphasisModel = seriesModel.getModel('emphasis');\n var focus = emphasisModel.get('focus');\n var blurScope = emphasisModel.get('blurScope');\n var emphasisDisabled = emphasisModel.get('disabled');\n polyline.useStyle(zrUtil.defaults(\n // Use color in lineStyle first\n lineStyleModel.getLineStyle(), {\n fill: 'none',\n stroke: visualColor,\n lineJoin: 'bevel'\n }));\n setStatesStylesFromModel(polyline, seriesModel, 'lineStyle');\n if (polyline.style.lineWidth > 0 && seriesModel.get(['emphasis', 'lineStyle', 'width']) === 'bolder') {\n var emphasisLineStyle = polyline.getState('emphasis').style;\n emphasisLineStyle.lineWidth = +polyline.style.lineWidth + 1;\n }\n // Needs seriesIndex for focus\n getECData(polyline).seriesIndex = seriesModel.seriesIndex;\n toggleHoverEmphasis(polyline, focus, blurScope, emphasisDisabled);\n var smooth = getSmooth(seriesModel.get('smooth'));\n var smoothMonotone = seriesModel.get('smoothMonotone');\n polyline.setShape({\n smooth: smooth,\n smoothMonotone: smoothMonotone,\n connectNulls: connectNulls\n });\n if (polygon) {\n var stackedOnSeries = data.getCalculationInfo('stackedOnSeries');\n var stackedOnSmooth = 0;\n polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), {\n fill: visualColor,\n opacity: 0.7,\n lineJoin: 'bevel',\n decal: data.getVisual('style').decal\n }));\n if (stackedOnSeries) {\n stackedOnSmooth = getSmooth(stackedOnSeries.get('smooth'));\n }\n polygon.setShape({\n smooth: smooth,\n stackedOnSmooth: stackedOnSmooth,\n smoothMonotone: smoothMonotone,\n connectNulls: connectNulls\n });\n setStatesStylesFromModel(polygon, seriesModel, 'areaStyle');\n // Needs seriesIndex for focus\n getECData(polygon).seriesIndex = seriesModel.seriesIndex;\n toggleHoverEmphasis(polygon, focus, blurScope, emphasisDisabled);\n }\n var changePolyState = function (toState) {\n _this._changePolyState(toState);\n };\n data.eachItemGraphicEl(function (el) {\n // Switch polyline / polygon state if element changed its state.\n el && (el.onHoverStateChange = changePolyState);\n });\n this._polyline.onHoverStateChange = changePolyState;\n this._data = data;\n // Save the coordinate system for transition animation when data changed\n this._coordSys = coordSys;\n this._stackedOnPoints = stackedOnPoints;\n this._points = points;\n this._step = step;\n this._valueOrigin = valueOrigin;\n if (seriesModel.get('triggerLineEvent')) {\n this.packEventData(seriesModel, polyline);\n polygon && this.packEventData(seriesModel, polygon);\n }\n };\n LineView.prototype.packEventData = function (seriesModel, el) {\n getECData(el).eventData = {\n componentType: 'series',\n componentSubType: 'line',\n componentIndex: seriesModel.componentIndex,\n seriesIndex: seriesModel.seriesIndex,\n seriesName: seriesModel.name,\n seriesType: 'line'\n };\n };\n LineView.prototype.highlight = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n this._changePolyState('emphasis');\n if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) {\n var points = data.getLayout('points');\n var symbol = data.getItemGraphicEl(dataIndex);\n if (!symbol) {\n // Create a temporary symbol if it is not exists\n var x = points[dataIndex * 2];\n var y = points[dataIndex * 2 + 1];\n if (isNaN(x) || isNaN(y)) {\n // Null data\n return;\n }\n // fix #11360: shouldn't draw symbol outside clipShapeForSymbol\n if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(x, y)) {\n return;\n }\n var zlevel = seriesModel.get('zlevel') || 0;\n var z = seriesModel.get('z') || 0;\n symbol = new SymbolClz(data, dataIndex);\n symbol.x = x;\n symbol.y = y;\n symbol.setZ(zlevel, z);\n // ensure label text of the temporary symbol is in front of line and area polygon\n var symbolLabel = symbol.getSymbolPath().getTextContent();\n if (symbolLabel) {\n symbolLabel.zlevel = zlevel;\n symbolLabel.z = z;\n symbolLabel.z2 = this._polyline.z2 + 1;\n }\n symbol.__temp = true;\n data.setItemGraphicEl(dataIndex, symbol);\n // Stop scale animation\n symbol.stopSymbolAnimation(true);\n this.group.add(symbol);\n }\n symbol.highlight();\n } else {\n // Highlight whole series\n ChartView.prototype.highlight.call(this, seriesModel, ecModel, api, payload);\n }\n };\n LineView.prototype.downplay = function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n this._changePolyState('normal');\n if (dataIndex != null && dataIndex >= 0) {\n var symbol = data.getItemGraphicEl(dataIndex);\n if (symbol) {\n if (symbol.__temp) {\n data.setItemGraphicEl(dataIndex, null);\n this.group.remove(symbol);\n } else {\n symbol.downplay();\n }\n }\n } else {\n // FIXME\n // can not downplay completely.\n // Downplay whole series\n ChartView.prototype.downplay.call(this, seriesModel, ecModel, api, payload);\n }\n };\n LineView.prototype._changePolyState = function (toState) {\n var polygon = this._polygon;\n setStatesFlag(this._polyline, toState);\n polygon && setStatesFlag(polygon, toState);\n };\n LineView.prototype._newPolyline = function (points) {\n var polyline = this._polyline;\n // Remove previous created polyline\n if (polyline) {\n this._lineGroup.remove(polyline);\n }\n polyline = new ECPolyline({\n shape: {\n points: points\n },\n segmentIgnoreThreshold: 2,\n z2: 10\n });\n this._lineGroup.add(polyline);\n this._polyline = polyline;\n return polyline;\n };\n LineView.prototype._newPolygon = function (points, stackedOnPoints) {\n var polygon = this._polygon;\n // Remove previous created polygon\n if (polygon) {\n this._lineGroup.remove(polygon);\n }\n polygon = new ECPolygon({\n shape: {\n points: points,\n stackedOnPoints: stackedOnPoints\n },\n segmentIgnoreThreshold: 2\n });\n this._lineGroup.add(polygon);\n this._polygon = polygon;\n return polygon;\n };\n LineView.prototype._initSymbolLabelAnimation = function (data, coordSys, clipShape) {\n var isHorizontalOrRadial;\n var isCoordSysPolar;\n var baseAxis = coordSys.getBaseAxis();\n var isAxisInverse = baseAxis.inverse;\n if (coordSys.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n isCoordSysPolar = false;\n } else if (coordSys.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n isCoordSysPolar = true;\n }\n var seriesModel = data.hostModel;\n var seriesDuration = seriesModel.get('animationDuration');\n if (zrUtil.isFunction(seriesDuration)) {\n seriesDuration = seriesDuration(null);\n }\n var seriesDelay = seriesModel.get('animationDelay') || 0;\n var seriesDelayValue = zrUtil.isFunction(seriesDelay) ? seriesDelay(null) : seriesDelay;\n data.eachItemGraphicEl(function (symbol, idx) {\n var el = symbol;\n if (el) {\n var point = [symbol.x, symbol.y];\n var start = void 0;\n var end = void 0;\n var current = void 0;\n if (clipShape) {\n if (isCoordSysPolar) {\n var polarClip = clipShape;\n var coord = coordSys.pointToCoord(point);\n if (isHorizontalOrRadial) {\n start = polarClip.startAngle;\n end = polarClip.endAngle;\n current = -coord[1] / 180 * Math.PI;\n } else {\n start = polarClip.r0;\n end = polarClip.r;\n current = coord[0];\n }\n } else {\n var gridClip = clipShape;\n if (isHorizontalOrRadial) {\n start = gridClip.x;\n end = gridClip.x + gridClip.width;\n current = symbol.x;\n } else {\n start = gridClip.y + gridClip.height;\n end = gridClip.y;\n current = symbol.y;\n }\n }\n }\n var ratio = end === start ? 0 : (current - start) / (end - start);\n if (isAxisInverse) {\n ratio = 1 - ratio;\n }\n var delay = zrUtil.isFunction(seriesDelay) ? seriesDelay(idx) : seriesDuration * ratio + seriesDelayValue;\n var symbolPath = el.getSymbolPath();\n var text = symbolPath.getTextContent();\n el.attr({\n scaleX: 0,\n scaleY: 0\n });\n el.animateTo({\n scaleX: 1,\n scaleY: 1\n }, {\n duration: 200,\n setToFinal: true,\n delay: delay\n });\n if (text) {\n text.animateFrom({\n style: {\n opacity: 0\n }\n }, {\n duration: 300,\n delay: delay\n });\n }\n symbolPath.disableLabelAnimation = true;\n }\n });\n };\n LineView.prototype._initOrUpdateEndLabel = function (seriesModel, coordSys, inheritColor) {\n var endLabelModel = seriesModel.getModel('endLabel');\n if (anyStateShowEndLabel(seriesModel)) {\n var data_2 = seriesModel.getData();\n var polyline = this._polyline;\n // series may be filtered.\n var points = data_2.getLayout('points');\n if (!points) {\n polyline.removeTextContent();\n this._endLabel = null;\n return;\n }\n var endLabel = this._endLabel;\n if (!endLabel) {\n endLabel = this._endLabel = new graphic.Text({\n z2: 200 // should be higher than item symbol\n });\n\n endLabel.ignoreClip = true;\n polyline.setTextContent(this._endLabel);\n polyline.disableLabelAnimation = true;\n }\n // Find last non-NaN data to display data\n var dataIndex = getLastIndexNotNull(points);\n if (dataIndex >= 0) {\n setLabelStyle(polyline, getLabelStatesModels(seriesModel, 'endLabel'), {\n inheritColor: inheritColor,\n labelFetcher: seriesModel,\n labelDataIndex: dataIndex,\n defaultText: function (dataIndex, opt, interpolatedValue) {\n return interpolatedValue != null ? getDefaultInterpolatedLabel(data_2, interpolatedValue) : getDefaultLabel(data_2, dataIndex);\n },\n enableTextSetter: true\n }, getEndLabelStateSpecified(endLabelModel, coordSys));\n polyline.textConfig.position = null;\n }\n } else if (this._endLabel) {\n this._polyline.removeTextContent();\n this._endLabel = null;\n }\n };\n LineView.prototype._endLabelOnDuring = function (percent, clipRect, data, animationRecord, valueAnimation, endLabelModel, coordSys) {\n var endLabel = this._endLabel;\n var polyline = this._polyline;\n if (endLabel) {\n // NOTE: Don't remove percent < 1. percent === 1 means the first frame during render.\n // The label is not prepared at this time.\n if (percent < 1 && animationRecord.originalX == null) {\n animationRecord.originalX = endLabel.x;\n animationRecord.originalY = endLabel.y;\n }\n var points = data.getLayout('points');\n var seriesModel = data.hostModel;\n var connectNulls = seriesModel.get('connectNulls');\n var precision = endLabelModel.get('precision');\n var distance = endLabelModel.get('distance') || 0;\n var baseAxis = coordSys.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isBaseInversed = baseAxis.inverse;\n var clipShape = clipRect.shape;\n var xOrY = isBaseInversed ? isHorizontal ? clipShape.x : clipShape.y + clipShape.height : isHorizontal ? clipShape.x + clipShape.width : clipShape.y;\n var distanceX = (isHorizontal ? distance : 0) * (isBaseInversed ? -1 : 1);\n var distanceY = (isHorizontal ? 0 : -distance) * (isBaseInversed ? -1 : 1);\n var dim = isHorizontal ? 'x' : 'y';\n var dataIndexRange = getIndexRange(points, xOrY, dim);\n var indices = dataIndexRange.range;\n var diff = indices[1] - indices[0];\n var value = void 0;\n if (diff >= 1) {\n // diff > 1 && connectNulls, which is on the null data.\n if (diff > 1 && !connectNulls) {\n var pt = getPointAtIndex(points, indices[0]);\n endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n valueAnimation && (value = seriesModel.getRawValue(indices[0]));\n } else {\n var pt = polyline.getPointOn(xOrY, dim);\n pt && endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n var startValue = seriesModel.getRawValue(indices[0]);\n var endValue = seriesModel.getRawValue(indices[1]);\n valueAnimation && (value = modelUtil.interpolateRawValues(data, precision, startValue, endValue, dataIndexRange.t));\n }\n animationRecord.lastFrameIndex = indices[0];\n } else {\n // If diff <= 0, which is the range is not found(Include NaN)\n // Choose the first point or last point.\n var idx = percent === 1 || animationRecord.lastFrameIndex > 0 ? indices[0] : 0;\n var pt = getPointAtIndex(points, idx);\n valueAnimation && (value = seriesModel.getRawValue(idx));\n endLabel.attr({\n x: pt[0] + distanceX,\n y: pt[1] + distanceY\n });\n }\n if (valueAnimation) {\n var inner = labelInner(endLabel);\n if (typeof inner.setLabelText === 'function') {\n inner.setLabelText(value);\n }\n }\n }\n };\n /**\n * @private\n */\n // FIXME Two value axis\n LineView.prototype._doUpdateAnimation = function (data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls) {\n var polyline = this._polyline;\n var polygon = this._polygon;\n var seriesModel = data.hostModel;\n var diff = lineAnimationDiff(this._data, data, this._stackedOnPoints, stackedOnPoints, this._coordSys, coordSys, this._valueOrigin, valueOrigin);\n var current = diff.current;\n var stackedOnCurrent = diff.stackedOnCurrent;\n var next = diff.next;\n var stackedOnNext = diff.stackedOnNext;\n if (step) {\n // TODO If stacked series is not step\n current = turnPointsIntoStep(diff.current, coordSys, step, connectNulls);\n stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step, connectNulls);\n next = turnPointsIntoStep(diff.next, coordSys, step, connectNulls);\n stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step, connectNulls);\n }\n // Don't apply animation if diff is large.\n // For better result and avoid memory explosion problems like\n // https://github.com/apache/incubator-echarts/issues/12229\n if (getBoundingDiff(current, next) > 3000 || polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000) {\n polyline.stopAnimation();\n polyline.setShape({\n points: next\n });\n if (polygon) {\n polygon.stopAnimation();\n polygon.setShape({\n points: next,\n stackedOnPoints: stackedOnNext\n });\n }\n return;\n }\n polyline.shape.__points = diff.current;\n polyline.shape.points = current;\n var target = {\n shape: {\n points: next\n }\n };\n // Also animate the original points.\n // If points reference is changed when turning into step line.\n if (diff.current !== current) {\n target.shape.__points = diff.next;\n }\n // Stop previous animation.\n polyline.stopAnimation();\n graphic.updateProps(polyline, target, seriesModel);\n if (polygon) {\n polygon.setShape({\n // Reuse the points with polyline.\n points: current,\n stackedOnPoints: stackedOnCurrent\n });\n polygon.stopAnimation();\n graphic.updateProps(polygon, {\n shape: {\n stackedOnPoints: stackedOnNext\n }\n }, seriesModel);\n // If use attr directly in updateProps.\n if (polyline.shape.points !== polygon.shape.points) {\n polygon.shape.points = polyline.shape.points;\n }\n }\n var updatedDataInfo = [];\n var diffStatus = diff.status;\n for (var i = 0; i < diffStatus.length; i++) {\n var cmd = diffStatus[i].cmd;\n if (cmd === '=') {\n var el = data.getItemGraphicEl(diffStatus[i].idx1);\n if (el) {\n updatedDataInfo.push({\n el: el,\n ptIdx: i // Index of points\n });\n }\n }\n }\n\n if (polyline.animators && polyline.animators.length) {\n polyline.animators[0].during(function () {\n polygon && polygon.dirtyShape();\n var points = polyline.shape.__points;\n for (var i = 0; i < updatedDataInfo.length; i++) {\n var el = updatedDataInfo[i].el;\n var offset = updatedDataInfo[i].ptIdx * 2;\n el.x = points[offset];\n el.y = points[offset + 1];\n el.markRedraw();\n }\n });\n }\n };\n LineView.prototype.remove = function (ecModel) {\n var group = this.group;\n var oldData = this._data;\n this._lineGroup.removeAll();\n this._symbolDraw.remove(true);\n // Remove temporary created elements when highlighting\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._endLabel = this._data = null;\n };\n LineView.type = 'line';\n return LineView;\n}(ChartView);\nexport default LineView;","\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 { map } from 'zrender/lib/core/util.js';\nimport createRenderPlanner from '../chart/helper/createRenderPlanner.js';\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\nimport { createFloat32Array } from '../util/vendor.js';\nexport default function pointsLayout(seriesType, forceStoreInTypedArray) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var useTypedArray = forceStoreInTypedArray || pipelineContext.large;\n if (!coordSys) {\n return;\n }\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n if (isDimensionStacked(data, dims[0])) {\n dims[0] = stackResultDim;\n }\n if (isDimensionStacked(data, dims[1])) {\n dims[1] = stackResultDim;\n }\n var store = data.getStore();\n var dimIdx0 = data.getDimensionIndex(dims[0]);\n var dimIdx1 = data.getDimensionIndex(dims[1]);\n return dimLen && {\n progress: function (params, data) {\n var segCount = params.end - params.start;\n var points = useTypedArray && createFloat32Array(segCount * dimLen);\n var tmpIn = [];\n var tmpOut = [];\n for (var i = params.start, offset = 0; i < params.end; i++) {\n var point = void 0;\n if (dimLen === 1) {\n var x = store.get(dimIdx0, i);\n // NOTE: Make sure the second parameter is null to use default strategy.\n point = coordSys.dataToPoint(x, null, tmpOut);\n } else {\n tmpIn[0] = store.get(dimIdx0, i);\n tmpIn[1] = store.get(dimIdx1, i);\n // Let coordinate system to handle the NaN data.\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n if (useTypedArray) {\n points[offset++] = point[0];\n points[offset++] = point[1];\n } else {\n data.setItemLayout(i, point.slice());\n }\n }\n useTypedArray && data.setLayout('points', points);\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 LineSeries from './LineSeries.js';\nimport LineView from './LineView.js';\n// In case developer forget to include grid component\nimport layoutPoints from '../../layout/points.js';\nimport dataSample from '../../processor/dataSample.js';\nexport function install(registers) {\n registers.registerChartView(LineView);\n registers.registerSeriesModel(LineSeries);\n registers.registerLayout(layoutPoints('line', true));\n registers.registerVisual({\n seriesType: 'line',\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n // Visual coding for legend\n var lineStyle = seriesModel.getModel('lineStyle').getLineStyle();\n if (lineStyle && !lineStyle.stroke) {\n // Fill in visual should be palette color if\n // has color callback\n lineStyle.stroke = data.getVisual('style').fill;\n }\n data.setVisual('legendLineStyle', lineStyle);\n }\n });\n // Down sample after filter\n registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('line'));\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.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nimport { each } from 'zrender/lib/core/util.js';\nvar BaseBarSeriesModel = /** @class */function (_super) {\n __extends(BaseBarSeriesModel, _super);\n function BaseBarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BaseBarSeriesModel.type;\n return _this;\n }\n BaseBarSeriesModel.prototype.getInitialData = function (option, ecModel) {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true\n });\n };\n BaseBarSeriesModel.prototype.getMarkerPosition = function (value, dims, startingAtTick) {\n var coordSys = this.coordinateSystem;\n if (coordSys && coordSys.clampData) {\n // PENDING if clamp ?\n var clampData_1 = coordSys.clampData(value);\n var pt_1 = coordSys.dataToPoint(clampData_1);\n if (startingAtTick) {\n each(coordSys.getAxes(), function (axis, idx) {\n // If axis type is category, use tick coords instead\n if (axis.type === 'category' && dims != null) {\n var tickCoords = axis.getTicksCoords();\n var alignTicksWithLabel = axis.getTickModel().get('alignWithLabel');\n var targetTickId = clampData_1[idx];\n // The index of rightmost tick of markArea is 1 larger than x1/y1 index\n var isEnd = dims[idx] === 'x1' || dims[idx] === 'y1';\n if (isEnd && !alignTicksWithLabel) {\n targetTickId += 1;\n }\n // The only contains one tick, tickCoords is\n // like [{coord: 0, tickValue: 0}, {coord: 0}]\n // to the length should always be larger than 1\n if (tickCoords.length < 2) {\n return;\n } else if (tickCoords.length === 2) {\n // The left value and right value of the axis are\n // the same. coord is 0 in both items. Use the max\n // value of the axis as the coord\n pt_1[idx] = axis.toGlobalCoord(axis.getExtent()[isEnd ? 1 : 0]);\n return;\n }\n var leftCoord = void 0;\n var coord = void 0;\n var stepTickValue = 1;\n for (var i = 0; i < tickCoords.length; i++) {\n var tickCoord = tickCoords[i].coord;\n // The last item of tickCoords doesn't contain\n // tickValue\n var tickValue = i === tickCoords.length - 1 ? tickCoords[i - 1].tickValue + stepTickValue : tickCoords[i].tickValue;\n if (tickValue === targetTickId) {\n coord = tickCoord;\n break;\n } else if (tickValue < targetTickId) {\n leftCoord = tickCoord;\n } else if (leftCoord != null && tickValue > targetTickId) {\n coord = (tickCoord + leftCoord) / 2;\n break;\n }\n if (i === 1) {\n // Here we assume the step of category axes is\n // the same\n stepTickValue = tickValue - tickCoords[0].tickValue;\n }\n }\n if (coord == null) {\n if (!leftCoord) {\n // targetTickId is smaller than all tick ids in the\n // visible area, use the leftmost tick coord\n coord = tickCoords[0].coord;\n } else if (leftCoord) {\n // targetTickId is larger than all tick ids in the\n // visible area, use the rightmost tick coord\n coord = tickCoords[tickCoords.length - 1].coord;\n }\n }\n pt_1[idx] = axis.toGlobalCoord(coord);\n }\n });\n } else {\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_1[offsetIndex] += offset + size / 2;\n }\n return pt_1;\n }\n return [NaN, NaN];\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);\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.js';\nimport createSeriesData from '../helper/createSeriesData.js';\nimport { inheritDefaultOption } from '../../util/component.js';\nvar BarSeriesModel = /** @class */function (_super) {\n __extends(BarSeriesModel, _super);\n function BarSeriesModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = BarSeriesModel.type;\n return _this;\n }\n BarSeriesModel.prototype.getInitialData = function () {\n return createSeriesData(null, this, {\n useEncodeDefaulter: true,\n createInvertedIndices: !!this.get('realtimeSort', true) || null\n });\n };\n /**\n * @override\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 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 if (largeThreshold > progressiveThreshold) {\n progressiveThreshold = largeThreshold;\n }\n return progressiveThreshold;\n };\n BarSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {\n return selectors.rect(data.getItemLayout(dataIndex));\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);\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 { calculateTextPosition } from 'zrender/lib/contain/text.js';\nimport { isArray, isNumber } from 'zrender/lib/core/util.js';\nexport function createSectorCalculateTextPosition(positionMapping, opts) {\n opts = opts || {};\n var isRoundCap = opts.isRoundCap;\n return function (out, opts, boundingRect) {\n var textPosition = opts.position;\n if (!textPosition || textPosition instanceof Array) {\n return calculateTextPosition(out, opts, boundingRect);\n }\n var mappedSectorPosition = positionMapping(textPosition);\n var distance = opts.distance != null ? opts.distance : 5;\n var sector = this.shape;\n var cx = sector.cx;\n var cy = sector.cy;\n var r = sector.r;\n var r0 = sector.r0;\n var middleR = (r + r0) / 2;\n var startAngle = sector.startAngle;\n var endAngle = sector.endAngle;\n var middleAngle = (startAngle + endAngle) / 2;\n var extraDist = isRoundCap ? Math.abs(r - r0) / 2 : 0;\n var mathCos = Math.cos;\n var mathSin = Math.sin;\n // base position: top-left\n var x = cx + r * mathCos(startAngle);\n var y = cy + r * mathSin(startAngle);\n var textAlign = 'left';\n var textVerticalAlign = 'top';\n switch (mappedSectorPosition) {\n case 'startArc':\n x = cx + (r0 - distance) * mathCos(middleAngle);\n y = cy + (r0 - distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'top';\n break;\n case 'insideStartArc':\n x = cx + (r0 + distance) * mathCos(middleAngle);\n y = cy + (r0 + distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'startAngle':\n x = cx + middleR * mathCos(startAngle) + adjustAngleDistanceX(startAngle, distance + extraDist, false);\n y = cy + middleR * mathSin(startAngle) + adjustAngleDistanceY(startAngle, distance + extraDist, false);\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n case 'insideStartAngle':\n x = cx + middleR * mathCos(startAngle) + adjustAngleDistanceX(startAngle, -distance + extraDist, false);\n y = cy + middleR * mathSin(startAngle) + adjustAngleDistanceY(startAngle, -distance + extraDist, false);\n textAlign = 'left';\n textVerticalAlign = 'middle';\n break;\n case 'middle':\n x = cx + middleR * mathCos(middleAngle);\n y = cy + middleR * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'middle';\n break;\n case 'endArc':\n x = cx + (r + distance) * mathCos(middleAngle);\n y = cy + (r + distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'bottom';\n break;\n case 'insideEndArc':\n x = cx + (r - distance) * mathCos(middleAngle);\n y = cy + (r - distance) * mathSin(middleAngle);\n textAlign = 'center';\n textVerticalAlign = 'top';\n break;\n case 'endAngle':\n x = cx + middleR * mathCos(endAngle) + adjustAngleDistanceX(endAngle, distance + extraDist, true);\n y = cy + middleR * mathSin(endAngle) + adjustAngleDistanceY(endAngle, distance + extraDist, true);\n textAlign = 'left';\n textVerticalAlign = 'middle';\n break;\n case 'insideEndAngle':\n x = cx + middleR * mathCos(endAngle) + adjustAngleDistanceX(endAngle, -distance + extraDist, true);\n y = cy + middleR * mathSin(endAngle) + adjustAngleDistanceY(endAngle, -distance + extraDist, true);\n textAlign = 'right';\n textVerticalAlign = 'middle';\n break;\n default:\n return calculateTextPosition(out, opts, boundingRect);\n }\n out = out || {};\n out.x = x;\n out.y = y;\n out.align = textAlign;\n out.verticalAlign = textVerticalAlign;\n return out;\n };\n}\nexport function setSectorTextRotation(sector, textPosition, positionMapping, rotateType) {\n if (isNumber(rotateType)) {\n // user-set rotation\n sector.setTextConfig({\n rotation: rotateType\n });\n return;\n } else if (isArray(textPosition)) {\n // user-set position, use 0 as auto rotation\n sector.setTextConfig({\n rotation: 0\n });\n return;\n }\n var shape = sector.shape;\n var startAngle = shape.clockwise ? shape.startAngle : shape.endAngle;\n var endAngle = shape.clockwise ? shape.endAngle : shape.startAngle;\n var middleAngle = (startAngle + endAngle) / 2;\n var anchorAngle;\n var mappedSectorPosition = positionMapping(textPosition);\n switch (mappedSectorPosition) {\n case 'startArc':\n case 'insideStartArc':\n case 'middle':\n case 'insideEndArc':\n case 'endArc':\n anchorAngle = middleAngle;\n break;\n case 'startAngle':\n case 'insideStartAngle':\n anchorAngle = startAngle;\n break;\n case 'endAngle':\n case 'insideEndAngle':\n anchorAngle = endAngle;\n break;\n default:\n sector.setTextConfig({\n rotation: 0\n });\n return;\n }\n var rotate = Math.PI * 1.5 - anchorAngle;\n /**\n * TODO: labels with rotate > Math.PI / 2 should be rotate another\n * half round flipped to increase readability. However, only middle\n * position supports this for now, because in other positions, the\n * anchor point is not at the center of the text, so the positions\n * after rotating is not as expected.\n */\n if (mappedSectorPosition === 'middle' && rotate > Math.PI / 2 && rotate < Math.PI * 1.5) {\n rotate -= Math.PI;\n }\n sector.setTextConfig({\n rotation: rotate\n });\n}\nfunction adjustAngleDistanceX(angle, distance, isEnd) {\n return distance * Math.sin(angle) * (isEnd ? -1 : 1);\n}\nfunction adjustAngleDistanceY(angle, distance, isEnd) {\n return distance * Math.cos(angle) * (isEnd ? 1 : -1);\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 Path from 'zrender/lib/graphic/Path.js';\nimport Group from 'zrender/lib/graphic/Group.js';\nimport { extend, each, map } from 'zrender/lib/core/util.js';\nimport { Rect, Sector, updateProps, initProps, removeElementWithFadeOut, traverseElements } from '../../util/graphic.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, getLabelStatesModels, setLabelValueAnimation, labelInner } from '../../label/labelStyle.js';\nimport { throttle } from '../../util/throttle.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport Sausage from '../../util/shape/sausage.js';\nimport ChartView from '../../view/Chart.js';\nimport { isCoordinateSystemType } from '../../coord/CoordinateSystem.js';\nimport { getDefaultLabel, getDefaultInterpolatedLabel } from '../helper/labelHelper.js';\nimport { warn } from '../../util/log.js';\nimport { createSectorCalculateTextPosition, setSectorTextRotation } from '../../label/sectorLabel.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nimport { getSectorCornerRadius } from '../helper/sectorHelper.js';\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nfunction getClipArea(coord, data) {\n var coordSysClipArea = coord.getArea && coord.getArea();\n if (isCoordinateSystemType(coord, 'cartesian2d')) {\n var baseAxis = coord.getBaseAxis();\n // 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 if (baseAxis.type !== 'category' || !baseAxis.onBand) {\n var expandWidth = data.getLayout('bandWidth');\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 return coordSysClipArea;\n}\nvar BarView = /** @class */function (_super) {\n __extends(BarView, _super);\n function BarView() {\n var _this = _super.call(this) || this;\n _this.type = BarView.type;\n _this._isFirstFrame = true;\n return _this;\n }\n BarView.prototype.render = function (seriesModel, ecModel, api, payload) {\n this._model = seriesModel;\n this._removeOnRenderedListener(api);\n this._updateDrawMode(seriesModel);\n var coordinateSystemType = seriesModel.get('coordinateSystem');\n if (coordinateSystemType === 'cartesian2d' || coordinateSystemType === 'polar') {\n // Clear previously rendered progressive elements.\n this._progressiveEls = null;\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 BarView.prototype.incrementalPrepareRender = function (seriesModel) {\n this._clear();\n this._updateDrawMode(seriesModel);\n // 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 this._updateLargeClip(seriesModel);\n };\n BarView.prototype.incrementalRender = function (params, seriesModel) {\n // Reset\n this._progressiveEls = [];\n // Do not support progressive in normal mode.\n this._incrementalRenderLarge(params, seriesModel);\n };\n BarView.prototype.eachRendered = function (cb) {\n traverseElements(this._progressiveEls || this.group, cb);\n };\n BarView.prototype._updateDrawMode = function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n this._clear();\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 if (coord.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n } else if (coord.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n }\n var animationModel = seriesModel.isAnimationEnabled() ? seriesModel : null;\n var realtimeSortCfg = shouldRealtimeSort(seriesModel, coord);\n if (realtimeSortCfg) {\n this._enableRealtimeSort(realtimeSortCfg, data, api);\n }\n var needsClip = seriesModel.get('clip', true) || realtimeSortCfg;\n var coordSysClipArea = getClipArea(coord, data);\n // If there is clipPath created in large mode. Remove it.\n group.removeClipPath();\n // We don't use clipPath in normal mode because we needs a perfect animation\n // And don't want the label are clipped.\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 function createBackground(dataIndex) {\n var bgLayout = getLayout[coord.type](data, dataIndex);\n var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);\n bgEl.useStyle(backgroundModel.getItemStyle());\n // Only cartesian2d support borderRadius.\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n } else {\n bgEl.setShape('cornerRadius', barBorderRadius);\n }\n bgEls[dataIndex] = bgEl;\n return bgEl;\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 if (drawBackground) {\n createBackground(dataIndex);\n }\n // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in \"axisProxy\".\n if (!data.hasValue(dataIndex) || !isValidLayout[coord.type](layout)) {\n return;\n }\n var isClipped = false;\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 var el = elementCreator[coord.type](seriesModel, data, dataIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, false, roundCap);\n if (realtimeSortCfg) {\n /**\n * Force label animation because even if the element is\n * ignored because it's clipped, it may not be clipped after\n * changing order. Then, if not using forceLabelAnimation,\n * the label animation was never started, in which case,\n * the label will be the final value and doesn't have label\n * animation.\n */\n el.forceLabelAnimation = true;\n }\n updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\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 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 if (drawBackground) {\n var bgEl = void 0;\n if (oldBgEls.length === 0) {\n bgEl = createBackground(oldIndex);\n } else {\n bgEl = oldBgEls[oldIndex];\n bgEl.useStyle(backgroundModel.getItemStyle());\n // Only cartesian2d support borderRadius.\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n } else {\n bgEl.setShape('cornerRadius', barBorderRadius);\n }\n bgEls[newIndex] = bgEl;\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 var el = oldData.getItemGraphicEl(oldIndex);\n if (!data.hasValue(newIndex) || !isValidLayout[coord.type](layout)) {\n group.remove(el);\n return;\n }\n var isClipped = false;\n if (needsClip) {\n isClipped = clip[coord.type](coordSysClipArea, layout);\n if (isClipped) {\n group.remove(el);\n }\n }\n if (!el) {\n el = elementCreator[coord.type](seriesModel, data, newIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, !!el, roundCap);\n } else {\n saveOldStyle(el);\n }\n if (realtimeSortCfg) {\n el.forceLabelAnimation = true;\n }\n if (isChangeOrder) {\n var textEl = el.getTextContent();\n if (textEl) {\n var labelInnerStore = labelInner(textEl);\n if (labelInnerStore.prevValue != null) {\n /**\n * Set preValue to be value so that no new label\n * should be started, otherwise, it will take a full\n * `animationDurationUpdate` time to finish the\n * animation, which is not expected.\n */\n labelInnerStore.prevValue = labelInnerStore.value;\n }\n }\n }\n // Not change anything if only order changed.\n // Especially not change label.\n else {\n updateStyle(el, data, newIndex, 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, newIndex, isHorizontalOrRadial, true, isChangeOrder);\n } else {\n updateProps(el, {\n shape: layout\n }, seriesModel, newIndex, null);\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 for (var i = 0; i < bgEls.length; ++i) {\n bgGroup.add(bgEls[i]);\n }\n group.add(bgGroup);\n this._backgroundEls = bgEls;\n this._data = data;\n };\n BarView.prototype._renderLarge = function (seriesModel, ecModel, api) {\n this._clear();\n createLarge(seriesModel, this.group);\n this._updateLargeClip(seriesModel);\n };\n BarView.prototype._incrementalRenderLarge = function (params, seriesModel) {\n this._removeBackground();\n createLarge(seriesModel, this.group, this._progressiveEls, true);\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);\n var group = this.group;\n if (clipPath) {\n group.setClipPath(clipPath);\n } else {\n group.removeClipPath();\n }\n };\n BarView.prototype._enableRealtimeSort = function (realtimeSortCfg, data, api) {\n var _this = this;\n // If no data in the first frame, wait for data to initSort\n if (!data.count()) {\n return;\n }\n var baseAxis = realtimeSortCfg.baseAxis;\n if (this._isFirstFrame) {\n this._dispatchInitSort(data, realtimeSortCfg, api);\n this._isFirstFrame = false;\n } else {\n var orderMapping_1 = function (idx) {\n var el = data.getItemGraphicEl(idx);\n var shape = el && el.shape;\n return shape &&\n // 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(baseAxis.isHorizontal() ? shape.height : shape.width)\n // If data is NaN, shape.xxx may be NaN, so use || 0 here in case\n || 0;\n };\n this._onRendered = function () {\n _this._updateSortWithinSameData(data, orderMapping_1, baseAxis, api);\n };\n api.getZr().on('rendered', this._onRendered);\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 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 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\n // If some tick have no bar, the tick will be treated as min.\n ? Number.MIN_VALUE\n // PENDING: if dataZoom on baseAxis exits, is it a performance issue?\n : orderMapping(data.indexOfRawIndex(rawIdx));\n if (value > lastValue) {\n return true;\n }\n lastValue = value;\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 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 for (; tickNum <= tickMax; ++tickNum) {\n if (orderInfo.ordinalNumbers[tickNum] !== scale.getRawOrdinalNumber(tickNum)) {\n return true;\n }\n }\n };\n BarView.prototype._updateSortWithinSameData = function (data, orderMapping, baseAxis, api) {\n if (!this._isOrderChangedWithinSameData(data, orderMapping, baseAxis)) {\n return;\n }\n var sortInfo = this._dataSort(data, baseAxis, orderMapping);\n if (this._isOrderDifferentInView(sortInfo, baseAxis)) {\n this._removeOnRenderedListener(api);\n api.dispatchAction({\n type: 'changeAxisOrder',\n componentType: baseAxis.dim + 'Axis',\n axisId: baseAxis.index,\n sortInfo: sortInfo\n });\n }\n };\n BarView.prototype._dispatchInitSort = function (data, realtimeSortCfg, api) {\n var baseAxis = realtimeSortCfg.baseAxis;\n var sortResult = this._dataSort(data, baseAxis, function (dataIdx) {\n return data.get(data.mapDimension(realtimeSortCfg.otherAxis.dim), dataIdx);\n });\n api.dispatchAction({\n type: 'changeAxisOrder',\n componentType: baseAxis.dim + 'Axis',\n isInitSort: true,\n axisId: baseAxis.index,\n sortInfo: sortResult\n });\n };\n BarView.prototype.remove = function (ecModel, api) {\n this._clear(this._model);\n this._removeOnRenderedListener(api);\n };\n BarView.prototype.dispose = function (ecModel, api) {\n this._removeOnRenderedListener(api);\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 BarView.prototype._clear = function (model) {\n var group = this.group;\n var data = this._data;\n if (model && model.isAnimationEnabled() && data && !this._isLargeDraw) {\n this._removeBackground();\n this._backgroundEls = [];\n data.eachItemGraphicEl(function (el) {\n removeElementWithFadeOut(el, model, getECData(el).dataIndex);\n });\n } else {\n group.removeAll();\n }\n this._data = null;\n this._isFirstFrame = true;\n };\n BarView.prototype._removeBackground = function () {\n this.group.remove(this._backgroundGroup);\n this._backgroundGroup = null;\n };\n BarView.type = 'bar';\n return BarView;\n}(ChartView);\nvar clip = {\n cartesian2d: function (coordSysBoundingRect, layout) {\n var signWidth = layout.width < 0 ? -1 : 1;\n var signHeight = layout.height < 0 ? -1 : 1;\n // Needs positive width and height\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\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;\n // 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 // Because if data changed and the bar shows again, its transition animation\n // will begin at this place.\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;\n // Reverse back\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n return xClipped || yClipped;\n },\n polar: function (coordSysClipArea, layout) {\n var signR = layout.r0 <= layout.r ? 1 : -1;\n // Make sure r is larger than r0\n if (signR < 0) {\n var tmp = layout.r;\n layout.r = layout.r0;\n layout.r0 = tmp;\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;\n // Reverse back\n if (signR < 0) {\n var tmp = layout.r;\n layout.r = layout.r0;\n layout.r0 = tmp;\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 if (animationModel) {\n var rectShape = rect.shape;\n var animateProperty = isHorizontal ? 'height' : 'width';\n rectShape[animateProperty] = 0;\n }\n return rect;\n },\n polar: function (seriesModel, data, newIndex, layout, isRadial, animationModel, axisModel, isUpdate, roundCap) {\n var ShapeClass = !isRadial && roundCap ? Sausage : Sector;\n var sector = new ShapeClass({\n shape: layout,\n z2: 1\n });\n sector.name = 'item';\n var positionMap = createPolarPositionMapping(isRadial);\n sector.calculateTextPosition = createSectorCalculateTextPosition(positionMap, {\n isRoundCap: ShapeClass === Sausage\n });\n // Animation\n if (animationModel) {\n var sectorShape = sector.shape;\n var animateProperty = isRadial ? 'r' : 'endAngle';\n var animateTarget = {};\n sectorShape[animateProperty] = isRadial ? layout.r0 : layout.startAngle;\n animateTarget[animateProperty] = layout[animateProperty];\n (isUpdate ? updateProps : initProps)(sector, {\n shape: animateTarget\n // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue\n }, animationModel);\n }\n return sector;\n }\n};\nfunction shouldRealtimeSort(seriesModel, coordSys) {\n var realtimeSortOption = seriesModel.get('realtimeSort', true);\n var baseAxis = coordSys.getBaseAxis();\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 if (coordSys.type !== 'cartesian2d') {\n warn('`realtimeSort` will not work because this bar series is not on cartesian2d.');\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}\nfunction updateRealtimeAnimation(realtimeSortCfg, seriesAnimationModel, el, layout, newIndex, isHorizontal, isUpdate, isChangeOrder) {\n var seriesTarget;\n var axisTarget;\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 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 var axisAnimationModel = seriesAnimationModel ? realtimeSortCfg.baseAxis.model : null;\n (isUpdate ? updateProps : initProps)(el, {\n shape: axisTarget\n }, axisAnimationModel, newIndex);\n}\nfunction checkPropertiesNotValid(obj, props) {\n for (var i = 0; i < props.length; i++) {\n if (!isFinite(obj[props[i]])) {\n return true;\n }\n }\n return false;\n}\nvar rectPropties = ['x', 'y', 'width', 'height'];\nvar polarPropties = ['cx', 'cy', 'r', 'startAngle', 'endAngle'];\nvar isValidLayout = {\n cartesian2d: function (layout) {\n return !checkPropertiesNotValid(layout, rectPropties);\n },\n polar: function (layout) {\n return !checkPropertiesNotValid(layout, polarPropties);\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;\n // fix layout with lineWidth\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 clockwise: layout.clockwise\n };\n }\n};\nfunction isZeroOnPolar(layout) {\n return layout.startAngle != null && layout.endAngle != null && layout.startAngle === layout.endAngle;\n}\nfunction createPolarPositionMapping(isRadial) {\n return function (isRadial) {\n var arcOrAngle = isRadial ? 'Arc' : 'Angle';\n return function (position) {\n switch (position) {\n case 'start':\n case 'insideStart':\n case 'end':\n case 'insideEnd':\n return position + arcOrAngle;\n default:\n return position;\n }\n };\n }(isRadial);\n}\nfunction updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, isPolar) {\n var style = data.getItemVisual(dataIndex, 'style');\n if (!isPolar) {\n var borderRadius = itemModel.get(['itemStyle', 'borderRadius']) || 0;\n el.setShape('r', borderRadius);\n } else if (!seriesModel.get('roundCap')) {\n var sectorShape = el.shape;\n var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape, true);\n extend(sectorShape, cornerRadius);\n el.setShape(sectorShape);\n }\n el.useStyle(style);\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && el.attr('cursor', cursorStyle);\n var labelPositionOutside = isPolar ? isHorizontalOrRadial ? layout.r >= layout.r0 ? 'endArc' : 'startArc' : layout.endAngle >= layout.startAngle ? 'endAngle' : 'startAngle' : isHorizontalOrRadial ? layout.height >= 0 ? 'bottom' : 'top' : layout.width >= 0 ? 'right' : 'left';\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 if (isPolar && label) {\n var position = itemModel.get(['label', 'position']);\n el.textConfig.inside = position === 'middle' ? true : null;\n setSectorTextRotation(el, position === 'outside' ? labelPositionOutside : position, createPolarPositionMapping(isHorizontalOrRadial), itemModel.get(['label', 'rotate']));\n }\n setLabelValueAnimation(label, labelStatesModels, seriesModel.getRawValue(dataIndex), function (value) {\n return getDefaultInterpolatedLabel(data, value);\n });\n var emphasisModel = itemModel.getModel(['emphasis']);\n toggleHoverEmphasis(el, emphasisModel.get('focus'), emphasisModel.get('blurScope'), emphasisModel.get('disabled'));\n setStatesStylesFromModel(el, itemModel);\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}\n// In case width or height are too small.\nfunction getLineWidth(itemModel, rawLayout) {\n // Has no border.\n var borderColor = itemModel.get(['itemStyle', 'borderColor']);\n if (!borderColor || borderColor === 'none') {\n return 0;\n }\n var lineWidth = itemModel.get(['itemStyle', 'borderWidth']) || 0;\n // width or height may be NaN for empty data\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}\nvar LagePathShape = /** @class */function () {\n function LagePathShape() {}\n return LagePathShape;\n}();\nvar LargePath = /** @class */function (_super) {\n __extends(LargePath, _super);\n function LargePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'largeBar';\n return _this;\n }\n LargePath.prototype.getDefaultShape = function () {\n return new LagePathShape();\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 baseDimIdx = this.baseDimIdx;\n var valueDimIdx = 1 - this.baseDimIdx;\n var startPoint = [];\n var size = [];\n var barWidth = this.barWidth;\n for (var i = 0; i < points.length; i += 3) {\n size[baseDimIdx] = barWidth;\n size[valueDimIdx] = points[i + 2];\n startPoint[baseDimIdx] = points[i + baseDimIdx];\n startPoint[valueDimIdx] = points[i + valueDimIdx];\n ctx.rect(startPoint[0], startPoint[1], size[0], size[1]);\n }\n };\n return LargePath;\n}(Path);\nfunction createLarge(seriesModel, group, progressiveEls, incremental) {\n // TODO support polar\n var data = seriesModel.getData();\n var baseDimIdx = data.getLayout('valueAxisHorizontal') ? 1 : 0;\n var largeDataIndices = data.getLayout('largeDataIndices');\n var barWidth = data.getLayout('size');\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var bgPoints = data.getLayout('largeBackgroundPoints');\n if (bgPoints) {\n var bgEl = new LargePath({\n shape: {\n points: bgPoints\n },\n incremental: !!incremental,\n silent: true,\n z2: 0\n });\n bgEl.baseDimIdx = baseDimIdx;\n bgEl.largeDataIndices = largeDataIndices;\n bgEl.barWidth = barWidth;\n bgEl.useStyle(backgroundModel.getItemStyle());\n group.add(bgEl);\n progressiveEls && progressiveEls.push(bgEl);\n }\n var el = new LargePath({\n shape: {\n points: data.getLayout('largePoints')\n },\n incremental: !!incremental,\n ignoreCoarsePointer: true,\n z2: 1\n });\n el.baseDimIdx = baseDimIdx;\n el.largeDataIndices = largeDataIndices;\n el.barWidth = barWidth;\n group.add(el);\n el.useStyle(data.getVisual('style'));\n // Enable tooltip and user mouse/touch event handlers.\n getECData(el).seriesIndex = seriesModel.seriesIndex;\n if (!seriesModel.get('silent')) {\n el.on('mousedown', largePathUpdateDataIndex);\n el.on('mousemove', largePathUpdateDataIndex);\n }\n progressiveEls && progressiveEls.push(el);\n}\n// Use throttle to avoid frequently traverse to find dataIndex.\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);\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 startPoint = [];\n var size = [];\n var barWidth = largePath.barWidth;\n for (var i = 0, len = points.length / 3; i < len; i++) {\n var ii = i * 3;\n size[baseDimIdx] = barWidth;\n size[valueDimIdx] = points[ii + 2];\n startPoint[baseDimIdx] = points[ii + baseDimIdx];\n startPoint[valueDimIdx] = points[ii + valueDimIdx];\n if (size[valueDimIdx] < 0) {\n startPoint[valueDimIdx] += size[valueDimIdx];\n size[valueDimIdx] = -size[valueDimIdx];\n }\n if (x >= startPoint[0] && x <= startPoint[0] + size[0] && y >= startPoint[1] && y <= startPoint[1] + size[1]) {\n return largeDataIndices[i];\n }\n }\n return -1;\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}\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}\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.js';\nimport { layout, createProgressiveLayout } from '../../layout/barGrid.js';\nimport dataSample from '../../processor/dataSample.js';\nimport BarSeries from './BarSeries.js';\nimport BarView from './BarView.js';\nexport function install(registers) {\n registers.registerChartView(BarView);\n registers.registerSeriesModel(BarSeries);\n registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, zrUtil.curry(layout, 'bar'));\n // Do layout after other overall layout, which can prepare some information.\n registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('bar'));\n // Down sample after filter\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 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}","\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 isCoordinateSystemType(coordSys, type) {\n return coordSys.type === type;\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 graphic from '../../util/graphic.js';\nimport { round } from '../../util/number.js';\nimport { isFunction } from 'zrender/lib/core/util.js';\nfunction createGridClipPath(cartesian, hasAnimation, seriesModel, done, during) {\n var rect = cartesian.getArea();\n var x = rect.x;\n var y = rect.y;\n var width = rect.width;\n var height = rect.height;\n var lineWidth = seriesModel.get(['lineStyle', 'width']) || 2;\n // Expand the clip path a bit to avoid the border is clipped and looks thinner\n x -= lineWidth / 2;\n y -= lineWidth / 2;\n width += lineWidth;\n height += lineWidth;\n // fix: https://github.com/apache/incubator-echarts/issues/11369\n width = Math.ceil(width);\n if (x !== Math.floor(x)) {\n x = Math.floor(x);\n // if no extra 1px on `width`, it will still be clipped since `x` is floored\n width++;\n }\n var clipPath = new graphic.Rect({\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n }\n });\n if (hasAnimation) {\n var baseAxis = cartesian.getBaseAxis();\n var isHorizontal = baseAxis.isHorizontal();\n var isAxisInversed = baseAxis.inverse;\n if (isHorizontal) {\n if (isAxisInversed) {\n clipPath.shape.x += width;\n }\n clipPath.shape.width = 0;\n } else {\n if (!isAxisInversed) {\n clipPath.shape.y += height;\n }\n clipPath.shape.height = 0;\n }\n var duringCb = isFunction(during) ? function (percent) {\n during(percent, clipPath);\n } : null;\n graphic.initProps(clipPath, {\n shape: {\n width: width,\n height: height,\n x: x,\n y: y\n }\n }, seriesModel, null, done, duringCb);\n }\n return clipPath;\n}\nfunction createPolarClipPath(polar, hasAnimation, seriesModel) {\n var sectorArea = polar.getArea();\n // Avoid float number rounding error for symbol on the edge of axis extent.\n var r0 = round(sectorArea.r0, 1);\n var r = round(sectorArea.r, 1);\n var clipPath = new graphic.Sector({\n shape: {\n cx: round(polar.cx, 1),\n cy: round(polar.cy, 1),\n r0: r0,\n r: r,\n startAngle: sectorArea.startAngle,\n endAngle: sectorArea.endAngle,\n clockwise: sectorArea.clockwise\n }\n });\n if (hasAnimation) {\n var isRadial = polar.getBaseAxis().dim === 'angle';\n if (isRadial) {\n clipPath.shape.endAngle = sectorArea.startAngle;\n } else {\n clipPath.shape.r = r0;\n }\n graphic.initProps(clipPath, {\n shape: {\n endAngle: sectorArea.endAngle,\n r: r\n }\n }, seriesModel);\n }\n return clipPath;\n}\nfunction createClipPath(coordSys, hasAnimation, seriesModel, done, during) {\n if (!coordSys) {\n return null;\n } else if (coordSys.type === 'polar') {\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n } else if (coordSys.type === 'cartesian2d') {\n return createGridClipPath(coordSys, hasAnimation, seriesModel, done, during);\n }\n return null;\n}\nexport { createGridClipPath, createPolarClipPath, createClipPath };","\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 '../graphic.js';\n/**\n * Sausage: similar to sector, but have half circle on both sides\n */\nvar SausageShape = /** @class */function () {\n function SausageShape() {\n this.cx = 0;\n this.cy = 0;\n this.r0 = 0;\n this.r = 0;\n this.startAngle = 0;\n this.endAngle = Math.PI * 2;\n this.clockwise = true;\n }\n return SausageShape;\n}();\nvar SausagePath = /** @class */function (_super) {\n __extends(SausagePath, _super);\n function SausagePath(opts) {\n var _this = _super.call(this, opts) || this;\n _this.type = 'sausage';\n return _this;\n }\n SausagePath.prototype.getDefaultShape = function () {\n return new SausageShape();\n };\n SausagePath.prototype.buildPath = function (ctx, shape) {\n var cx = shape.cx;\n var cy = shape.cy;\n var r0 = Math.max(shape.r0 || 0, 0);\n var r = Math.max(shape.r, 0);\n var dr = (r - r0) * 0.5;\n var rCenter = r0 + dr;\n var startAngle = shape.startAngle;\n var endAngle = shape.endAngle;\n var clockwise = shape.clockwise;\n var PI2 = Math.PI * 2;\n var lessThanCircle = clockwise ? endAngle - startAngle < PI2 : startAngle - endAngle < PI2;\n if (!lessThanCircle) {\n // Normalize angles\n startAngle = endAngle - (clockwise ? PI2 : -PI2);\n }\n var unitStartX = Math.cos(startAngle);\n var unitStartY = Math.sin(startAngle);\n var unitEndX = Math.cos(endAngle);\n var unitEndY = Math.sin(endAngle);\n if (lessThanCircle) {\n ctx.moveTo(unitStartX * r0 + cx, unitStartY * r0 + cy);\n ctx.arc(unitStartX * rCenter + cx, unitStartY * rCenter + cy, dr, -Math.PI + startAngle, startAngle, !clockwise);\n } else {\n ctx.moveTo(unitStartX * r + cx, unitStartY * r + cy);\n }\n ctx.arc(cx, cy, r, startAngle, endAngle, !clockwise);\n ctx.arc(unitEndX * rCenter + cx, unitEndY * rCenter + cy, dr, endAngle - Math.PI * 2, endAngle - Math.PI, !clockwise);\n if (r0 !== 0) {\n ctx.arc(cx, cy, r0, endAngle, startAngle, clockwise);\n }\n // ctx.closePath();\n };\n\n return SausagePath;\n}(Path);\nexport default SausagePath;","\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 { retrieveRawValue } from '../../data/helper/dataProvider.js';\nimport { isArray } from 'zrender/lib/core/util.js';\n/**\n * @return label string. Not null/undefined\n */\nexport function getDefaultLabel(data, dataIndex) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n var len = labelDims.length;\n // Simple optimization (in lots of cases, label dims length is 1)\n if (len === 1) {\n var rawVal = retrieveRawValue(data, dataIndex, labelDims[0]);\n return rawVal != null ? rawVal + '' : null;\n } else if (len) {\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n vals.push(retrieveRawValue(data, dataIndex, labelDims[i]));\n }\n return vals.join(' ');\n }\n}\nexport function getDefaultInterpolatedLabel(data, interpolatedValue) {\n var labelDims = data.mapDimensionsAll('defaultedLabel');\n if (!isArray(interpolatedValue)) {\n return interpolatedValue + '';\n }\n var vals = [];\n for (var i = 0; i < labelDims.length; i++) {\n var dimIndex = data.getDimensionIndex(labelDims[i]);\n if (dimIndex >= 0) {\n vals.push(interpolatedValue[dimIndex]);\n }\n }\n return vals.join(' ');\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 { isFunction, isString } from 'zrender/lib/core/util.js';\nvar samplers = {\n average: function (frame) {\n var sum = 0;\n var count = 0;\n for (var i = 0; i < frame.length; i++) {\n if (!isNaN(frame[i])) {\n sum += frame[i];\n count++;\n }\n }\n // Return NaN if count is 0\n return count === 0 ? NaN : sum / count;\n },\n sum: function (frame) {\n var sum = 0;\n for (var i = 0; i < frame.length; i++) {\n // Ignore NaN\n sum += frame[i] || 0;\n }\n return sum;\n },\n max: function (frame) {\n var max = -Infinity;\n for (var i = 0; i < frame.length; i++) {\n frame[i] > max && (max = frame[i]);\n }\n // NaN will cause illegal axis extent.\n return isFinite(max) ? max : NaN;\n },\n min: function (frame) {\n var min = Infinity;\n for (var i = 0; i < frame.length; i++) {\n frame[i] < min && (min = frame[i]);\n }\n // NaN will cause illegal axis extent.\n return isFinite(min) ? min : NaN;\n },\n minmax: function (frame) {\n var turningPointAbsoluteValue = -Infinity;\n var turningPointOriginalValue = -Infinity;\n for (var i = 0; i < frame.length; i++) {\n var originalValue = frame[i];\n var absoluteValue = Math.abs(originalValue);\n if (absoluteValue > turningPointAbsoluteValue) {\n turningPointAbsoluteValue = absoluteValue;\n turningPointOriginalValue = originalValue;\n }\n }\n return isFinite(turningPointOriginalValue) ? turningPointOriginalValue : NaN;\n },\n // TODO\n // Median\n nearest: function (frame) {\n return frame[0];\n }\n};\nvar indexSampler = function (frame) {\n return Math.round(frame.length / 2);\n};\nexport default function dataSample(seriesType) {\n return {\n seriesType: seriesType,\n // FIXME:TS never used, so comment it\n // modifyOutputEnd: true,\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var sampling = seriesModel.get('sampling');\n var coordSys = seriesModel.coordinateSystem;\n var count = data.count();\n // Only cartesian2d support down sampling. Disable it when there is few data.\n if (count > 10 && coordSys.type === 'cartesian2d' && sampling) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var extent = baseAxis.getExtent();\n var dpr = api.getDevicePixelRatio();\n // Coordinste system has been resized\n var size = Math.abs(extent[1] - extent[0]) * (dpr || 1);\n var rate = Math.round(count / size);\n if (isFinite(rate) && rate > 1) {\n if (sampling === 'lttb') {\n seriesModel.setData(data.lttbDownSample(data.mapDimension(valueAxis.dim), 1 / rate));\n }\n var sampler = void 0;\n if (isString(sampling)) {\n sampler = samplers[sampling];\n } else if (isFunction(sampling)) {\n sampler = sampling;\n }\n if (sampler) {\n // Only support sample the first dim mapped from value axis.\n seriesModel.setData(data.downSample(data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler));\n }\n }\n }\n }\n };\n}"],"sourceRoot":""}