{"version":3,"sources":["webpack:///./node_modules/echarts/lib/chart/parallel/ParallelSeries.js","webpack:///./node_modules/echarts/lib/component/visualMap/PiecewiseView.js","webpack:///./node_modules/echarts/lib/component/tooltip.js","webpack:///./node_modules/echarts/lib/chart/funnel/FunnelSeries.js","webpack:///./node_modules/echarts/lib/coord/geo/prepareCustom.js","webpack:///./node_modules/echarts/lib/coord/geo/Geo.js","webpack:///./node_modules/echarts/lib/component/helper/roamHelper.js","webpack:///./node_modules/echarts/lib/data/Tree.js","webpack:///./node_modules/echarts/lib/component/visualMap/PiecewiseModel.js","webpack:///./node_modules/echarts/lib/component/tooltip/TooltipContent.js","webpack:///./node_modules/echarts/lib/chart/gauge.js","webpack:///./node_modules/echarts/lib/chart/parallel.js","webpack:///./node_modules/echarts/lib/chart/candlestick.js","webpack:///./node_modules/echarts/lib/component/timeline/TimelineAxis.js","webpack:///./node_modules/echarts/lib/chart/candlestick/candlestickLayout.js","webpack:///./node_modules/echarts/lib/component/dataZoom.js","webpack:///./node_modules/echarts/lib/component/legendScroll.js","webpack:///./node_modules/zrender/lib/core/arrayDiff2.js","webpack:///./node_modules/echarts/lib/chart/helper/multipleGraphEdgeHelper.js","webpack:///./node_modules/echarts/lib/component/helper/MapDraw.js","webpack:///./node_modules/echarts/lib/chart/sankey/sankeyVisual.js","webpack:///./node_modules/echarts/lib/component/legend/ScrollableLegendView.js","webpack:///./node_modules/echarts/lib/coord/parallel/ParallelAxis.js","webpack:///./node_modules/echarts/lib/chart/helper/EffectLine.js","webpack:///./node_modules/echarts/lib/component/brush/visualEncoding.js","webpack:///./node_modules/echarts/lib/chart/effectScatter.js","webpack:///./node_modules/echarts/lib/chart/radar/RadarView.js","webpack:///./node_modules/echarts/lib/chart/scatter.js","webpack:///./node_modules/echarts/lib/coord/radar/RadarModel.js","webpack:///./node_modules/echarts/lib/coord/geo/fix/textCoord.js","webpack:///./node_modules/echarts/lib/chart/bar/BarSeries.js","webpack:///./node_modules/echarts/lib/component/marker/MarkLineModel.js","webpack:///./node_modules/echarts/lib/chart/candlestick/CandlestickView.js","webpack:///./node_modules/echarts/lib/chart/pie/PieView.js","webpack:///./node_modules/echarts/lib/chart/graph/simpleLayoutHelper.js","webpack:///./src/views/Tasting/user/scancode/chart.vue?b278","webpack:///./node_modules/echarts/lib/chart/gauge/PointerPath.js","webpack:///./node_modules/echarts/lib/coord/geo/GeoModel.js","webpack:///./node_modules/echarts/lib/component/toolbox/featureManager.js","webpack:///./node_modules/echarts/lib/chart/tree/TreeSeries.js","webpack:///./node_modules/echarts/lib/coord/parallel/ParallelModel.js","webpack:///./node_modules/echarts/lib/chart/tree/layoutHelper.js","webpack:///./node_modules/echarts/lib/component/dataZoom/SliderZoomView.js","webpack:///./node_modules/echarts/lib/chart/helper/createGraphFromNodeEdge.js","webpack:///./node_modules/echarts/lib/coord/radar/Radar.js","webpack:///./node_modules/echarts/lib/chart/graph.js","webpack:///./node_modules/echarts/lib/component/marker/MarkerModel.js","webpack:///./node_modules/echarts/lib/chart/funnel/funnelLayout.js","webpack:///./node_modules/echarts/lib/chart/themeRiver/ThemeRiverView.js","webpack:///./node_modules/echarts/lib/chart/pie/pieLayout.js","webpack:///./node_modules/echarts/lib/chart/graph/categoryVisual.js","webpack:///./node_modules/echarts/lib/component/visualMapPiecewise.js","webpack:///./node_modules/echarts/lib/visual/visualSolution.js","webpack:///./node_modules/echarts/lib/component/dataZoom/dataZoomProcessor.js","webpack:///./node_modules/echarts/lib/component/singleAxis.js","webpack:///./node_modules/echarts/lib/component/brush.js","webpack:///./node_modules/echarts/lib/chart/boxplot/boxplotVisual.js","webpack:///./node_modules/echarts/lib/chart/bar/BaseBarSeries.js","webpack:///./node_modules/echarts/lib/component/visualMap/ContinuousModel.js","webpack:///./node_modules/echarts/lib/coord/single/prepareCustom.js","webpack:///./node_modules/echarts/lib/component/marker/MarkLineView.js","webpack:///./node_modules/echarts/lib/chart/sankey.js","webpack:///./node_modules/echarts/index.js","webpack:///./node_modules/echarts/lib/data/helper/linkList.js","webpack:///./node_modules/echarts/lib/coord/geo/fix/nanhai.js","webpack:///./node_modules/echarts/lib/component/dataZoom/InsideZoomView.js","webpack:///./node_modules/echarts/lib/chart/bar/PictorialBarView.js","webpack:///./node_modules/echarts/lib/chart/sunburst/SunburstView.js","webpack:///./node_modules/echarts/lib/component/timeline/SliderTimelineView.js","webpack:///./node_modules/echarts/lib/component/dataZoom/SliderZoomModel.js","webpack:///./node_modules/echarts/lib/component/timeline/timelineAction.js","webpack:///./node_modules/echarts/lib/chart/heatmap/HeatmapSeries.js","webpack:///./node_modules/echarts/lib/component/dataZoom/DataZoomModel.js","webpack:///./node_modules/echarts/lib/component/visualMap/ContinuousView.js","webpack:///./node_modules/zrender/lib/svg/graphic.js","webpack:///./node_modules/echarts/lib/component/dataZoom/SelectZoomModel.js","webpack:///./node_modules/echarts/lib/component/tooltip/TooltipView.js","webpack:///./node_modules/echarts/lib/coord/single/singleCreator.js","webpack:///./node_modules/echarts/lib/component/marker/MarkAreaModel.js","webpack:///./node_modules/echarts/lib/chart/treemap/treemapAction.js","webpack:///./node_modules/echarts/lib/chart/sunburst/sunburstAction.js","webpack:///./node_modules/echarts/lib/chart/helper/Polyline.js","webpack:///./node_modules/echarts/lib/component/legend/legendAction.js","webpack:///./node_modules/echarts/lib/coord/calendar/prepareCustom.js","webpack:///./node_modules/echarts/lib/chart/effectScatter/EffectScatterView.js","webpack:///./node_modules/echarts/lib/chart/heatmap/HeatmapView.js","webpack:///./node_modules/echarts/lib/chart/graph/adjustEdge.js","webpack:///./node_modules/echarts/lib/action/geoRoam.js","webpack:///./node_modules/echarts/lib/component/helper/RoamController.js","webpack:///./node_modules/zrender/lib/svg/helper/Definable.js","webpack:///./src/views/Tasting/user/scancode/chart.vue?b941","webpack:///src/views/Tasting/user/scancode/chart.vue","webpack:///./src/views/Tasting/user/scancode/chart.vue?3f6a","webpack:///./src/views/Tasting/user/scancode/chart.vue","webpack:///./node_modules/echarts/lib/component/dataZoom/SelectZoomView.js","webpack:///./node_modules/echarts/lib/coord/single/Single.js","webpack:///./node_modules/echarts/lib/coord/geo/geoJSONLoader.js","webpack:///./node_modules/echarts/lib/chart/candlestick/candlestickVisual.js","webpack:///./node_modules/echarts/lib/chart/funnel/FunnelView.js","webpack:///./node_modules/echarts/lib/chart/gauge/GaugeSeries.js","webpack:///./node_modules/echarts/lib/chart/map/MapSeries.js","webpack:///./node_modules/echarts/lib/chart/sunburst/SunburstPiece.js","webpack:///./node_modules/echarts/lib/component/toolbox/feature/SaveAsImage.js","webpack:///./node_modules/echarts/lib/component/dataZoom/helper.js","webpack:///./node_modules/echarts/lib/chart/themeRiver/themeRiverLayout.js","webpack:///./node_modules/echarts/lib/chart/graph/graphHelper.js","webpack:///./node_modules/echarts/lib/component/visualMap.js","webpack:///./node_modules/echarts/lib/chart/map/mapVisual.js","webpack:///./node_modules/echarts/lib/component/radar.js","webpack:///./node_modules/echarts/lib/component/dataZoom/roams.js","webpack:///./node_modules/echarts/lib/chart/helper/treeHelper.js","webpack:///./node_modules/echarts/lib/chart/graph/forceLayout.js","webpack:///./node_modules/echarts/lib/chart/sankey/SankeyView.js","webpack:///./node_modules/echarts/lib/coord/geo/geoSourceManager.js","webpack:///./node_modules/echarts/lib/chart/heatmap.js","webpack:///./node_modules/echarts/lib/component/legend/LegendView.js","webpack:///./node_modules/echarts/lib/visual/VisualMapping.js","webpack:///./node_modules/echarts/lib/chart/parallel/ParallelView.js","webpack:///./node_modules/echarts/lib/visual/visualDefault.js","webpack:///./node_modules/echarts/lib/component/title.js","webpack:///./node_modules/echarts/lib/coord/parallel/parallelPreprocessor.js","webpack:///./node_modules/echarts/lib/chart/lines/linesLayout.js","webpack:///./node_modules/echarts/lib/component/timeline/preprocessor.js","webpack:///./node_modules/echarts/lib/coord/single/SingleAxis.js","webpack:///./node_modules/echarts/lib/chart/graph/categoryFilter.js","webpack:///./node_modules/echarts/lib/chart/map.js","webpack:///./node_modules/echarts/lib/chart/effectScatter/EffectScatterSeries.js","webpack:///./node_modules/echarts/lib/chart/bar/BarView.js","webpack:///./node_modules/echarts/lib/component/dataZoom/typeDefaulter.js","webpack:///./node_modules/echarts/lib/chart/helper/EffectPolyline.js","webpack:///./node_modules/echarts/lib/coord/geo/fix/geoCoord.js","webpack:///./node_modules/echarts/lib/component/radar/RadarView.js","webpack:///./node_modules/echarts/lib/chart/themeRiver.js","webpack:///./node_modules/echarts/lib/coord/View.js","webpack:///./node_modules/echarts/lib/chart/tree/TreeView.js","webpack:///./node_modules/echarts/lib/chart/tree/traversalHelper.js","webpack:///./node_modules/echarts/lib/component/dataZoom/history.js","webpack:///./node_modules/echarts/lib/component/helper/selectableMixin.js","webpack:///./node_modules/echarts/lib/chart/themeRiver/themeRiverVisual.js","webpack:///./node_modules/echarts/lib/chart/lines/LinesSeries.js","webpack:///./node_modules/echarts/lib/component/visualMap/VisualMapView.js","webpack:///./node_modules/echarts/lib/data/Graph.js","webpack:///./node_modules/echarts/lib/chart/helper/LineDraw.js","webpack:///./node_modules/echarts/lib/component/visualMapContinuous.js","webpack:///./node_modules/echarts/lib/component/geo/GeoView.js","webpack:///./node_modules/echarts/lib/component/toolbox/feature/DataView.js","webpack:///./node_modules/echarts/lib/action/createDataSelectAction.js","webpack:///./node_modules/echarts/lib/coord/radar/IndicatorAxis.js","webpack:///./node_modules/echarts/lib/chart/radar/backwardCompat.js","webpack:///./node_modules/echarts/lib/component/helper/listComponent.js","webpack:///./node_modules/echarts/lib/chart/graph/createView.js","webpack:///./node_modules/echarts/lib/component/toolbox/feature/DataZoom.js","webpack:///./node_modules/echarts/lib/component/dataZoom/DataZoomView.js","webpack:///./node_modules/echarts/lib/component/markArea.js","webpack:///./node_modules/echarts/lib/chart/helper/Line.js","webpack:///./node_modules/echarts/lib/component/graphic.js","webpack:///./node_modules/echarts/lib/component/dataZoomInside.js","webpack:///./node_modules/echarts/lib/chart/helper/LinePath.js","webpack:///./node_modules/echarts/lib/chart/sankey/sankeyLayout.js","webpack:///./node_modules/echarts/lib/component/tooltip/TooltipRichContent.js","webpack:///./node_modules/echarts/lib/component/marker/MarkPointView.js","webpack:///./node_modules/echarts/lib/coord/calendar/CalendarModel.js","webpack:///./node_modules/echarts/lib/component/axis/parallelAxisAction.js","webpack:///./node_modules/echarts/lib/coord/parallel/parallelCreator.js","webpack:///./node_modules/echarts/lib/component/legend/LegendModel.js","webpack:///./node_modules/echarts/lib/chart/radar/radarLayout.js","webpack:///./node_modules/zrender/lib/svg/core.js","webpack:///./node_modules/echarts/lib/chart/graph/GraphSeries.js","webpack:///./node_modules/echarts/lib/component/marker/MarkerView.js","webpack:///./node_modules/echarts/lib/chart/radar.js","webpack:///./node_modules/echarts/lib/component/marker/MarkAreaView.js","webpack:///./node_modules/echarts/lib/component/toolbox/ToolboxModel.js","webpack:///./node_modules/zrender/lib/svg/svg.js","webpack:///./node_modules/echarts/lib/component/legend/legendFilter.js","webpack:///./node_modules/echarts/lib/chart/treemap/treemapVisual.js","webpack:///./node_modules/echarts/lib/component/marker/markerHelper.js","webpack:///./node_modules/echarts/lib/chart/treemap/TreemapSeries.js","webpack:///./node_modules/echarts/lib/component/timeline/TimelineView.js","webpack:///./node_modules/echarts/lib/component/calendar.js","webpack:///./node_modules/echarts/lib/chart/map/backwardCompat.js","webpack:///./node_modules/echarts/lib/chart/bar.js","webpack:///./node_modules/echarts/lib/chart/graph/circularLayoutHelper.js","webpack:///./node_modules/echarts/lib/component/markLine.js","webpack:///./node_modules/echarts/lib/chart/graph/GraphView.js","webpack:///./node_modules/echarts/lib/visual/dataColor.js","webpack:///./node_modules/echarts/lib/chart/treemap/treemapLayout.js","webpack:///./node_modules/echarts/lib/component/dataZoom/dataZoomAction.js","webpack:///./node_modules/zrender/lib/svg/helper/ClippathManager.js","webpack:///./node_modules/echarts/lib/chart/radar/RadarSeries.js","webpack:///./node_modules/echarts/lib/component/timeline/typeDefaulter.js","webpack:///./node_modules/echarts/lib/component/dataZoom/InsideZoomModel.js","webpack:///./node_modules/echarts/lib/chart/helper/LargeLineDraw.js","webpack:///./node_modules/echarts/lib/chart/funnel.js","webpack:///./node_modules/echarts/lib/component/helper/interactionMutex.js","webpack:///./node_modules/echarts/lib/chart/map/MapView.js","webpack:///./node_modules/echarts/lib/chart/gauge/GaugeView.js","webpack:///./node_modules/echarts/lib/chart/lines.js","webpack:///./node_modules/echarts/lib/coord/geo/fix/diaoyuIsland.js","webpack:///./node_modules/zrender/lib/vml/graphic.js","webpack:///./node_modules/echarts/lib/component/brush/selector.js","webpack:///./node_modules/echarts/lib/component/marker/MarkPointModel.js","webpack:///./node_modules/echarts/lib/component/tooltip/TooltipModel.js","webpack:///./node_modules/echarts/lib/chart/sunburst/SunburstSeries.js","webpack:///./node_modules/echarts/lib/coord/cartesian/prepareCustom.js","webpack:///./node_modules/echarts/lib/chart/pictorialBar.js","webpack:///./node_modules/echarts/lib/component/visualMap/visualEncoding.js","webpack:///./node_modules/echarts/lib/chart/parallel/parallelVisual.js","webpack:///./node_modules/echarts/lib/chart/scatter/ScatterView.js","webpack:///./node_modules/echarts/lib/chart/graph/circularLayout.js","webpack:///./node_modules/echarts/lib/chart/themeRiver/ThemeRiverSeries.js","webpack:///./node_modules/echarts/lib/chart/lines/LinesView.js","webpack:///./node_modules/echarts/lib/component/brush/preprocessor.js","webpack:///./node_modules/echarts/lib/component/axis/ParallelAxisView.js","webpack:///./node_modules/echarts/lib/component/toolbox.js","webpack:///./node_modules/zrender/lib/svg/helper/GradientManager.js","webpack:///./node_modules/echarts/lib/component/visualMap/preprocessor.js","webpack:///./node_modules/echarts/lib/chart/treemap/TreemapView.js","webpack:///./node_modules/echarts/lib/chart/bar/barItemStyle.js","webpack:///./node_modules/echarts/lib/component/brush/brushAction.js","webpack:///./node_modules/echarts/lib/chart/pie/labelLayout.js","webpack:///./node_modules/echarts/lib/component/visualMap/typeDefaulter.js","webpack:///./node_modules/zrender/lib/svg/helper/ShadowManager.js","webpack:///./node_modules/echarts/lib/component/axis/SingleAxisView.js","webpack:///./node_modules/echarts/lib/chart/candlestick/CandlestickSeries.js","webpack:///./node_modules/echarts/lib/component/helper/BrushTargetManager.js","webpack:///./node_modules/echarts/lib/chart/sankey/sankeyAction.js","webpack:///./node_modules/echarts/lib/chart/tree/treeAction.js","webpack:///./node_modules/echarts/lib/chart/pie.js","webpack:///./node_modules/echarts/lib/util/shape/sausage.js","webpack:///./node_modules/echarts/lib/component/brush/BrushView.js","webpack:///./node_modules/echarts/lib/visual/LegendVisualProvider.js","webpack:///./node_modules/echarts/lib/component/parallelAxis.js","webpack:///./node_modules/echarts/lib/component/helper/cursorHelper.js","webpack:///./node_modules/echarts/lib/coord/single/AxisModel.js","webpack:///./node_modules/echarts/lib/chart/helper/EffectSymbol.js","webpack:///./node_modules/echarts/lib/coord/geo/geoSVGLoader.js","webpack:///./node_modules/echarts/lib/chart/helper/LargeSymbolDraw.js","webpack:///./node_modules/echarts/lib/chart/tree/treeLayout.js","webpack:///./node_modules/echarts/lib/chart/scatter/ScatterSeries.js","webpack:///./node_modules/echarts/lib/chart/sunburst/sunburstLayout.js","webpack:///./node_modules/echarts/lib/component/visualMap/helper.js","webpack:///./node_modules/echarts/lib/component/dataZoom/AxisProxy.js","webpack:///./node_modules/echarts/lib/component/grid.js","webpack:///./node_modules/echarts/lib/chart/heatmap/HeatmapLayer.js","webpack:///./node_modules/echarts/lib/chart/map/mapSymbolLayout.js","webpack:///./node_modules/echarts/lib/chart/sankey/SankeySeries.js","webpack:///./node_modules/echarts/lib/component/geo.js","webpack:///./node_modules/echarts/lib/coord/calendar/Calendar.js","webpack:///./node_modules/echarts/lib/component/legend.js","webpack:///./node_modules/echarts/lib/chart/helper/focusNodeAdjacencyAction.js","webpack:///./node_modules/echarts/lib/chart/graph/simpleLayout.js","webpack:///./node_modules/echarts/lib/component/toolbox/feature/MagicType.js","webpack:///./node_modules/zrender/lib/vml/core.js","webpack:///./node_modules/echarts/lib/processor/dataFilter.js","webpack:///./node_modules/echarts/lib/chart/bar/PictorialBarSeries.js","webpack:///./node_modules/echarts/lib/component/visualMap/visualMapAction.js","webpack:///./node_modules/echarts/lib/chart/sunburst.js","webpack:///./node_modules/echarts/lib/chart/graph/graphAction.js","webpack:///./node_modules/echarts/lib/action/roamHelper.js","webpack:///./node_modules/echarts/lib/coord/parallel/Parallel.js","webpack:///./node_modules/echarts/lib/chart/treemap.js","webpack:///./node_modules/echarts/lib/component/markPoint.js","webpack:///./node_modules/echarts/lib/component/toolbox/ToolboxView.js","webpack:///./node_modules/zrender/lib/svg/Painter.js","webpack:///./node_modules/echarts/lib/chart/boxplot/BoxplotView.js","webpack:///./node_modules/echarts/lib/component/dataZoomSelect.js","webpack:///./node_modules/echarts/lib/component/timeline/SliderTimelineModel.js","webpack:///./node_modules/echarts/lib/chart/graph/edgeVisual.js","webpack:///./node_modules/echarts/lib/coord/parallel/AxisModel.js","webpack:///./node_modules/echarts/lib/component/toolbox/feature/Restore.js","webpack:///./node_modules/echarts/lib/chart/custom.js","webpack:///./node_modules/echarts/lib/chart/helper/whiskerBoxCommon.js","webpack:///./node_modules/echarts/lib/chart/helper/createListSimply.js","webpack:///./node_modules/echarts/lib/component/dataZoomSlider.js","webpack:///./node_modules/echarts/lib/util/animation.js","webpack:///./node_modules/echarts/lib/chart/bar/helper.js","webpack:///./node_modules/zrender/lib/vml/Painter.js","webpack:///./node_modules/echarts/lib/chart/candlestick/preprocessor.js","webpack:///./node_modules/echarts/lib/component/visualMap/VisualMapModel.js","webpack:///./node_modules/echarts/lib/coord/polar/prepareCustom.js","webpack:///./node_modules/echarts/lib/component/legend/scrollableLegendAction.js","webpack:///./node_modules/echarts/lib/chart/boxplot/boxplotLayout.js","webpack:///./node_modules/echarts/lib/component/timeline/TimelineModel.js","webpack:///./node_modules/echarts/lib/coord/single/singleAxisHelper.js","webpack:///./node_modules/echarts/lib/component/calendar/CalendarView.js","webpack:///./node_modules/echarts/lib/component/timeline.js","webpack:///./node_modules/echarts/lib/chart/lines/linesVisual.js","webpack:///./node_modules/echarts/lib/coord/geo/geoCreator.js","webpack:///./node_modules/echarts/lib/chart/graph/forceHelper.js","webpack:///./node_modules/echarts/lib/component/helper/sliderMove.js","webpack:///./node_modules/echarts/lib/chart/tree.js","webpack:///./node_modules/echarts/lib/component/axisPointer/SingleAxisPointer.js","webpack:///./node_modules/echarts/lib/component/legend/ScrollableLegendModel.js","webpack:///./node_modules/zrender/lib/vml/vml.js","webpack:///./node_modules/echarts/lib/component/parallel.js","webpack:///./node_modules/echarts/lib/component/brush/BrushModel.js","webpack:///./node_modules/echarts/lib/component/helper/brushHelper.js","webpack:///./node_modules/echarts/lib/chart/treemap/Breadcrumb.js","webpack:///./node_modules/echarts/lib/chart/map/mapDataStatistic.js","webpack:///./node_modules/echarts/lib/chart/pie/PieSeries.js","webpack:///./node_modules/echarts/lib/chart/boxplot.js","webpack:///./node_modules/echarts/lib/component/helper/BrushController.js","webpack:///./node_modules/echarts/lib/chart/boxplot/BoxplotSeries.js","webpack:///./node_modules/echarts/lib/component/toolbox/feature/Brush.js"],"names":["_util","each","createHashMap","SeriesModel","createListFromArray","_default","extend","type","dependencies","visualColorAccessPath","getInitialData","option","ecModel","source","this","getSource","setEncodeAndDimensions","getRawIndicesByActiveState","activeState","coordSys","coordinateSystem","data","getData","indices","eachActiveState","theActiveState","dataIndex","push","getRawIndex","defaultOption","zlevel","z","parallelIndex","label","show","inactiveOpacity","activeOpacity","lineStyle","width","opacity","emphasis","progressive","smooth","animationEasing","seriesModel","encodeDefine","parallelModel","getComponent","get","dimensions","axisDim","dataDimIndex","convertDimNameToNumber","set","dimName","replace","module","exports","zrUtil","VisualMapView","graphic","_symbol","createSymbol","layout","helper","PiecewiseVisualMapView","doRender","thisGroup","group","removeAll","visualMapModel","textGap","textStyleModel","textFont","getFont","textFill","getTextColor","itemAlign","_getItemAlign","itemSize","viewData","_getViewData","endsText","showLabel","retrieve","renderItem","item","piece","itemGroup","Group","onclick","bind","_onItemClick","_enableHoverLink","indexInModelPieceList","representValue","getRepresentValue","_createItemSymbol","visualState","getValueState","add","Text","style","x","y","text","textVerticalAlign","textAlign","_renderEndsText","viewPieceList","box","renderBackground","positionGroup","pieceIndex","onHoverLink","method","hoverLink","api","dispatchAction","batch","makeHighDownBatch","findTargetDataIndices","on","modelOption","orient","getItemAlign","align","map","getPieceList","index","inverse","reverse","slice","shapeParam","getControllerVisual","selected","clone","newKey","getSelectedMapKey","selectedMode","o","key","from","uid","visualMapId","id","echarts","registerAction","event","update","createListSimply","_model","defaultEmphasis","_sourceHelper","makeSeriesEncodeForNameBased","LegendVisualProvider","FunnelSeries","extendSeriesModel","init","superApply","arguments","legendVisualProvider","getRawData","_defaultLabelLine","coordDimensions","encodeDefaulter","curry","labelLineNormalOpt","labelLine","labelLineEmphasisOpt","getDataParams","params","superCall","valueDim","mapDimension","sum","getSum","percent","toFixed","$vars","legendHoverLink","left","top","right","bottom","minSize","maxSize","sort","gap","funnelAlign","position","length","itemStyle","borderColor","borderWidth","dataToCoordSize","dataSize","dataItem","dimIdx","val","halfSize","p1","p2","Math","abs","dataToPoint","rect","getBoundingRect","height","zoom","getZoom","coord","size","BoundingRect","View","geoSourceManager","Geo","name","nameMap","invertLongitute","call","load","_nameCoordMap","nameCoordMap","_regionsMap","regionsMap","_invertLongitute","regions","_rect","boundingRect","doConvert","methodName","finder","value","geoModel","getReferringComponents","prototype","constructor","containCoord","i","contain","transformTo","rawTransformable","_rawTransformable","transform","calculateTransform","decomposeTransform","scale","updateTransform","_updateTransform","getRegion","getRegionByCoord","addGeoCoord","geoCoord","getGeoCoord","noRoam","out","convertToPixel","convertFromPixel","mixin","updateViewOnPan","controllerHost","dx","dy","target","pos","dirty","updateViewOnZoom","zoomDelta","zoomX","zoomY","zoomLimit","newZoom","zoomMin","min","zoomMax","max","Infinity","zoomScale","linkList","List","createDimensions","TreeNode","hostTree","depth","parentNode","children","viewChildren","Tree","hostModel","root","_nodes","addChild","child","node","isRemoved","eachNode","options","cb","context","isString","order","suppressVisitSub","attr","updateDepthAndHeight","getNodeById","getId","len","res","contains","getAncestors","includeSelf","ancestors","getValue","dimension","getDimension","setLayout","merge","setItemLayout","getLayout","getItemLayout","getModel","path","itemModel","getItemModel","setVisual","setItemVisual","getVisual","ignoreParent","getItemVisual","isAncestorOf","parent","isDescendantOf","getNodeByDataIndex","rawIndex","getNodeByName","nodes","count","clearLayouts","clearItemLayouts","createTree","dataRoot","beforeLink","tree","listData","dimMax","buildHierarchy","dataNode","isArray","dimensionsInfo","dimensionsCount","list","initData","mainData","struct","structAttr","_config","__DEV__","VisualMapModel","VisualMapping","visualDefault","_number","reformIntervals","PiecewiseModel","minOpen","maxOpen","itemWidth","itemHeight","itemSymbol","pieceList","categories","splitNumber","itemGap","optionUpdated","newOption","isInit","_pieceList","resetExtent","mode","_mode","_determineMode","resetMethods","_resetSelected","resetVisual","mappingOption","state","mappingMethod","dataExtent","getExtent","visual","completeVisualOption","visualTypesInPieces","visualTypes","listVisualTypes","isCategory","has","obj","visualType","isObject","hasOwnProperty","pieces","v","exists","stateList","apply","thisOption","hasSel","setSelected","findPieceIndex","result","eachTargetSeries","dataIndices","getDataDimension","pIdx","seriesId","pieceInterval","interval","getVisualMeta","getColorVisual","stops","outerColors","edge","unshift","curr","setStop","valueState","color","precision","parseInt","splitStep","close","formatValueText","cate","normalizeReverse","pieceListItem","closeList","infinityList","useMinMax","lg","names","retrieveVisuals","edgeSymbols","zrColor","eventUtil","domUtil","env","formatUtil","toCamelCase","vendors","gCssText","assembleTransition","duration","transitionCurve","transitionText","vendorPrefix","join","assembleFont","cssText","fontSize","lineHeight","round","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","assembleCssText","tooltipModel","transitionDuration","backgroundColor","padding","canvasSupported","toHex","borderName","camelCase","normalizeCssArray","makeStyleCoord","zr","appendToBody","zrX","zrY","zrPainter","painter","zrViewportRoot","getViewportRoot","transformLocalCoord","document","body","viewportRootOffset","getViewportRootOffset","offsetLeft","offsetTop","getWidth","getHeight","TooltipContent","container","opt","wxa","el","createElement","domBelongToZr","_zr","getZr","_appendToBody","_styleCoord","appendChild","_container","_show","_hideTimeout","self","onmouseenter","_enterable","clearTimeout","_inContent","onmousemove","e","window","handler","normalizeEvent","dispatch","onmouseleave","hideLater","_hideDelay","stl","currentStyle","defaultView","getComputedStyle","domStyle","alwaysShowContent","_moveTooltipIfResized","ratioX","ratioY","realX","realY","moveTo","styleCoord","display","innerHTML","pointerEvents","setContent","content","setEnterable","enterable","getSize","clientWidth","clientHeight","hide","time","setTimeout","isShow","dispose","removeChild","getOuterSize","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","parallelVisual","registerVisual","preprocessor","candlestickVisual","candlestickLayout","registerPreprocessor","registerLayout","Axis","TimelineAxis","dim","coordExtent","axisType","model","getLabelModel","isHorizontal","inherits","_graphic","subPixelOptimize","createRenderPlanner","parsePercent","retrieve2","LargeArr","Float32Array","Array","seriesType","plan","reset","candleWidth","calculateCandleWidth","cDimIdx","vDimIdx","coordDims","cDim","vDims","openDim","closeDim","lowestDim","highestDim","isSimpleBox","progress","pipelineContext","large","largeProgress","normalProgress","next","axisDimVal","openVal","closeVal","lowestVal","highestVal","ocLow","ocHigh","ocLowPoint","getPoint","ocHighPoint","lowestPoint","highestPoint","ends","addBodyEnd","subPixelOptimizePoint","sign","getSign","initBaseline","brushRect","makeBrushRect","p","isNaN","NaN","point","start","point1","point2","pmin","pmax","points","offset","tmpIn","tmpOut","extent","baseAxis","getBaseAxis","bandWidth","getBandWidth","barMaxWidth","barMinWidth","barWidth","Diff","buildValues","diff","components","newArr","oldArr","componentPos","componentLen","newPos","oldPos","component","removed","added","clonePath","equals","a","b","newLen","oldLen","editLength","maxEditLength","bestPath","extractCommon","execEditLength","diagonalPath","basePath","addPath","removePath","undefined","canAdd","canRemove","pushComponent","ret","last","commonCount","tokenize","arrayDiff","callback","KEY_DELIMITER","getAutoCurvenessParams","createCurveness","appendLength","autoCurvenessParmas","curvenessList","__curvenessList","getKeyOfEdges","n1","n2","getOppositeKey","keys","split","getEdgeFromMap","node1","node2","__edgeMap","getTotalLengthBetweenNodes","getEdgeMapLengthWithKey","lenV","edgeMap","initCurvenessList","createEdgeMapForCurveness","oppositeEdges","isForward","getCurvenessForEdge","needReverse","autoCurvenessParams","isArrayParam","edgeArray","edgeIndex","totalLen","curKey","parityCorrection","oppositeKey","resValue","RoamController","roamHelper","_cursorHelper","onIrrelevantElement","_component","getUID","Transformable","getFixedItemStyle","getItemStyle","areaColor","fill","updateMapSelectHandler","mapDraw","mapOrGeoModel","regionsGroup","fromView","off","_mouseDownFlag","__regions","action","mainType","region","updateMapSelected","eachChild","otherRegionEl","trigger","isSelected","MapDraw","updateGroup","_controller","_controllerHost","_updateGroup","_mapName","_initialized","_regionsGroup","_backgroundGroup","draw","payload","isGeo","eachComponent","subType","mapSeries","getHostGeoModel","geo","_updateBackground","targetScale","transformInfo","getTransformInfo","isFirstDraw","childAt","roamTransform","props","updateProps","rawScale","rawPosition","itemStyleAccessPath","hoverItemStyleAccessPath","labelAccessPath","hoverLabelAccessPath","regionGroup","compoundPath","CompoundPath","segmentIgnoreThreshold","shape","paths","dataIdx","regionModel","getRegionModel","itemStyleModel","hoverItemStyleModel","hoverItemStyle","labelModel","hoverLabelModel","indexOfName","visualColor","transformPoint","geometries","geometry","exterior","Polygon","interiors","interior","j","setStyle","strokeNoScale","culling","hoverShowLabel","isDataNaN","itemLayout","labelFetcher","query","textEl","center","z2","silent","setLabelStyle","hoverStyle","labelDataIndex","defaultText","useInsideStyle","textScale","setItemGraphicEl","eventData","componentType","componentIndex","geoIndex","groupRegions","highDownSilentOnTouch","setHoverStyle","_updateController","remove","removeGraphic","mapName","makeGraphic","controller","enable","makeActionBase","originX","originY","traverse","setPointerChecker","getViewRectAfterRoam","eachSeriesByType","graph","getGraph","minValue","maxValue","nodeValue","mapping","mapValueToColor","mapValueToVisual","customColor","layoutUtil","LegendView","WH","XY","ScrollableLegendView","newlineDisabled","_currentIndex","_containerGroup","getContentGroup","_controllerGroup","_showController","resetInner","removeClipPath","__rectSize","renderInner","legendModel","selector","selectorPosition","me","controllerGroup","pageIconSize","createPageButton","pageTextStyleModel","iconIdx","pageDataIndexName","icon","createIcon","getOrient","_pageGo","font","layoutInner","isFirstRender","selectorGroup","getSelectorGroup","orientIdx","wh","xy","hw","yx","selectorButtonGap","selectorRect","selectorPos","processMaxSize","mainRect","_layoutContentAndController","contentGroup","containerGroup","contentRect","controllerRect","showController","contentPos","containerPos","controllerPos","pageButtonGap","pageButtonPosition","clipShape","setClipPath","Rect","invisible","pageInfo","_getPageInfo","pageIndex","contentPosition","_updatePageInfoView","to","scrollDataIndex","legendId","canJump","childOfName","cursor","pageText","pageFormatter","current","total","pageCount","containerRectSize","targetItemIndex","_findTargetItemIndex","targetItem","itemCount","pCount","pagePrevDataIndex","pageNextDataIndex","targetItemInfo","getItemInfo","s","winStartItemInfo","winEndItemInfo","currItemInfo","intersect","itemRect","__legendDataIndex","itemInfo","winStart","targetDataIndex","defaultIndex","idx","legendDataIdx","ParallelAxis","axisIndex","Line","vec2","curveUtil","EffectLine","lineData","seriesScope","createLine","_updateEffectSymbol","effectLineProto","effectModel","symbolType","symbol","_symbolType","setColor","_symbolScale","_updateEffectAnimation","period","loop","constantSpeed","delayExpr","isDelayFunc","ignore","updateAnimationPoints","getLineLength","_period","_loop","stopAnimation","delay","__t","animator","animate","when","during","updateSymbolPosition","done","dist","__p1","__cp1","__p2","updateData","cp1","t","lastPos","quadraticAt","quadraticDerivativeAt","tx","ty","rotation","atan2","PI","__lastT","scaleY","updateLayout","visualSolution","throttleUtil","BrushTargetManager","STATE_LIST","DISPATCH_METHOD","DISPATCH_FLAG","PRIORITY_BRUSH","PRIORITY","VISUAL","BRUSH","layoutCovers","brushModel","brushTargetManager","setInputRanges","areas","throttleType","throttleDelay","brushSelected","doDispatch","fn","createOrUpdate","isDisposed","checkInRange","selectorsByBrushType","rangeInfoList","area","brushType","selectors","getSelectorsByBrushType","brushSelector","sels","selectorsByElementType","isFunction","bSelector","sel","brushModelNotControll","seriesIndex","seriesIndices","indexOf","bindSelector","selFn","elType","setBrushOption","brushOption","brushIndex","thisBrushSelected","brushId","brushName","brushLink","linkedSeriesMap","selectedDataIndexForLink","rangeInfoBySeries","hasBrushExists","defaults","boundingRectBuilders","visualMappings","createVisualMappings","linkOthers","brushed","stepAParallel","hasAxisBrushed","stepAOthers","controlSeries","eachSeries","seriesBrushSelected","seriesName","applyVisual","lineX","noop","lineY","getBoundingRectFromMinMax","range","polygon","minMax","rg","visualSymbol","layoutPoints","symbolUtil","normalizeSymbolSize","symbolSize","extendChartView","render","polar","oldData","_data","symbolPath","symbolRotate","updateSymbols","oldPoints","newPoints","symbolGroup","__dimIdx","getInitialPoints","pt","cx","cy","polyline","Polyline","initProps","newIdx","oldIdx","getItemGraphicEl","execute","eachItemGraphicEl","useStyle","getLineStyle","stroke","areaStyleModel","hoverAreaStyleModel","polygonIgnore","isEmpty","parentModel","hoverPolygonIgnore","getAreaStyle","itemHoverStyle","labelHoverModel","labelDimIndex","autoColor","isRectText","highDownOnUpdate","fromState","toState","axisDefault","Model","axisModelCommonMixin","valueAxisDefault","valueAxis","defaultsShow","RadarModel","extendComponentModel","boundaryGap","axisLine","axisTick","axisLabel","nameTextStyle","showName","nameFormatter","nameGap","triggerEvent","indicatorModels","indicatorOpt","iNameTextStyle","nameLocation","indName","getIndicatorModels","radius","startAngle","splitLine","splitArea","indicator","coordsOffsetMap","mapType","coordFix","cp","BaseBarSeries","getProgressive","getProgressiveThreshold","progressiveThreshold","largeThreshold","clip","roundCap","showBackground","backgroundStyle","borderType","borderRadius","MarkerModel","tooltip","distance","ChartView","Path","_createClipPathFromCoordSys","createClipPath","NORMAL_ITEM_STYLE_PATH","EMPHASIS_ITEM_STYLE_PATH","SKIP_PROPS","CandlestickView","_updateDrawMode","_isLargeDraw","_renderLarge","_renderNormal","incrementalPrepareRender","_clear","incrementalRender","_incrementalRenderLarge","_incrementalRenderNormal","isLargeDraw","needsClip","clipArea","getArea","hasValue","isNormalBoxClipped","createNormalBox","setBoxCommon","createLarge","clipPath","incremental","NormalBoxPath","buildPath","ctx","__simpleBox","lineTo","closePath","transInit","clipped","normalItemStyleModel","LargeBoxPath","__sign","largePoints","elP","elN","setLargeStyle","suffix","updateDataSelected","hasAnimation","getName","selectedOffset","toggleItemSelected","midAngle","endAngle","cos","sin","PiePiece","sector","Sector","piePieceProto","firstCreate","labelText","sectorShape","animationTypeUpdate","getShallow","setShape","animationType","r","r0","lineJoin","cursorStyle","withAnimation","_updateLabel","isAnimationEnabled","hoverIgnore","animateTo","normalIgnore","labelLayout","targetLineShape","linePoints","targetTextStyle","origin","labelLineModel","labelLineHoverModel","inside","verticalAlign","PieView","sectorGroup","_sectorGroup","onSectorClick","piePiece","_createClipPath","clockwise","initOrUpdate","containPoint","sqrt","_multipleGraphEdgeHelper","simpleLayout","simpleLayoutEdge","eachEdge","curveness","retrieve3","angle","mathCos","mathSin","modelUtil","ComponentModel","selectableMixin","geoCreator","GeoModel","layoutMode","getFilledRegions","_optionModelMap","reduce","optionModelMap","regionOpt","updateSelectedMap","aspectScale","boundingCoords","scaleLimit","getFormattedLabel","status","formatter","setZoom","setCenter","features","register","ctor","_format","encodeHTML","layoutInfo","leaves","leavesModel","nodeData","wrapMethod","isExpand","treeDepth","expandAndCollapse","expandTreeDepth","initialTreeDepth","getRawDataItem","collapsed","formatTooltip","realRoot","edgeShape","edgeForkPosition","roam","nodeScaleRatio","animationDuration","animationDurationUpdate","Component","parallelAxisIndex","axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandRate","axisExpandDebounce","axisExpandSlideTriggerArea","axisExpandTriggerOn","parallelAxisDefault","mergeOption","_initDimensions","setAxisExpand","axisModels","filter","dependentModels","parallelAxis","axisModel","hierNode","defaultAncestor","ancestor","prelim","modifier","change","shift","thread","pop","n","firstWalk","separation","siblings","subtreeW","executeShifts","midPoint","apportion","secondWalk","nodeX","defaultSeparation","radialCoordinate","radialCoor","getViewRect","getLayoutRect","getBoxLayoutParams","subtreeV","nodeOutRight","nodeInRight","nodeOutLeft","nodeInLeft","sumOutRight","sumInRight","sumOutLeft","sumInLeft","nextRight","nextLeft","moveSubtree","nextAncestor","wl","wr","eventTool","throttle","DataZoomView","numberUtil","sliderMove","linearMap","asc","DEFAULT_LOCATION_EDGE_GAP","DEFAULT_FRAME_BORDER_WIDTH","DEFAULT_FILLER_SIZE","HORIZONTAL","VERTICAL","LABEL_GAP","SHOW_DATA_SHADOW_SERIES_TYPE","SliderZoomView","_displayables","_orient","_range","_handleEnds","_size","_handleWidth","_handleHeight","_location","_dragging","_dataShadowInfo","dataZoomModel","_buildView","_updateView","clear","_resetLocation","_resetInterval","barGroup","_renderBackground","_renderHandle","_renderDataShadow","_positionGroup","coordRect","_findCoordRect","ecSize","positionInfo","layoutParams","getLayoutParams","layoutRect","location","targetAxisModel","getFirstTargetAxisModel","otherAxisInverse","_getViewExtent","_onClickPanelClick","info","_prepareDataShadowInfo","series","otherDim","getShadowDim","otherDataExtent","getDataExtent","otherOffset","lastIsEmpty","otherShadowExtent","thisShadowExtent","areaPoints","step","thisCoord","stride","otherCoord","showDataShadow","eachTargetAxis","dimNames","seriesModels","getAxisProxy","getTargetSeriesModels","thisAxis","axis","getOtherDim","getOtherAxis","thisDim","displaybles","handles","handleLabels","filler","draggable","getCursor","drift","_onDragMove","ondragstart","_showDataInfo","ondragend","_onDragEnd","onmouseover","onmouseout","textPosition","lineWidth","handleIndex","bRect","handleColor","getPercentRange","viewExtent","_updateInterval","delta","handleEnds","viewExtend","minMaxSpan","findRepresentativeAxisProxy","getMinMaxSpan","percentExtent","minSpan","maxSpan","lastRange","nonRealtime","handleInterval","handle","handleHeight","_updateDataInfo","labelTexts","axisProxy","getAxisModel","dataInterval","calculateDataWindow","end","valueWindow","getDataValueWindow","_formatLabel","orderedHandleEnds","setLabel","barTransform","getTransform","direction","transformDirection","textPoint","applyTransform","labelFormatter","labelPrecision","getPixelPrecision","valueStr","getLabel","showOrHide","stop","getLocalTransform","vertex","changed","realtime","_dispatchZoomAction","localPoint","transformCoordToLocal","offsetX","offsetY","dataZoomId","getTargetCoordInfo","coordInfoList","getRect","Graph","CoordinateSystem","edges","directed","addNode","linkNameList","validEdges","linkCount","link","addEdge","coordSysCtor","concat","dimensionNames","edgeData","datas","datasAttr","IndicatorAxis","IntervalScale","_axisHelper","getScaleExtent","niceScaleExtent","LogScale","Radar","radarModel","_indicatorAxes","indicatorModel","indicatorAxis","resize","getIndicatorAxes","indicatorIndex","coordToPoint","dataToCoord","pointToData","closestAxis","radian","minRadianDiff","closestAxisIdx","coordToData","viewWidth","viewHeight","viewSize","setExtent","indicatorAxes","radarSeries","unionExtentFromData","increaseInterval","exp10","pow","floor","log","LN10","f","rawExtent","fixedMin","getMin","fixedMax","getMax","getInterval","setInterval","isFinite","nicedSplitNumber","getTicks","ceil","create","radarList","radar","categoryFilter","categoryVisual","edgeVisual","circularLayout","forceLayout","createView","registerProcessor","POST_CHART_LAYOUT","registerCoordinateSystem","dataFormatMixin","addCommas","fillLabel","mergeDefaultAndTheme","_mergeOption","hostSeries","__hostSeries","newOpt","createdBySelf","modelPropName","markerOpt","markerModel","multipleSeries","dataType","renderMode","getRawValue","formattedValue","html","newLine","setData","getSortedIndices","valueArr","mapArray","isAscending","textX","textY","labelPosition","isLabelInside","x1","y1","x2","y2","labelLineLen","viewRect","sizeExtent","getLinePoints","y0","x0","nextIdx","_poly","DataDiffer","_layers","layerSeries","getLayerSeries","keyGetter","dataDiffer","_layersSeries","newLayersGroups","process","oldLayersGroups","points0","points1","textLayout","margin","layerGroup","stackedOnPoints","stackedOnSmooth","smoothConstraint","createGridClipShape","setTextStyle","rectEl","PI2","RADIAN","minAngle","validDataCount","unitRadian","roseType","stillShowZeroSum","restAngle","valueSumLargerThanMinAngle","currentAngle","dir","paletteScope","categoriesData","getCategoriesData","categoryNameIdxMap","getColorFromPalette","itemStyleList","category","hasKeys","supplementVisualOption","mappings","createMappings","visualData","isValidType","__hidden","__alphaForOpacity","Creater","replaceVisualOption","scope","visualTypesMap","eachItem","valueOrIndex","rawDataItem","visualMap","prepareVisualTypes","incrementalApplyVisual","getTargetSeries","seriesModelMap","modifyOutputEnd","overallReset","filterData","percentRange","getDataPercentWindow","valueRange","setCalculatedRange","startValue","endValue","extendComponentView","borderColorQuery","globalColors","eachRawSeriesByType","defaulColor","legendSymbol","isSeriesFiltered","useEncodeDefaulter","getMarkerPosition","clampData","offsetIndex","barMinHeight","barMinAngle","progressiveChunkMode","DEFAULT_BAR_BOUND","ContinuousModel","calculable","hoverLinkDataSize","hoverLinkOnHandle","_resetRange","resetItemSize","auto","getSelected","oVals","getColorStopValues","iVals","iIdx","oIdx","iLen","oLen","first","stopsLen","stopValues","getAxis","markerHelper","LineDraw","MarkerView","_dataStackHelper","getStackedDimension","markLineTransform","mlModel","mlType","xAxis","yAxis","axisInfo","getAxisInfo","valueDataDim","numCalculate","valueIndex","baseIndex","mlFrom","mlTo","dataTransform","isInifinity","ifMarkLineHasOnlyDim","dimIndex","fromCoord","toCoord","otherDimIndex","containData","markLineFilter","dataFilter","updateSingleMarkerEndLayout","isFrom","xPx","yPx","getValues","dims","toGlobalCoord","markLineModel","mlData","fromData","__from","toData","__to","markerGroupMap","renderSeries","seriesData","lineDrawMap","lineDraw","createList","line","updateDataVisualAndLayout","lineColor","dataModel","__keep","coordDimsInfos","coordDim","getDimensionInfo","optData","dimValueGetter","hasItemOption","sankeyLayout","sankeyVisual","_echarts","_export","DATAS","MAIN_DATA","main","linkAll","TRANSFERABLE_METHODS","transferInjection","cloneShallowInjection","CHANGABLE_METHODS","changeInjection","assert","isMainData","linkSingle","cloneShallow","getLinkedData","Region","k","roams","InsideZoomView","coordSysName","allCoordIds","coordInfo","generateCoordId","coordModel","getRange","eventName","roamHandlers","coordId","containsPoint","unregister","directionInfo","getDirectionInfo","percentPoint","signal","pixelStart","pixelLength","pixel","pan","makeMover","oldX","oldY","newX","newY","scrollMove","scrollDelta","getPercentDelta","percentDelta","grid","oldPoint","newPoint","radiusExtent","getRadiusAxis","angleExtent","getAngleAxis","pointToCoord","singleAxis","isNumeric","_helper","BAR_BORDER_WIDTH_QUERY","LAYOUT_ATTRS","posDesc","pathForLineWidth","Circle","BarView","cartesian","coordSysRect","coordSysExtent","categoryDim","symbolMeta","getSymbolMeta","bar","createBar","updateCommon","newIndex","oldIndex","pictorialShapeStr","getShapeStr","__pictorialShapeStr","updateBar","__pictorialSymbolMeta","removeBar","animationModel","symbolRepeat","symbolClip","symbolPosition","symbolPatternSize","symbolRepeatDirection","hoverAnimation","prepareBarLength","prepareSymbolSize","boundingLength","pxSign","prepareLineWidth","symbolScale","symbolOffset","prepareLayoutInfo","valueLineWidth","repeatCutLength","output","symbolBoundingData","zeroPx","pxSignIdx","symbolBoundingExtent","convertToCoordOnAxis","parse","categorySize","getLineScale","unitLength","pathLen","absBoundingLength","symbolMargin","hasEndGap","lastIndexOf","uLenWithMargin","endFix","repeatSpecified","repeatTimes","toIntTimes","mDiff","sizeFix","pathPosition","bundlePosition","barRectShape","createPath","createOrUpdateRepeatSymbols","isUpdate","bundle","__pictorialBundle","unit","eachPath","__pictorialAnimationIndex","__pictorialRepeatTimes","updateAttr","makeTarget","updateHoverAnimation","onMouseOver","onMouseOut","createOrUpdateSingleSymbol","mainPath","__pictorialMainPath","createOrUpdateBarRect","rectShape","barRect","__pictorialBarRect","createOrUpdateClip","__pictorialClipPath","getAnimationDelayParams","labelRect","pathes","immediateAttrs","animationAttrs","normalStyle","barRectHoverStyle","barPositionOutside","times","roundedTimes","SunburstPiece","windowOpen","ROOT_TO_NODE_ACTION","SunburstView","that","virtualRoot","newRoot","getViewRoot","renderLabelForZeroData","newChildren","oldChildren","_oldChildren","dualTravel","renderRollUp","highlight","highlightPolicy","onEmphasis","unhighlight","virtualPiece","onNormal","getKey","processNode","newId","oldId","newNode","oldNode","doRenderNode","removeNode","viewRoot","_onclickEvent","_rootToNode","_initEvents","targetFound","nodeClick","linkTarget","targetNode","treeRoot","matrix","TimelineView","axisHelper","_axis","_viewRect","_timer","_currentPointer","_mainGroup","_labelGroup","timelineModel","_layout","mainGroup","_createGroup","labelGroup","_createAxis","_renderAxisLabel","_position","_doPlayStop","_clearTimer","labelPosOpt","horizontal","vertical","playPosition","prevBtnPosition","nextBtnPosition","axisExtent","labelAlignMap","labelBaselineMap","rotationMap","mainLength","controlModel","showControl","controlSize","controlGap","sizePlusGap","labelRotation","controlPosition","showPlayBtn","showPrevBtn","showNextBtn","xLeft","xRight","labelAlign","labelBaseline","m","rotateOriginX","rotateOriginY","translate","rotate","viewBound","getBound","mainBound","labelBound","mainPosition","labelsPosition","mainBoundIdx","toBound","setOrigin","targetGroup","fromPos","boundIdx","createScaleByModel","niceTicks","newGroup","_renderAxisLine","lineCap","_renderAxisTick","ticks","tickCoord","hoverStyleModel","symbolOpt","_changeTimeline","giveSymbol","labels","getViewLabels","labelItem","tickValue","normalLabelModel","formattedLabel","_renderControl","playState","getPlayState","makeBtn","iconPath","willRotate","rectHover","btn","makeIcon","_handlePlayClick","_renderCurrentPointer","currentIndex","getCurrentIndex","pointerModel","onCreate","pointer","_handlePointerDrag","_handlePointerDragend","pointerMoveTo","onUpdate","nextState","_pointerChangeTimeline","mousePos","_toAxisCoord","_findNearestTick","handleFrame","trans","axisCoord","d","nextIndex","objPath","opts","noAnimation","dragging","DataZoomModel","SliderZoomModel","dataBackground","areaStyle","fillerColor","handleIcon","handleSize","handleStyle","showDetail","zoomLock","textStyle","setCurrentIndex","isIndexMax","setPlayState","resetOption","generateCoord","preventIncremental","coordSysCreator","blurSize","pointSize","maxOpacity","minOpacity","AxisProxy","eachAxisDim","xAxisIndex","yAxisIndex","filterMode","minValueSpan","maxValueSpan","rangeMode","_dataIntervalByAxis","_dataInfo","_axisProxies","_autoThrottle","_rangePropMode","inputRawOption","retrieveRawOption","settledOption","doInit","_setDefaultThrottle","updateRangeUse","_resetTarget","_giveAxisProxies","axisProxies","__dzAxisProxy","autoMode","_judgeAutoMode","axisIndexName","normalizeToArray","_autoSetAxisIndex","_autoSetOrient","hasIndexSpecified","autoAxisIndex","singleAxisModel","singleAxisIndex","axisIndices","_isSeriesHasAllAxesTypeOf","axisId","queryComponents","is","seriesAxisIndex","globalOption","animation","firstAxisModel","setRawRange","getValueRange","axisDimName","hostedBy","getRangePropMode","rangePropMode","rangeModeInOption","percentSpecified","valueSpecified","LinearGradient","mathMin","mathMax","HOVER_LINK_SIZE","HOVER_LINK_OUT","ContinuousView","_shapes","_dataInterval","_useHandle","_hoverLinkDataIndices","_hovering","_renderBar","dataRangeText","_enableHoverLinkToSeries","_enableHoverLinkFromSeries","endsIndex","_applyTransform","shapes","useHandle","_createBarGroup","outOfRange","createPolygon","inRange","_dragHandle","textRect","getTextRect","textSize","handleThumbs","handleLabelPoints","_createHandle","_createIndicator","onDrift","onDragEnd","handleThumb","createHandlePoints","handleLabel","handleLabelPoint","indicatorLabel","indicatorLabelPoint","isEnd","_clearHoverLinkToSeries","useHoverLinkOnHandle","_doHoverLinkToSeries","forSketch","outOfRangeHandleEnds","inRangeHandleEnds","visualInRange","_createBarVisual","visualOutOfRange","barColor","barPoints","_updateHandle","forceState","convertOpacityToAlpha","colorStops","_makeColorGradient","symbolSizes","_createBarPoints","handlesColor","sampleNumber","currValue","_showIndicator","cursorValue","textValue","rangeSymbol","halfHoverLinkSize","createIndicatorPoints","_hoverLinkFromSeriesMouseOver","_hideIndicator","_clearHoverLinkFromSeries","cursorPos","hoverOnBar","getHalfHoverLinkSize","hoverRange","oldBatch","newBatch","resultBatches","compressBatches","_dispatchHighDown","getSeriesByIndex","isTargetSeries","element","global","isRange","extentMax","_core","PathProxy","textContain","textHelper","CMD","arrayJoin","NONE","mathRound","degree","EPSILON","round4","isAroundZero","pathHasFill","isText","pathHasStroke","textStroke","setTransform","svgEl","setAttribute","attrXLink","setAttributeNS","bindStyle","fillOpacity","strokeWidth","textStrokeWidth","strokeScale","strokeOpacity","lineDash","lineDashOffset","miterLimit","pathDataToString","str","dataLength","cmd","cmdStr","nData","M","L","Q","C","A","rx","ry","theta","dTheta","psi","dThetaPositive","isCircle","unifiedTheta","Z","R","w","h","svgPath","__svgEl","createPathProxy","__dirtyPath","beginPath","pathStr","svgTextDrawRectText","removeOldTextNode","svgImage","image","HTMLImageElement","src","dw","dh","__imageSrc","svgText","_tmpTextHostRect","_tmpTextBoxPos","_tmpTextTransform","TEXT_ALIGN_TO_ANCHRO","middle","hostRect","elTransform","needTransformTextByHostEl","transformText","__dirty","normalizeTextStyle","needDrawText","copy","textSvgEl","__textSvgEl","textSvgElStyle","DEFAULT_FONT","computedFont","__computedFont","__styleFont","textPadding","textLineHeight","contentBlock","__textCotentBlock","__dirtyText","parsePlainText","truncate","outerHeight","getBoxPosition","baseX","baseY","setTextTransform","boxY","adjustTextY","getTextXForPadding","canCacheByTextString","tspanList","__tspanList","tspanOriginLen","__canCacheByTextString","__text","updateTextLocation","textLines","lines","nTextLines","tspan","singleLineText","__zrText","createTextNode","identity","textRotation","textOrigin","drawRectText","brush","TooltipRichContent","findPointFromSeries","globalListener","axisPointerViewHelper","getTooltipRenderMode","proxyRect","tooltipContent","_renderMode","getDom","_newLine","_tooltipContent","_tooltipModel","_ecModel","_api","_lastDataByCoordSys","_alwaysShowContent","_initGlobalListener","_keepShow","triggerOn","currTrigger","_tryShow","_hide","_lastX","_lastY","_refreshUpdateTimeout","manuallyShowTip","makeDispatchAction","_ticket","dataByCoordSys","tooltipOption","_manuallyAxisShowTip","pointInfo","findHover","manuallyHideTip","coordSysAxesInfo","buildTooltipModel","_showAxisTooltip","_showSeriesItemTooltip","_showComponentItemTooltip","_showOrMove","_showTimout","globalTooltipModel","singleDefaultHTML","singleParamsList","singleTooltipModel","markers","itemCoordSys","dataByAxis","axisValue","seriesDefaultHTML","valueLabel","getValueLabel","seriesDataIndices","valueLabelOpt","idxItem","dataIndexInside","dataParams","getAxisRawValue","axisValueLabel","seriesTooltip","newMarkers","firstLine","positionExpr","_updateContentNotChangedOnAxis","_updatePosition","_showTooltipContent","random","tooltipTrigger","defaultHtml","asyncTicket","tooltipOpt","subTooltipModel","formatTpl","cbTicket","contentSize","vAlign","calcTooltipPosition","refixTooltipPosition","isCenterAlign","confineTooltipPosition","lastCoordSys","contentNotChanged","lastItemCoordSys","indexCoordSys","lastDataByAxis","thisItemCoordSys","thisDataByAxis","lastItem","indexAxis","thisItem","lastIndices","newIndices","lastIdxItem","newIdxItem","modelCascade","resultModel","isInstance","gapH","gapV","domWidth","domHeight","rectWidth","rectHeight","Single","singles","single","actionTypes","handleRootToNode","types","targetInfo","retrieveTargetInfo","originViewRoot","aboveViewRoot","resetViewRoot","HIGHLIGHT_ACTION","handleHighlight","UNHIGHLIGHT_ACTION","handleUnhighlight","_createPolyline","polylineProto","_updateCommonStl","hoverLineStyle","legendSelectActionHandler","selectedMap","isToggleSelect","legendData","isItemSelected","rangeInfo","getRangeInfo","cellWidth","getCellWidth","cellHeight","getCellHeight","weeks","dayCount","allDay","clamp","SymbolDraw","EffectSymbol","pointsLayout","_symbolDraw","effectSymbolDraw","_updateGroupTransform","getRoamTransform","HeatmapLayer","getIsInPiecewiseRange","dataSpan","lastIndex","getIsInContinuousRange","isGeoCoordSys","visualMapOfThisSeries","targetSeries","_incrementalDisplayable","_renderOnCartesianAndCalendar","_renderOnGeo","itemStyleQuery","hoverItemStyleQuery","labelQuery","hoverLabelQuery","hoverStl","coordSysType","dataDims","dataToRect","contentShape","rawValue","useHoverLayer","inRangeVisuals","targetVisuals","outOfRangeVisuals","hmLayer","_hmLayer","lng","lat","isInRange","getNormalizer","getColorMapper","img","Image","canvas","curveTool","_graphHelper","getSymbolSize","v1","v2","v3","v2DistSquare","distSquare","mathAbs","intersectCurveCircle","curvePoints","p0","radiusSquare","_t","nextDiff","tmp0","quadraticSubdivide","pts","pts2","fromSymbol","toSymbol","__original","originalPoints","sub","normalize","scaleAndAdd","_roamHelper","updateCenterAndZoom","componentModel","seriesGroup","Eventful","interactionMutex","pointerChecker","_opt","mousedownHandler","mousedown","mousemoveHandler","mousemove","mouseupHandler","mouseup","mousewheelHandler","mousewheel","pinchHandler","pinch","controlType","disable","zoomOnMouseWheel","moveOnMouseMove","moveOnMouseWheel","preventDefaultMouseMove","isDragging","isPinching","_pinching","isMiddleOrRightButtonOnMouseUpDown","_x","_y","isAvailableBehavior","gestureEvent","isTaken","shouldZoom","shouldMove","wheelDelta","absWheelDeltaDelta","factor","checkPointerAndTrigger","absDelta","pinchScale","pinchX","pinchY","behaviorToCheck","contollerEvent","settings","setting","ZImage","ZText","MARK_UNUSED","MARK_USED","Definable","zrId","svgRoot","tagNames","markLabel","domName","_zrId","_svgRoot","_tagNames","_markLabel","_domName","nextId","getDefs","isForceCreating","defs","getElementsByTagName","insertBefore","firstChild","dom","addDom","removeDom","getDoms","doms","tagName","tags","markAllUnused","markUsed","removeUnused","getSvgProxy","displayable","getTextSvgElement","getSvgElement","_vm","_h","$createElement","_c","_self","staticClass","class","active","$event","stopPropagation","screen","_v","ref","className","attrs","staticRenderFns","String","default","chart","mounted","beforeDestroy","methods","initChart","console","setOption","dataset","SingleAxis","_init","axisPointerEnabled","onBand","_adjustAxis","_updateAxisTransform","coordBase","extentSum","toLocalCoord","getAxes","getTooltipAxes","baseAxes","parseGeoJson","makeInner","fixNanhai","fixTextCoord","fixGeoCoord","fixDiaoyuIsland","inner","mapRecord","nameProperty","parsed","specialAreas","geoJSON","Error","message","regionName","specialArea","regionRect","union","positiveBorderColorQuery","negativeBorderColorQuery","positiveColorQuery","negativeColorQuery","performRawSeries","colorP","getColor","colorN","borderColorP","getBorderColor","borderColorN","isLargeRender","FunnelPiece","funnelPieceProto","opacityAccessPath","FunnelView","funnelPiece","GaugeSeries","title","offsetCenter","detail","dataSelectableMixin","_dataProvider","retrieveRawAttr","MapSeries","needsDrawMap","dataNameMap","selectTargetList","toAppendNames","geoSource","getMapType","appendValues","seriesNames","otherIndex","originalData","getTooltipPosition","showLegendSymbol","dataRangeHoverLink","NodeHighlightPolicy","DESCENDANT","ANCESTOR","SELF","DEFAULT_SECTOR_Z","DEFAULT_TEXT_Z","SunburstPieceProto","_seriesModel","getNodeColor","fillDefaultColor","stateStyle","isNodeHighlighted","onHighlight","onDownplay","normalModel","labelState","getLabelAttr","labelMinAngle","labelPadding","rotateType","stateAttr","visualMetaList","getRootId","activeNode","policy","lang","featureManager","saveAsImageLang","toolbox","saveAsImage","SaveAsImage","connectedBackgroundColor","excludeComponents","pixelRatio","unusable","proto","isSvg","getType","url","getConnectedDataURL","MouseEvent","browser","ie","navigator","msSaveOrOpenBlob","bstr","atob","u8arr","Uint8Array","charCodeAt","blob","Blob","tab","open","write","$a","download","href","evt","view","bubbles","cancelable","dispatchEvent","AXIS_DIMS","COORDS","isCoordSupported","coordType","createNameEach","capitalNames","capitalFirst","capitalAttrs","nameObj","capital","createLinkedNodesFinder","forEachNode","forEachEdgeType","edgeIdGetter","sourceNode","existsLink","records","edgeType","absorb","processSingleNode","isNodeAbsorded","isLinked","hasLink","edgeId","themeRiverLayout","baseY0","timeDim","layerPoints","singleLayer","base","computeBaseline","baseLine","ky","layerIndex","layerNum","pointNum","sums","temp","l","getNodeGlobalScale","groupScale","groupZoom","roamZoom","nodeScale","colorList","ATTR","dataZoomInfo","store","giveStore","theDataZoomId","theCoordId","record","dataZoomInfos","cleanStore","createController","controllerParams","mergeControllerParams","newRecord","prefix","typePriority","oneType","validPayloadTypes","targetNodeId","getPathToRoot","viewPath","wrapTreePathInfo","treePathInfo","nodeDataIndex","_forceHelper","_simpleLayoutHelper","_circularLayoutHelper","graphSeries","preservedPoints","forceModel","initLayout","nodeDataExtent","edgeDataExtent","repulsion","edgeLength","rep","fixed","getEdgeByIndex","edgeModel","ignoreForceLayout","forceInstance","gravity","friction","oldStep","getNodeByIndex","stopped","nodeOpacityPath","hoverNodeOpacityPath","lineOpacityPath","hoverLineOpacityPath","getItemOpacity","opacityPath","fadeOutItem","opacityRatio","getGraphicEl","downplay","fadeInItem","SankeyShape","extendShape","cpx1","cpy1","cpx2","cpy2","bezierCurveTo","_focusAdjacencyDisabled","sankeyView","curve","lineStyleModel","curvature","n1Layout","node1Model","dragX1","dragY1","n2Layout","node2Model","dragX2","dragY2","edgeLayout","sy","dragX","dragY","localX","localY","focusNodeAdjHandler","unfocusNodeAdjHandler","_dispatchUnfocus","edgeDataIndex","_unfocusDelayTimer","focusNodeAdjacency","focusNodeAdj","outEdges","inEdges","unfocusNodeAdjacency","mapDataStorage","geoJSONLoader","geoSVGLoader","loaders","svg","mapRecords","retrieveMap","singleSource","makeInvoker","hostKey","results","_listComponent","makeBackground","_contentGroup","_backgroundEl","_selectorGroup","_isFirstRender","viewportSize","legendDrawnMap","selectMode","excludeSeriesId","eachRawSeries","getSeriesByName","legendSymbolType","_createItem","dispatchSelectAction","dispatchHighlightAction","dispatchDownplayAction","provider","containName","newline","_createSelector","createSelectorButton","selectorItem","emphasisLabelModel","inactiveColor","inactiveBorderColor","symbolKeepAspect","legendModelItemStyle","itemIcon","legendGlobalTooltipModel","setSymbolStyle","legendSymbolCenter","hitRect","formatterParams","legendIndex","dataName","storage","getDisplayList","CATEGORY_DEFAULT_VISUAL_INDEX","_normalizeData","normalizers","visualHandler","visualHandlers","_doMap","normalizeVisualRange","preprocessForPiecewise","preprocessForSpecifiedCategory","normalized","makeApplyVisual","isNormalized","doMapCategory","returnRGBArray","fastLerp","parsedVisual","stringify","linear","piecewise","getSpecifiedVisual","doMapFixed","colorHue","makePartialColorVisualHandler","modifyHSL","colorSaturation","colorLightness","colorAlpha","modifyAlpha","makeDoMap","liftZ","getter","setter","symbolCfg","doMapToArray","hasSpecialVisual","originIndex","categoryMap","visualArr","setVisualToOption","doNotNeedPair","applyValue","sourceExtent","littleThan","addVisualHandler","eachVisual","mapVisual","isPrimary","newVisual","newVal","hasVisual","type1","type2","dependsOn","visualType1","visualType2","findClosestWhenOutside","possibleI","pieceValue","updatePossible","newAbs","DEFAULT_SMOOTH","ParallelView","_dataGroup","dataGroup","makeSeriesScope","newDataIndex","addEl","updateElCommon","oldDataIndex","createLinePoints","taskParams","isEmptyValue","elStyle","inactive","ignoreSize","subtext","subtarget","fontWeight","subtextStyle","titleModel","subtextStyleModel","disableBox","subText","subTextEl","sublink","groupRect","layoutOption","alignStyle","createParallelIfNeeded","mergeAxisOptionFromParallel","parallel","hasParallelSeries","seriesOpt","axes","axisOption","parallelOption","isPolyline","isLarge","lineCoords","segCount","totalCoordsCount","getLineCoordsCount","getLineCoords","timelineOpt","timeline","compatibleEC2","ec2Types","transferItem","controlStyle","itemStyleEmphasis","labelNormal","normal","excludeLabelAttr","legendModels","findComponents","categoryNames","filterSelf","mapSymbolLayout","mapDataStatistic","backwardCompat","createDataSelectAction","PROCESSOR","STATISTIC","effectType","showEffectOn","rippleEffect","barItemStyle","_throttle","Sausage","_eventPos","getClipArea","coordSysClipArea","expandWidth","coordinateSystemType","isHorizontalOrRadial","drawBackground","backgroundModel","barBorderRadius","bgEls","oldBgEls","_backgroundEls","createBackground","bgLayout","bgEl","createBackgroundEl","getBarItemStyle","isClipped","elementCreator","updateStyle","createBackgroundShape","removeRect","removeSector","bgGroup","_removeBackground","cartesian2d","coordSysBoundingRect","signWidth","signHeight","signR","animateProperty","animateTarget","isRadial","ShapeClass","fixedLineWidth","getLineWidth","signX","signY","isZeroOnPolar","isPolar","labelPositionOutside","rawLayout","Number","MAX_VALUE","LargePath","startPoint","__startPoint","baseDimIdx","__baseDimIdx","largeDataIndices","backgroundStartPoint","__largeDataIndices","__barWidth","setLargeBackgroundStyle","largePathUpdateDataIndex","largePath","largePathFindDataIndex","valueDimIdx","barWidthHalf","startValueVal","pointerBaseVal","pointerValueVal","baseLowerBound","baseUpperBound","ii","barBaseVal","barValueVal","coordLayout","ElementClz","registerSubTypeDefaulter","EffectPolyline","_lastFrame","_lastFramePercent","effectPolylineProto","_points","accLenArr","_offsets","_length","offsets","lastFrame","frame","lerp","geoCoordMap","AxisBuilder","axisBuilderAttrs","_buildAxes","_buildSplitLineAndArea","axisBuilders","axisBuilder","labelDirection","tickDirection","nameDirection","getGroup","splitLineModel","splitAreaModel","showSplitLine","showSplitArea","splitLineColors","splitAreaColors","splitLines","splitAreas","ticksRadius","getTicksCoords","colorIndex","getColorIndex","Ring","realSplitNumber","axesTicksPoints","ticksCoords","prevPoints","mergePath","areaOrLine","areaOrLineColorList","themeRiverVisual","vector","v2ApplyTransform","TransformDummy","_roamTransformable","_center","_zoom","setBoundingRect","setViewRect","rawTransform","centerCoord","_updateCenterAndZoom","getDefaultCenter","rawRect","getCenter","rawTransformMatrix","defaultCenter","roamTransformable","_rawTransform","invTransform","invert","SymbolClz","_layoutHelper","bbox","TreeShape","parentPoint","childPoints","forkPosition","childLen","firstChildPos","lastChildPos","forkDim","tmpPoint","_oldTree","_updateViewCoordSys","useNameLabel","fadeIn","symbolNeedsDraw","updateNode","symbolEl","_nodeScaleRatio","_updateNodeAndLinkScale","fromPoints","oldMin","_min","oldMax","_max","viewCoordSys","_viewCoordSys","_getNodeGlobalScale","invScale","getTreeNodeStyle","symbolInnerColor","sourceSymbolEl","sourceLayout","sourceOldLayout","rawX","__radialOldRawX","rawY","__radialOldRawY","targetLayout","__radialRawX","__radialRawY","getSymbolPath","rad","isLeft","rootLayout","labelRotateRadian","drawEdge","__edge","BezierCurve","getEdgeShape","childLayout","fadeOut","keepLabel","sourceEdge","radialCoor1","radialCoor2","radialCoor3","radialCoor4","eachAfter","eachBefore","newSnapshot","batchItem","snapshot","head","targetList","_targetList","_selectTargetMap","targetMap","select","unSelect","toggleSelected","rawData","idxMap","concatArray","mergeAll","Uint32Arr","Uint32Array","Float64Arr","Float64Array","compatEc2","itemOpt","coords","fromName","toName","LinesSeries","_processFlatCoordsArray","_flatCoords","flatCoords","_flatCoordsOffset","flatCoordsOffset","appendData","_getCoordsFromItemModel","startOffset","coordsOffsetAndLenStorage","coordsStorage","coordsCursor","offsetCursor","dataCount","buffer","effect","trailLength","autoPositionValues","targetValue","visualCluster","visualObj","defaultColor","controllerVisuals","visualMapping","positionElement","_clazz","enableClassCheck","generateNodeKey","_directed","_nodesMap","_edgesMap","graphProto","Node","hostGraph","Edge","isDirected","nodesMap","rawIdx","edgesMap","getEdge","breadthFirstTraverse","startNode","__visited","queue","currentNode","otherNode","inDegree","outDegree","createGraphDataProxyMixin","hostName","LineGroup","_ctor","lineDrawProto","doAdd","lineNeedsDraw","doUpdate","oldLineData","newLineData","itemEl","isEffectObject","animators","isPointNaN","isPersistent","_lineData","incrementalPrepareUpdate","_seriesScope","incrementalUpdate","updateIncrementalAndHover","isGroup","_clearIncremental","_incremental","clearDisplaybles","_mapDraw","dataViewLang","dataView","BLOCK_SPLITER","ITEM_SPLITER","groupSeries","seriesGroupByCategoryAxis","otherSeries","meta","categoryAxis","other","assembleSeriesWithCategoryAxis","tables","valueAxisDim","headers","columns","getCategories","items","assembleOtherSeries","vals","argLen","getContentFromModel","trim","isTSVFormat","block","itemSplitRegex","RegExp","parseTSVContents","tsv","tsvLines","header","parseListContents","hasName","parseContents","blockMetaList","blocks","blockMeta","axisKey","DataView","_dom","tryMergeDataOption","newData","original","newValIsObject","shouldDeleteName","readOnly","optionToContent","contentToOption","textColor","textareaColor","textareaBorderColor","buttonColor","buttonTextColor","viewMain","textarea","htmlOrDom","getOption","isDom","buttonContainer","buttonStyle","closeButton","refreshButton","addEventListener","newSeriesOptList","actionInfos","actionInfo","polarOptArr","polarNotRadar","polarOpt","polarIndex","radarIndex","layoutBox","boxLayoutParams","aspect","viewList","positions","bbWidth","bbHeight","BrushController","history","dataZoomLang","dataZoom","DATA_ZOOM_ID_BASE","DataZoom","_brushController","_onBrush","mount","_isZoomActive","back","brushStyle","featureModel","updateZoomBtnStatus","updateBackBtnStatus","handlers","unmount","nextActive","dataZoomSelectActive","retrieveAxisSetting","setIconStatus","zoomActive","include","setPanels","makePanelOpts","xAxisDeclared","yAxisDeclared","enableBrush","updateCovers","matchOutputRanges","coordRange","setBatch","findDataZoom","found","dzModel","dataZoomOpts","toolboxOpt","feature","dataZoomOpt","addForAxis","axisName","axisIndicesName","givenAxisIndices","forEachComponent","axisOpt","$fromToolbox","ComponentView","coordSysLists","save","coordIndex","getCoordSysModel","markArea","LinePath","SYMBOL_CATEGORIES","makeSymbolTypeKey","symbolCategory","__specifiedRotation","setLinePoints","targetShape","updateSymbolAndLabelBeforeLineUpdate","lineGroup","symbolFrom","symbolTo","pointAt","toPos","specifiedRotation","tangent","tangentAt","__labelDistance","distanceX","distanceY","halfPercent","__position","__verticalAlign","__textAlign","_createLine","lineProto","beforeUpdate","lineLabelOriginalOpacity","visualOpacity","defaultLabelColor","baseText","rawVal","normalText","emphasisText","labelStyle","fontStyle","fontFamily","linePath","graphicUtil","_nonShapeGraphicElements","graphicOption","elements","GraphicModel","parentId","_elOptionsToUpdate","newList","existList","flattenedList","_flatten","mappingResult","mappingToExists","makeIdAndName","elOptionsToUpdate","resultItem","newElOption","setKeyInfoToNewElOption","mergeNewElOptionToExist","setLayoutInfoToExist","splice","$action","optionList","parentOption","useElOptionsToUpdate","els","createEl","targetElParent","elOption","elMap","graphicType","Clz","getShapeClass","__ecGraphicId","removeEl","existEl","existElParent","removeKey","getCleanedElOption","LOCATION_PARAMS","isSetLoc","isSet","prop","existElOption","exist","keyInfo","newElParentOption","newElOptCopy","mergeLayoutParam","copyLayoutParams","existItem","hv","setEventData","graphicModel","_elMap","_lastGraphicModel","_updateElements","_relocate","rootGroup","elOptionStyle","textBaseline","elOptionCleaned","__ecGraphicWidthOption","__ecGraphicHeightOption","elOptions","apiWidth","apiHeight","parentEl","isParentRoot","__ecGraphicWidth","__ecGraphicHeight","containerInfo","boundingMode","bounding","straightLineProto","bezierCurveProto","isLine","_buildPathLine","_buildPathCurve","_pointAtLine","_pointAtCurve","_tangentAtCurve","groupData","nodeWidth","nodeGap","computeNodeValues","filteredNodes","iterations","nodeAlign","layoutSankey","computeNodeBreadths","computeNodeDepths","computeEdgeDepths","value1","getEdgeValue","value2","nodeRawValue","remainEdges","indegreeArr","zeroIndegrees","nextTargetNode","kx","maxNodeDepth","isItemDepth","edgeIdx","indexEdge","nodeIndex","maxDepth","adjustNodeWithNodeAlign","scaleNodeBreadths","isNodeDepth","nextSourceNode","remainNodes","nodeHeight","skNodeHeight","moveSinksRight","nodeDepth","nodesByBreadth","prepareNodesByBreadth","initializeNodeDepth","resolveCollisions","alpha","relaxRightToLeft","relaxLeftToRight","keyAttr","groupResult","buckets","minKy","nodeDy","edgeDy","nodeDyAttr","weightedTarget","centerTarget","nodeY","weightedSource","centerSource","array","markerRich","startId","endId","substr","textWidth","textHeight","textBorderRadius","textBackgroundColor","textOffset","rich","updateMarkerLayout","mpData","markPointModel","mpModel","symbolDrawMap","symbolDraw","isFnSymbol","isFnSymbolSize","isFnSymbolRotate","dataOpt","sizeCalculable","CalendarModel","cellSize","dayLabel","firstDay","monthLabel","yearLabel","extraOpt","inputPositionParams","mergeAndNormalizeLayoutParams","raw","hvIdx","parallelAxisModel","setActiveIntervals","intervals","Parallel","coordSysList","isNameSpecified","langSelector","legend","defaultSelectorOption","all","LegendModel","_updateSelector","_updateData","hasSelected","potentialData","availableNames","isPotential","getAllNames","_availableNames","allSelect","inverseSelect","selectorLabel","selectorItemGap","isValidPoint","getValueMissingPoint","firstPoint","find","svgURI","createElementNS","createGraphFromNodeEdge","GraphSeries","_categoriesData","fillDataTextStyle","links","_updateCategoriesData","categoriesModels","_categoriesModels","categoryIdx","categoryModel","edgeLabelModel","fakeSeriesModel","emphasisEdgeLabelModel","emphasisFakeSeriesModel","edgeGetParent","parsePath","customizeGetParent","getEdgeData","sourceName","targetName","circular","rotateLabel","force","layoutAnimation","edgeSymbol","edgeSymbolSize","edgeLabel","markerModelKey","dataColor","radarLayout","colorUtil","markAreaTransform","maModel","lt","rb","ltCoord","rbCoord","markAreaFilter","getSingleMarkerEndPoint","dimPermutations","areaData","markAreaModel","areaGroupMap","polygonGroup","allClipped","xValue","yValue","__data","ToolboxModel","featureOpt","featureName","Feature","showTitle","iconStyle","_zrender","registerPainter","Painter","filterSeries","ITEM_STYLE_NORMAL","travelTree","designatedVisual","viewRootAncestors","nodeModel","nodeLayout","isInView","thisNodeColor","nodeItemStyleModel","visuals","buildVisuals","borderColorSaturation","calculateColor","calculateBorderColor","buildVisualMapping","childVisual","designatedVisualItemStyle","visualName","getValueVisualDefine","rangeVisual","getRangeVisual","visualMin","visualMax","colorMappingBy","__drColorMappingBy","childVisuals","mappingType","mapIdToIndex","isDimensionStacked","hasXOrY","parseFloat","hasXAndY","markerTypeCalculatorWithExtent","otherDataDim","targetDataDim","otherCoordIndex","targetCoordIndex","coordArr","stacked","calcDataDim","getCalculationInfo","indicesOfNearest","coordArrValue","getPrecision","markerTypeCalculator","average","baseDataDim","radiusAxis","angleAxis","dataDimToCoordDim","dataDim","dimItem","getMedian","_treeHelper","preventUsingHoverLayer","_viewRoot","clipWindow","squareRatio","leafDepth","drillDownIcon","zoomToNodeRatio","breadcrumb","emptyItemWidth","ellipsis","upperLabel","gapWidth","visualDimension","visibleMin","childrenVisibleMin","levels","completeTreeValue","designatedVisualModel","setDefault","levelModels","levelDefine","levelModel","setLayoutInfo","idIndexMap","_idIndexMap","_idIndexMapCount","childValue","thisValue","globalColorList","hasColorDefine","modelColor","level0","mapLocation","_barGrid","largeLayout","LAYOUT","PROGRESSIVE_LAYOUT","_symbolRadiansHalf","basedOn","_layoutNodesBasedOn","x12","y12","unitAngle","radianHalf","sumRadian","symbolRadianHalf","asin","halfRemainRadian","markLine","adjustEdge","FOCUS_ADJACENCY","UNFOCUS_ADJACENCY","opct","_lineDraw","_firstRender","graphView","groupNewProp","_layoutTimeout","_startForceLayoutIteration","warmUp","_layouting","setFixed","setUnfixed","setDraggable","circularRotateLabel","labelRotate","modifyLabelStyle","adjacentEdge","seiresModelMap","__paletteScope","dataAll","filteredIdx","singleDataColor","singleDataBorderColor","MAX_SAFE_INTEGER","retrieveValue","PATH_BORDER_WIDTH","PATH_GAP_WIDTH","PATH_UPPER_LABEL_SHOW","PATH_UPPER_LABEL_HEIGHT","ecWidth","ecHeight","seriesOption","containerWidth","containerHeight","payloadType","rootRect","viewAbovePath","rootSize","estimateRootSize","viewRootLayout","squarify","upperHeight","calculateRootPosition","prunning","hideChildren","thisLayout","halfGapWidth","upperLabelHeight","getUpperLabelHeight","layoutOffset","layoutOffsetUpper","totalArea","initChildren","rowFixedLength","best","row","score","worst","orderBy","overLeafDepth","statistic","filterByThreshold","isLeafRoot","orderedChildren","deletePoint","ratio","areaMax","areaMin","squareArea","flush","idx0WhenH","idx1WhenH","rowOtherLength","rowLen","wh1","remain","modWH","wh0","currNode","defaultSize","viewArea","currNodeValue","defaultPosition","targetCenter","clipRect","nodeInViewAbovePath","isAboveViewRoot","childClipRect","linkedNodesFinder","effectedModels","ClippathManager","updateDom","__clipPaths","clipPaths","clipPathEl","getAttribute","svgProxy","mul","pathEl","cloneNode","_textDom","RadarSeries","generateCoordCount","values","disabled","IncrementalDisplayable","lineContain","quadraticContain","LargeLineShape","segs","quadraticCurveTo","findDataIndex","containStroke","LargeLineDraw","largeLineProto","lineEl","_setCommon","addDisplayable","__startIndex","isIncremental","funnelLayout","take","resourceKey","userKey","getStore","release","uKey","HIGH_DOWN_PROP","RECORD_VERSION_PROP","mapModel","_renderSymbols","originalDataIndex","circle","Z2_EMPHASIS_LIFT","fullData","mainSeries","fullIndex","highDownRecord","recordVersion","onRegionHighDown","enterRegionHighDown","toHighOrDown","extendFrom","__mapOriginalZ2","PointerPath","parsePosition","formatLabel","GaugeView","posInfo","_renderMain","axisLineModel","angleRangeSpan","prevEndAngle","axisLineWidth","showAxis","tmp","_renderTicks","_renderPointer","_renderTitle","_renderDetail","minVal","maxVal","tickModel","subSplitNumber","splitLineLen","tickLen","subStep","splitLineStyle","tickLineStyle","unitX","unitY","tickLine","valueExtent","forceRich","detailModel","linesLayout","linesVisual","_vector","colorTool","RectText","Displayable","Gradient","vmlCore","comma","imageTransformPrefix","Z2","ZLEVEL_BASE","Z_BASE","initRootElStyle","coordsize","coordorigin","encodeHtmlAttribute","rgb2Str","g","append","getZIndex","setColorAndOpacity","colorArr","getColorAndAlpha","updateFillNode","zrEl","gradientType","focus","expansion","cs1","cs2","colorAndAlphaList","colors","colorAndAlpha","color1","color2","opacity1","opacity2","focusposition","updateStrokeNode","dashstyle","updateFillAndStroke","vmlEl","isFill","createNode","nPoint","xi","yi","x3","y3","sx","brushVML","vmlRoot","_vmlEl","needTransform","strokeEl","det","weight","toStatic","zIndex","removeRectText","onRemove","onAdd","appendRectText","isImage","toUpperCase","ow","oh","_imageSrc","_imageWidth","_imageHeight","imageRuntimeStyle","runtimeStyle","oldRuntimeWidth","oldRuntimeHeight","sw","sWidth","sh","sHeight","hasCrop","doc","vmlElStyle","hasRotation","scaleX","p3","maxX","maxY","transformFilter","imageEl","_imageEl","cropEl","_cropEl","imageELStyle","tmpImage","onload","overflow","cropElStyle","filterStr","textMeasureEl","DEFAULT_STYLE_NORMAL","fontStyleCache","fontStyleCacheCount","MAX_FONT_CACHE_SIZE","fontEl","getFontStyle","fontString","variant","fontVariant","family","$override","ex","offsetWidth","tmpRect","fromTextEl","parseRichText","tokens","textLine","calculateTextPosition","adjustTextX","textPathEl","skewEl","textVmlEl","_textVmlEl","nextSibling","textpathok","textVmlElStyle","string","polygonContain","linePolygonIntersect","getLineSelectors","xyIndex","inLineRange","layoutRange","showContent","displayMode","confine","showDelay","hideDelay","extraCssText","axisPointer","animationEasingUpdate","crossStyle","percentPrecision","VISUAL_PRIORITY","COMPONENT","resultVisual","createOnAllSeries","resetDefines","visualMeta","concreteDim","dimInfo","opacityMap","itemOpacity","LargeSymbolDraw","_updateSymbolDraw","_getClipShape","_finished","_dimensionHelper","getDimensionTypeByAxis","DATA_NAME_INDEX","ThemeRiverSeries","fixData","rawDataLength","timeValueKeys","layData","dataList","timeValue","nameList","dimensionsDefine","itemName","lenCount","indexArr","index1","index2","getAxisTooltipData","nestestValue","minDist","nearestIdx","theValue","htmlName","htmlValue","_updateLineDraw","getLayer","_lastZlevel","configLayer","motionBlur","_showEffect","lastFrameAlpha","_clearLayer","progressiveRender","hasEffect","_hasEffet","_isPolyline","DEFAULT_TOOLBOX_BTNS","isNew","brushComponents","brushComponentSpecifiedBtns","brushOpt","tbs","toolboxFeature","toolboxBrush","brushTypes","removeDuplicate","arr","flag","brushHelper","elementList","AxisView","fromAxisAreaSelect","oldAxisGroup","_axisGroup","coordSysModel","areaSelectStyle","getAreaSelectStyle","areaWidth","axisLayout","getAxisLayout","builderOpt","strokeContainThreshold","_refreshBrushController","groupTransition","extentLen","extra","enableGlobalPan","panelId","makeRectPanelClipPath","isTargetByCursor","makeRectIsTargetByCursor","getLinearBrushOtherExtent","makeLinearBrushOtherExtent","removeOnClick","getCoverInfoList","coverInfoList","coverInfo","parallelAxisId","activeIntervals","logError","GradientManager","addWithoutUpdate","svgElement","fillOrStroke","gradient","hex","splitList","Breadcrumb","animationUtil","makeStyleMapper","DRAG_THRESHOLD","PATH_LABEL_NOAMAL","PATH_LABEL_EMPHASIS","PATH_UPPERLABEL_NORMAL","PATH_UPPERLABEL_EMPHASIS","Z_BG","Z_CONTENT","getItemStyleEmphasis","getItemStyleNormal","_storage","createStorage","_breadcrumb","_state","models","thisStorage","reRoot","rootNodeGroup","nodeGroup","_giveContainerGroup","renderResult","_doRender","renderFinally","_doAnimation","_resetController","_renderBreadcrumb","thisTree","oldTree","lastsForAnimation","oldStorage","willInvisibleEls","renderNode","willDeleteEls","clearStorage","thisViewChildren","oldViewChildren","parentGroup","sameTree","thisNode","storageName","delEls","__tmWillDelete","easing","animationWrap","createWrap","__tmNodeWidth","__tmNodeHeight","targetX","targetY","old","fadein","_onPan","_onZoom","_clearController","mouseX","mouseY","findTarget","_zoomToNode","onSelect","background","thisWidth","thisHeight","thisInvisible","thisRawIndex","oldRawIndex","isParent","itemStyleNormalModel","itemStyleEmphasisModel","giveGraphic","bg","isHighDownDispatcher","setAsHighDownDispatcher","renderContent","useUpperLabel","processInvisible","visualBorderColor","emphasisBorderColor","emphasisStyle","upperLabelWidth","prepareText","setElementHoverStyle","contentWidth","contentHeight","upperLabelRect","labelProp","addDrillDownIcon","outerWidth","minChar","iconChar","Ctor","lasts","prepareAnimationWhenHasOld","calculateZ","__tmDepth","__tmStorageName","prepareAnimationWhenNoOld","lastCfg","parentOldX","parentOldY","parentOldBg","zInLevel","zb","excludes","getBorderLineDash","setAreas","adjustSingleSide","viewLeft","viewTop","farthestX","shiftDown","shiftUp","changeX","isDownList","lastDeltaX","labelAlignTo","deltaY","length2","len2","deltaX","lastY","upList","downList","avoidOverlap","labelLayoutList","leftList","rightList","leftmostX","rightmostX","isPositionCenter","targetTextWidth","isAlignToEdge","realTextWidth","labelDistance","labelMargin","bleedMargin","truncateText","hasLabelRotate","minShowLabelRadian","labelLineLen2","ShadowManager","hasShadow","textShadowBlur","textShadowOffsetX","textShadowOffsetY","_shadowDom","_shadowDomId","domChild","blur","textShadowColor","stdDx","stdDy","stdDeviation","singleAxisHelper","_axisSplitHelper","rectCoordAxisBuildSplitArea","rectCoordAxisHandleRemove","selfBuilderAttrs","SingleAxisView","axisPointerClass","_splitLine","isBlank","lineColors","gridRect","lineCount","getLineDash","_splitArea","_whiskerBoxCommon","seriesModelMixin","CandlestickSeries","defaultValueDimensions","defaultTooltip","color0","borderColor0","animationUpdate","COORD_CONVERTS","INCLUDE_FINDER_MAIN_TYPES","targetInfoList","_targetInfoList","foundCpts","parseFinder","targetInfoBuilders","builder","formatMinMax","includeMainTypes","setOutputRanges","coordRanges","coordConvert","__rangeOffset","diffProcessor","xyMinMax","findTargetInfo","coordSyses","rangeOffset","getScales","getDefaultBrushType","getPanelRect","defaultBrushType","areaPanelId","targetInfoMatchers","xAxisModels","yAxisModels","gridModels","gridModelMap","xAxesHas","yAxesHas","gridModel","cartesians","getCartesians","panelRectBuilder","geoModels","xAxisModel","yAxisModel","axisConvert","rangeOrCoordRange","xminymin","xmaxymax","axisNameIndex","axisDiffProcessor","refer","scales","xyMinMaxCurr","xyMinMaxOrigin","sizeCurr","sizeOrigin","setNodePosition","pieLayout","dr","rCenter","unitStartX","unitStartY","unitEndX","unitEndY","lessThanCircle","arc","_visualEncoding","updateController","updateView","modelId","$from","getDataWithEncodedVisual","dataWithEncodedVisual","IRRELEVANT_EXCLUDES","targetCoordSysModel","getComponentByElement","topTarget","axisModelCreator","AxisModel","getAxisType","EFFECT_RIPPLE_NUMBER","updateRipplePath","rippleGroup","effectCfg","rippleEffectColor","ripplePath","getScale","effectSymbolProto","stopEffectAnimation","startEffectAnimation","effectOffset","rippleScale","animateStyle","updateEffectAnimation","oldEffectCfg","_effectCfg","DIFFICULT_PROPS","propName","_parseSVG","parseSVG","makeViewBoxTransform","originRoot","buildGraphic","field","rootMap","originRootHostKey","svgXML","ignoreViewBox","ignoreRootClip","svgWidth","svgHeight","viewBoxRect","viewBoxTransform","elRoot","plain","BOOST_SIZE_THRESHOLD","LargeSymbolPath","symbolProxy","softClipShape","symbolProxyShape","getContext","canBoost","afterBrush","fillRect","restoreTransform","largeSymbolProto","startIndex","endIndex","byteOffset","extrudeShadow","_traversalHelper","sep","commonLayout","coorX","coorY","finalCoor","rootDepth","renderRollupNode","rPerLevel","rStart","rEnd","siblingAngle","isAsc","sortOrder","realIndex","paramsSet","reals","fakeValue","layoutInput","rParam","highlightKey","_dimName","_axisIndex","_valueWindow","_percentWindow","_dataExtent","_minMaxSpan","_dataZoomModel","calculateDataExtent","seriesExtent","getApproximateExtent","fixExtentByAxis","isCategoryAxis","axisDataLen","setAxisModel","isRestore","percentWindow","useOrigin","setRange","setMinMaxSpan","percentSpan","valueSpan","getOtherAxisModel","otherAxisDim","coordSysIndexName","foundOtherAxisModel","isCartesian","otherAxisModel","hasPropModeValue","boundPercent","boundValue","spans","restrictSet","fromWindow","toWindow","fromExtent","toExtent","toValue","dataWindow","restore","leftOut","rightOut","thisHasValue","thisLeftOut","thisRightOut","isInWindow","selectRange","setApproximateExtent","GRADIENT_LEVELS","Heatmap","createCanvas","_gradientPixels","colorFunc","_getBrush","gradientInRange","_getGradient","gradientOutOfRange","globalAlpha","drawImage","imageData","getImageData","pixels","pixelLen","diffOpacity","gradientOffset","putImageData","brushCanvas","_brushCanvas","clearRect","gradientPixels","pixelsSingleState","Uint8ClampedArray","processedMapType","mapSymbolOffsets","subMapSeries","SankeySeries","localPosition","rawDataOpt","layoutIterations","makeAction","PROXIMATE_ONE_DAY","Calendar","calendarModel","getDimensionsInfo","_rangeInfo","_sw","_sh","getFirstDayOfWeek","_firstDayOfWeek","getDateInfo","date","parseDate","getFullYear","getMonth","getDate","day","getDay","getTime","formatedDate","getNextNDay","Date","setDate","_lineWidth","_getRangeInfo","_initRangeOption","whNames","cellNumbers","cellSizeSpecified","whGlobal","calendarRect","dayInfo","week","nthWeek","pointToDate","tl","tr","br","bl","nthX","nthY","_getDateByWeeksAndDay","test","setMonth","reversed","startDateNum","endDateNum","dateNum","fweek","lweek","nthDay","calendarList","calendar","calendarSeries","legendFilter","SERIES_FILTER","magicTypeLang","magicType","INNER_STACK_KEYWORD","MagicType","stack","getIcons","availableIcons","icons","seriesOptGenreator","markPoint","isStack","radioTypes","newTitle","generateNewSeriesTypes","newSeriesOpt","getAxesByScale","radio","tiled","currentType","doCreateNode","urn","win","vmlInited","namespaces","zrvml","initVML","styleSheets","createStyleSheet","addRule","PictorialBarSeries","barGap","sunburstLayout","previousZoom","fixX","fixY","mathFloor","mathCeil","_axesMap","_axesLayout","restrict","layoutAxisWithoutExpand","layoutLength","axisCount","axisNameAvailableWidth","axisLabelShow","layoutAxisWithExpand","nameTruncateMaxWidth","axisCollapseWidth","winInnerIndices","axisExpandWindow0Pos","axisExpandWindow","_updateAxesFromSeries","_makeLayoutInfo","axisBase","layoutBase","pixelDimIndex","pAxis","pLayout","axisLength","_layoutAxes","winSize","layoutExtent","positionTable","rotationTable","axisCoordToPoint","axesMap","dataDimensions","hasActiveSet","lenj","getActiveState","getSlidedAxisExpandWindow","behavior","pointCoord","triggerArea","useJump","treemapVisual","treemapLayout","listComponentHelper","toolboxModel","featureOpts","_features","featureNames","_featureNames","processFeature","titleText","__title","makeFont","needPutOnTop","topOffset","oldName","isUserFeatureName","createIconPaths","iconName","iconPaths","iconStatus","iconStyleModel","iconStyleEmphasisModel","titles","iconStr","defaultTextPosition","util","parseInt10","checkParentAvailable","insertAfter","prevSibling","prepend","SVGPainter","_opts","svgDom","bgRoot","gradientManager","clipPathManager","shadowManager","viewport","_svgDom","_backgroundRoot","_viewport","_visibleList","createMethodNotSupport","getSvgDom","getSvgRoot","viewportRoot","refresh","_paintList","setBackgroundColor","_backgroundNode","bgNode","visibleList","listLen","newVisibleList","prevSvgElement","textSvgElement","_getDefs","_getSize","_width","_height","viewportStyle","whIdx","cwh","plt","prb","toDataURL","encodeURIComponent","outerHTML","BoxplotView","constDim","updateNormalBoxData","BoxPath","updateMethod","TimelineModel","SliderTimelineModel","checkpointStyle","playIcon","stopIcon","nextIcon","prevIcon","colorQuery","opacityQuery","restoreLang","Restore","_labelHelper","getDefaultLabel","getLayoutOnAxis","prepareCartesian2d","prepareGeo","prepareSingleAxis","preparePolar","prepareCalendar","CACHED_LABEL_STYLE_PROPERTIES","ITEM_STYLE_NORMAL_PATH","ITEM_STYLE_EMPHASIS_PATH","LABEL_NORMAL","LABEL_EMPHASIS","GROUP_DIFF_PREFIX","prepareCustoms","pathRect","pathData","getPathData","makePath","__customPathData","__customImagePath","__customText","__customGraphicType","updateEl","animatableModel","isRoot","transitionProps","targetStyle","prepareStyleTransition","targetOpacity","styleEmphasis","oldElStyle","makeRenderItem","customSeries","prepareResult","currDataIndexInside","currItemModel","currLabelNormalModel","currLabelEmphasisModel","currVisualColor","userAPI","getDevicePixelRatio","barLayout","currentSeriesIndices","userParams","dataInsideLength","encode","wrapEncodeDef","currDirty","actionType","updateCache","applyExtraBefore","applyExtraAfter","getCurrentSeriesIndices","encodeDef","isExtraCoord","coordDimIndex","doCreateOrUpdate","simplyRemove","elOptionType","elOptionShape","hasOwnPathData","hasOwn","mergeChildren","$mergeChildren","byName","diffChildrenByName","notMerge","diffGroupChildren","processAddUpdate","processRemove","childOption","dummyModel","stylePropName","host","useTransform","setIncrementalAndHoverLayer","filterForExposedEvent","eventType","targetEl","packedEvent","elementName","makeSeriesEncodeForAxisCoordSys","_baseAxisDim","ordinalMeta","addOrdinal","xAxisType","yAxisType","getOrdinalMeta","baseAxisDimIndex","baseAxisDim","baseAxisType","otherAxisType","newOptionData","newItem","otherDims","dimsDef","doneCallback","elExistsMap","fixPosition","VMLPainter","vmlViewport","_vmlRoot","_vmlViewport","oldDelFromStorage","delFromStorage","oldAddToStorage","addToStorage","_firstPaint","__alreadyNotVisible","beforeBrush","_getWidth","_getHeight","vmlViewportStyle","paddingLeft","paddingRight","paddingTop","paddingBottom","seriesItem","replacableOptionKeys","dataBound","contentColor","getTargetSeriesIndices","optionSeriesIndex","isMinMax","optDim","listDimensions","isCalculationCoord","completeSingle","defa","completeInactive","stateExist","stateAbsent","optExist","optAbsent","completeController","symbolExists","symbolSizeExists","dataToRadius","dataToAngle","setScrollDataIndex","groupSeriesByAxis","groupItem","calculateBase","layoutSingleSeries","boxOffsetList","boxWidthList","axisList","seriesCount","boundList","maxDataCount","boxWidthBound","availableWidth","boxGap","boxWidth","halfWidth","median","end1","end2","end4","end5","layEndLine","endCenter","autoPlay","rewind","playInterval","_names","_initData","dataArr","idxArr","getDataItemValue","dimType","axisPosition","rectBound","positionMap","directionMap","labelInside","MONTH_TEXT","EN","CN","WEEK_TEXT","_tlpoints","_blpoints","_firstDayOfMonth","_firstDayPoints","rangeData","_renderDayRect","_renderLines","_renderYearText","_renderMonthText","_renderWeekText","itemRectStyleModel","addPoints","_getLinePointsOfOneWeek","_drawSplitline","_getEdgesPoints","rs","poyline","tmpD","_formatterLabel","formatTplSimple","_yearTextPositionControl","aligns","xc","yc","posPoints","yearText","_monthTextPositionControl","isCenter","termPoints","firstDayPoints","yyyy","yy","MM","monthText","_weekTextPositionControl","isStart","firstDayOfWeek","weekText","dataEach","resizeGeo","leftTop","rightBottom","boxLayoutOption","useCenterAndSize","setGeoCoords","geoList","mapModelGroupBySeries","nameMapList","singleMapSeries","originRegionArr","regionsArr","pp","initialFriction","v12","nLen","repFact","extentSpan","handleSpan","originalDistSign","getSpanSign","extentMinSpan","realExtent","currDistSign","span","treeLayout","BaseAxisPointer","viewHelper","SingleAxisPointer","makeElOption","axisPointerModel","otherExtent","getGlobalExtent","getPointDimIndex","pixelValue","axisPointerType","buildElStyle","pointerOption","pointerShapeBuilder","graphicKey","buildCartesianSingleLabelElOption","getHandleTransform","getTransformedPosition","updateHandleTransform","currPosition","cursorOtherValue","cursorPoint","makeLineShape","shadow","makeRectShape","registerAxisPointerClass","ScrollableLegendModel","pageButtonItemGap","pageIcons","pageIconColor","pageIconInactiveColor","pageTextStyle","parallelPreprocessor","CLICK_THRESHOLD","_handlers","_throttledDispatchExpand","_dispatchExpand","checkTrigger","_mouseDownPoint","mouseDownPoint","debounceNextCall","DEFAULT_OUT_OF_BRUSH_COLOR","BrushModel","brushMode","transformable","inBrush","outOfBrush","generateBrushOption","normalizeRect","localPoints","clipPointsByRect","specifiedXYIndex","brushWidth","targetModel","localCursorPoint","TEXT_PADDING","ITEM_GAP","ARRAY_LENGTH","makeItemPoints","tail","packEventData","itemNode","componentSubType","selfType","normalStyleModel","layoutParam","totalWidth","renderList","_prepare","_renderContent","lastX","availableSize","getAvailableSize","dataStatistics","statisticType","mapKey","seriesGroups","hostGeoModel","seriesList","getPercentWithPrecision","PieSeries","_createSelectableList","valueList","minShowLabelAngle","hoverOffset","avoidLabelOverlap","alignTo","distanceToLabelLine","boxplotVisual","boxplotLayout","mathPow","COVER_Z","UNSELECT_THRESHOLD","MIN_RESIZE_LINE_WIDTH","MUTEX_RESOURCE_KEY","DIRECTION_MAP","CURSOR_MAP","ne","nw","se","DEFAULT_BRUSH_OPT","baseUID","_brushType","_brushOption","_panels","_track","_covers","_creatingCover","_creatingPanel","_enableGlobalPan","_uid","pointerHandlers","doEnableBrush","mountHandlers","doDisableBrush","unmountHandlers","createCover","cover","coverRenderers","__brushOption","updateZ","endCreating","creatingCover","coverRenderer","getCoverRenderer","updateCoverShape","updateCoverAfterCreation","getPanelByPoint","panel","panels","_transform","pn","getPanelByCover","clearCovers","covers","originalLength","shouldShowCover","track","getTrackEnds","createBaseRectCover","doDrift","edgeNames","makeStyle","updateBaseRect","localRange","xa","ya","x2a","y2a","widtha","heighta","updateRectShape","mainEl","globalDir","getGlobalDirection","pointsToRect","clipByPanel","formatRectRange","localDirection","inverseMap","driftRect","toRectRange","fromRectRange","rectRange","localDelta","toLocalDelta","namePart","ind","driftPolygon","localD","localZero","xmin","ymin","xmax","ymax","resetCursor","isOutsideZrArea","currPanel","setCursorStyle","preventDefault","rawE","mainShapeContain","updateCoverByMouse","eventParams","thisBrushOption","determineBrushType","coverBrushOption","getCreatingRange","panelOpts","eachCover","brushOptionList","tmpIdPrefix","oldCovers","newCovers","oldGetKey","addOrUpdate","newBrushOption","handleDragEnd","getLineRenderer","localTrack","BoxplotSeries","brushLang","Brush","_brushMode","keep","isBrushed","command"],"mappings":"qGAoBA,IAAIA,EAAQ,EAAQ,QAEhBC,EAAOD,EAAMC,KACbC,EAAgBF,EAAME,cAEtBC,EAAc,EAAQ,QAEtBC,EAAsB,EAAQ,QAoB9BC,EAAWF,EAAYG,OAAO,CAChCC,KAAM,kBACNC,aAAc,CAAC,YACfC,sBAAuB,kBACvBC,eAAgB,SAAUC,EAAQC,GAChC,IAAIC,EAASC,KAAKC,YAElB,OADAC,EAAuBH,EAAQC,MACxBV,EAAoBS,EAAQC,OAUrCG,2BAA4B,SAAUC,GACpC,IAAIC,EAAWL,KAAKM,iBAChBC,EAAOP,KAAKQ,UACZC,EAAU,GAMd,OALAJ,EAASK,gBAAgBH,GAAM,SAAUI,EAAgBC,GACnDR,IAAgBO,GAClBF,EAAQI,KAAKN,EAAKO,YAAYF,OAG3BH,GAETM,cAAe,CACbC,OAAQ,EAERC,EAAG,EAEHX,iBAAkB,WAClBY,cAAe,EACfC,MAAO,CACLC,MAAM,GAERC,gBAAiB,I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ACtEoqK,UAAoB,SAATpqK,EAAgC,aAAdoqK,EAA2B,SAAW,WAAaA,MAMxF77E,EAAel+C,SAAS,QAAS8jI,GACjC,IAAIr0K,EAAWq0K,EACflxK,EAAOC,QAAUpD","file":"h5/js/chunk-0bf2be82.d613ce01.js","sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar each = _util.each;\nvar createHashMap = _util.createHashMap;\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar createListFromArray = require(\"../helper/createListFromArray\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.parallel',\n dependencies: ['parallel'],\n visualColorAccessPath: 'lineStyle.color',\n getInitialData: function (option, ecModel) {\n var source = this.getSource();\n setEncodeAndDimensions(source, this);\n return createListFromArray(source, this);\n },\n\n /**\n * User can get data raw indices on 'axisAreaSelected' event received.\n *\n * @public\n * @param {string} activeState 'active' or 'inactive' or 'normal'\n * @return {Array.} Raw indices\n */\n getRawIndicesByActiveState: function (activeState) {\n var coordSys = this.coordinateSystem;\n var data = this.getData();\n var indices = [];\n coordSys.eachActiveState(data, function (theActiveState, dataIndex) {\n if (activeState === theActiveState) {\n indices.push(data.getRawIndex(dataIndex));\n }\n });\n return indices;\n },\n defaultOption: {\n zlevel: 0,\n // 一级层叠\n z: 2,\n // 二级层叠\n coordinateSystem: 'parallel',\n parallelIndex: 0,\n label: {\n show: false\n },\n inactiveOpacity: 0.05,\n activeOpacity: 1,\n lineStyle: {\n width: 1,\n opacity: 0.45,\n type: 'solid'\n },\n emphasis: {\n label: {\n show: false\n }\n },\n progressive: 500,\n smooth: false,\n // true | false | number\n animationEasing: 'linear'\n }\n});\n\nfunction setEncodeAndDimensions(source, seriesModel) {\n // The mapping of parallelAxis dimension to data dimension can\n // be specified in parallelAxis.option.dim. For example, if\n // parallelAxis.option.dim is 'dim3', it mapping to the third\n // dimension of data. But `data.encode` has higher priority.\n // Moreover, parallelModel.dimension should not be regarded as data\n // dimensions. Consider dimensions = ['dim4', 'dim2', 'dim6'];\n if (source.encodeDefine) {\n return;\n }\n\n var parallelModel = seriesModel.ecModel.getComponent('parallel', seriesModel.get('parallelIndex'));\n\n if (!parallelModel) {\n return;\n }\n\n var encodeDefine = source.encodeDefine = createHashMap();\n each(parallelModel.dimensions, function (axisDim) {\n var dataDimIndex = convertDimNameToNumber(axisDim);\n encodeDefine.set(axisDim, dataDimIndex);\n });\n}\n\nfunction convertDimNameToNumber(dimName) {\n return +dimName.replace('dim', '');\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar VisualMapView = require(\"./VisualMapView\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar layout = require(\"../../util/layout\");\n\nvar helper = require(\"./helper\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PiecewiseVisualMapView = VisualMapView.extend({\n type: 'visualMap.piecewise',\n\n /**\n * @protected\n * @override\n */\n doRender: function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var textStyleModel = visualMapModel.textStyleModel;\n var textFont = textStyleModel.getFont();\n var textFill = textStyleModel.getTextColor();\n\n var itemAlign = this._getItemAlign();\n\n var itemSize = visualMapModel.itemSize;\n\n var viewData = this._getViewData();\n\n var endsText = viewData.endsText;\n var showLabel = zrUtil.retrieve(visualMapModel.get('showLabel', true), !endsText);\n endsText && this._renderEndsText(thisGroup, endsText[0], itemSize, showLabel, itemAlign);\n zrUtil.each(viewData.viewPieceList, renderItem, this);\n endsText && this._renderEndsText(thisGroup, endsText[1], itemSize, showLabel, itemAlign);\n layout.box(visualMapModel.get('orient'), thisGroup, visualMapModel.get('itemGap'));\n this.renderBackground(thisGroup);\n this.positionGroup(thisGroup);\n\n function renderItem(item) {\n var piece = item.piece;\n var itemGroup = new graphic.Group();\n itemGroup.onclick = zrUtil.bind(this._onItemClick, this, piece);\n\n this._enableHoverLink(itemGroup, item.indexInModelPieceList);\n\n var representValue = visualMapModel.getRepresentValue(piece);\n\n this._createItemSymbol(itemGroup, representValue, [0, 0, itemSize[0], itemSize[1]]);\n\n if (showLabel) {\n var visualState = this.visualMapModel.getValueState(representValue);\n itemGroup.add(new graphic.Text({\n style: {\n x: itemAlign === 'right' ? -textGap : itemSize[0] + textGap,\n y: itemSize[1] / 2,\n text: piece.text,\n textVerticalAlign: 'middle',\n textAlign: itemAlign,\n textFont: textFont,\n textFill: textFill,\n opacity: visualState === 'outOfRange' ? 0.5 : 1\n }\n }));\n }\n\n thisGroup.add(itemGroup);\n }\n },\n\n /**\n * @private\n */\n _enableHoverLink: function (itemGroup, pieceIndex) {\n itemGroup.on('mouseover', zrUtil.bind(onHoverLink, this, 'highlight')).on('mouseout', zrUtil.bind(onHoverLink, this, 'downplay'));\n\n function onHoverLink(method) {\n var visualMapModel = this.visualMapModel;\n visualMapModel.option.hoverLink && this.api.dispatchAction({\n type: method,\n batch: helper.makeHighDownBatch(visualMapModel.findTargetDataIndices(pieceIndex), visualMapModel)\n });\n }\n },\n\n /**\n * @private\n */\n _getItemAlign: function () {\n var visualMapModel = this.visualMapModel;\n var modelOption = visualMapModel.option;\n\n if (modelOption.orient === 'vertical') {\n return helper.getItemAlign(visualMapModel, this.api, visualMapModel.itemSize);\n } else {\n // horizontal, most case left unless specifying right.\n var align = modelOption.align;\n\n if (!align || align === 'auto') {\n align = 'left';\n }\n\n return align;\n }\n },\n\n /**\n * @private\n */\n _renderEndsText: function (group, text, itemSize, showLabel, itemAlign) {\n if (!text) {\n return;\n }\n\n var itemGroup = new graphic.Group();\n var textStyleModel = this.visualMapModel.textStyleModel;\n itemGroup.add(new graphic.Text({\n style: {\n x: showLabel ? itemAlign === 'right' ? itemSize[0] : 0 : itemSize[0] / 2,\n y: itemSize[1] / 2,\n textVerticalAlign: 'middle',\n textAlign: showLabel ? itemAlign : 'center',\n text: text,\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n }));\n group.add(itemGroup);\n },\n\n /**\n * @private\n * @return {Object} {peiceList, endsText} The order is the same as screen pixel order.\n */\n _getViewData: function () {\n var visualMapModel = this.visualMapModel;\n var viewPieceList = zrUtil.map(visualMapModel.getPieceList(), function (piece, index) {\n return {\n piece: piece,\n indexInModelPieceList: index\n };\n });\n var endsText = visualMapModel.get('text'); // Consider orient and inverse.\n\n var orient = visualMapModel.get('orient');\n var inverse = visualMapModel.get('inverse'); // Order of model pieceList is always [low, ..., high]\n\n if (orient === 'horizontal' ? inverse : !inverse) {\n viewPieceList.reverse();\n } // Origin order of endsText is [high, low]\n else if (endsText) {\n endsText = endsText.slice().reverse();\n }\n\n return {\n viewPieceList: viewPieceList,\n endsText: endsText\n };\n },\n\n /**\n * @private\n */\n _createItemSymbol: function (group, representValue, shapeParam) {\n group.add(createSymbol(this.getControllerVisual(representValue, 'symbol'), shapeParam[0], shapeParam[1], shapeParam[2], shapeParam[3], this.getControllerVisual(representValue, 'color')));\n },\n\n /**\n * @private\n */\n _onItemClick: function (piece) {\n var visualMapModel = this.visualMapModel;\n var option = visualMapModel.option;\n var selected = zrUtil.clone(option.selected);\n var newKey = visualMapModel.getSelectedMapKey(piece);\n\n if (option.selectedMode === 'single') {\n selected[newKey] = true;\n zrUtil.each(selected, function (o, key) {\n selected[key] = key === newKey;\n });\n } else {\n selected[newKey] = !selected[newKey];\n }\n\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: selected\n });\n }\n});\nvar _default = PiecewiseVisualMapView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./axisPointer\");\n\nrequire(\"./tooltip/TooltipModel\");\n\nrequire(\"./tooltip/TooltipView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// FIXME Better way to pack data in graphic element\n\n/**\n * @action\n * @property {string} type\n * @property {number} seriesIndex\n * @property {number} dataIndex\n * @property {number} [x]\n * @property {number} [y]\n */\necharts.registerAction({\n type: 'showTip',\n event: 'showTip',\n update: 'tooltip:manuallyShowTip'\n}, // noop\nfunction () {});\necharts.registerAction({\n type: 'hideTip',\n event: 'hideTip',\n update: 'tooltip:manuallyHideTip'\n}, // noop\nfunction () {});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar createListSimply = require(\"../helper/createListSimply\");\n\nvar _model = require(\"../../util/model\");\n\nvar defaultEmphasis = _model.defaultEmphasis;\n\nvar _sourceHelper = require(\"../../data/helper/sourceHelper\");\n\nvar makeSeriesEncodeForNameBased = _sourceHelper.makeSeriesEncodeForNameBased;\n\nvar LegendVisualProvider = require(\"../../visual/LegendVisualProvider\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar FunnelSeries = echarts.extendSeriesModel({\n type: 'series.funnel',\n init: function (option) {\n FunnelSeries.superApply(this, 'init', arguments); // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this)); // Extend labelLine emphasis\n\n this._defaultLabelLine(option);\n },\n getInitialData: function (option, ecModel) {\n return createListSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n },\n _defaultLabelLine: function (option) {\n // Extend labelLine emphasis\n defaultEmphasis(option, 'labelLine', ['show']);\n var labelLineNormalOpt = option.labelLine;\n var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false`\n\n labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show;\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show;\n },\n // Overwrite\n getDataParams: function (dataIndex) {\n var data = this.getData();\n var params = FunnelSeries.superCall(this, 'getDataParams', dataIndex);\n var valueDim = data.mapDimension('value');\n var sum = data.getSum(valueDim); // Percent is 0 if sum is 0\n\n params.percent = !sum ? 0 : +(data.get(valueDim, dataIndex) / sum * 100).toFixed(2);\n params.$vars.push('percent');\n return params;\n },\n defaultOption: {\n zlevel: 0,\n // 一级层叠\n z: 2,\n // 二级层叠\n legendHoverLink: true,\n left: 80,\n top: 60,\n right: 80,\n bottom: 60,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n // 默认取数据最小最大值\n // min: 0,\n // max: 100,\n minSize: '0%',\n maxSize: '100%',\n sort: 'descending',\n // 'ascending', 'descending'\n orient: 'vertical',\n gap: 0,\n funnelAlign: 'center',\n label: {\n show: true,\n position: 'outer' // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n\n },\n labelLine: {\n show: true,\n length: 20,\n lineStyle: {\n // color: 各异,\n width: 1,\n type: 'solid'\n }\n },\n itemStyle: {\n // color: 各异,\n borderColor: '#fff',\n borderWidth: 1\n },\n emphasis: {\n label: {\n show: true\n }\n }\n }\n});\nvar _default = FunnelSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction dataToCoordSize(dataSize, dataItem) {\n dataItem = dataItem || [0, 0];\n return zrUtil.map([0, 1], function (dimIdx) {\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n var p1 = [];\n var p2 = [];\n p1[dimIdx] = val - halfSize;\n p2[dimIdx] = val + halfSize;\n p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];\n return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);\n }, this);\n}\n\nfunction _default(coordSys) {\n var rect = coordSys.getBoundingRect();\n return {\n coordSys: {\n type: 'geo',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n zoom: coordSys.getZoom()\n },\n api: {\n coord: function (data) {\n // do not provide \"out\" and noRoam param,\n // Compatible with this usage:\n // echarts.util.map(item.points, api.coord)\n return coordSys.dataToPoint(data);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar View = require(\"../View\");\n\nvar geoSourceManager = require(\"./geoSourceManager\");\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 * [Geo description]\n * For backward compatibility, the orginal interface:\n * `name, map, geoJson, specialAreas, nameMap` is kept.\n *\n * @param {string|Object} name\n * @param {string} map Map type\n * Specify the positioned areas by left, top, width, height\n * @param {Object.} [nameMap]\n * Specify name alias\n * @param {boolean} [invertLongitute=true]\n */\nfunction Geo(name, map, nameMap, invertLongitute) {\n View.call(this, name);\n /**\n * Map type\n * @type {string}\n */\n\n this.map = map;\n var source = geoSourceManager.load(map, nameMap);\n this._nameCoordMap = source.nameCoordMap;\n this._regionsMap = source.regionsMap;\n this._invertLongitute = invertLongitute == null ? true : invertLongitute;\n /**\n * @readOnly\n */\n\n this.regions = source.regions;\n /**\n * @type {module:zrender/src/core/BoundingRect}\n */\n\n this._rect = source.boundingRect;\n}\n\nGeo.prototype = {\n constructor: Geo,\n type: 'geo',\n\n /**\n * @param {Array.}\n * @readOnly\n */\n dimensions: ['lng', 'lat'],\n\n /**\n * If contain given lng,lat coord\n * @param {Array.}\n * @readOnly\n */\n containCoord: function (coord) {\n var regions = this.regions;\n\n for (var i = 0; i < regions.length; i++) {\n if (regions[i].contain(coord)) {\n return true;\n }\n }\n\n return false;\n },\n\n /**\n * @override\n */\n transformTo: function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var invertLongitute = this._invertLongitute;\n rect = rect.clone();\n\n if (invertLongitute) {\n // Longitute is inverted\n rect.y = -rect.y - rect.height;\n }\n\n var rawTransformable = this._rawTransformable;\n rawTransformable.transform = rect.calculateTransform(new BoundingRect(x, y, width, height));\n rawTransformable.decomposeTransform();\n\n if (invertLongitute) {\n var scale = rawTransformable.scale;\n scale[1] = -scale[1];\n }\n\n rawTransformable.updateTransform();\n\n this._updateTransform();\n },\n\n /**\n * @param {string} name\n * @return {module:echarts/coord/geo/Region}\n */\n getRegion: function (name) {\n return this._regionsMap.get(name);\n },\n getRegionByCoord: function (coord) {\n var regions = this.regions;\n\n for (var i = 0; i < regions.length; i++) {\n if (regions[i].contain(coord)) {\n return regions[i];\n }\n }\n },\n\n /**\n * Add geoCoord for indexing by name\n * @param {string} name\n * @param {Array.} geoCoord\n */\n addGeoCoord: function (name, geoCoord) {\n this._nameCoordMap.set(name, geoCoord);\n },\n\n /**\n * Get geoCoord by name\n * @param {string} name\n * @return {Array.}\n */\n getGeoCoord: function (name) {\n return this._nameCoordMap.get(name);\n },\n\n /**\n * @override\n */\n getBoundingRect: function () {\n return this._rect;\n },\n\n /**\n * @param {string|Array.} data\n * @param {boolean} noRoam\n * @param {Array.} [out]\n * @return {Array.}\n */\n dataToPoint: function (data, noRoam, out) {\n if (typeof data === 'string') {\n // Map area name to geoCoord\n data = this.getGeoCoord(data);\n }\n\n if (data) {\n return View.prototype.dataToPoint.call(this, data, noRoam, out);\n }\n },\n\n /**\n * @override\n */\n convertToPixel: zrUtil.curry(doConvert, 'dataToPoint'),\n\n /**\n * @override\n */\n convertFromPixel: zrUtil.curry(doConvert, 'pointToData')\n};\nzrUtil.mixin(Geo, View);\n\nfunction doConvert(methodName, ecModel, finder, value) {\n var geoModel = finder.geoModel;\n var seriesModel = finder.seriesModel;\n var coordSys = geoModel ? geoModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem // For map.\n || (seriesModel.getReferringComponents('geo')[0] || {}).coordinateSystem : null;\n return coordSys === this ? coordSys[methodName](value) : null;\n}\n\nvar _default = Geo;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\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 * For geo and graph.\n *\n * @param {Object} controllerHost\n * @param {module:zrender/Element} controllerHost.target\n */\nfunction updateViewOnPan(controllerHost, dx, dy) {\n var target = controllerHost.target;\n var pos = target.position;\n pos[0] += dx;\n pos[1] += dy;\n target.dirty();\n}\n/**\n * For geo and graph.\n *\n * @param {Object} controllerHost\n * @param {module:zrender/Element} controllerHost.target\n * @param {number} controllerHost.zoom\n * @param {number} controllerHost.zoomLimit like: {min: 1, max: 2}\n */\n\n\nfunction updateViewOnZoom(controllerHost, zoomDelta, zoomX, zoomY) {\n var target = controllerHost.target;\n var zoomLimit = controllerHost.zoomLimit;\n var pos = target.position;\n var scale = target.scale;\n var newZoom = controllerHost.zoom = controllerHost.zoom || 1;\n newZoom *= zoomDelta;\n\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n newZoom = Math.max(Math.min(zoomMax, newZoom), zoomMin);\n }\n\n var zoomScale = newZoom / controllerHost.zoom;\n controllerHost.zoom = newZoom; // Keep the mouse center when scaling\n\n pos[0] -= (zoomX - pos[0]) * (zoomScale - 1);\n pos[1] -= (zoomY - pos[1]) * (zoomScale - 1);\n scale[0] *= zoomScale;\n scale[1] *= zoomScale;\n target.dirty();\n}\n\nexports.updateViewOnPan = updateViewOnPan;\nexports.updateViewOnZoom = updateViewOnZoom;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar linkList = require(\"./helper/linkList\");\n\nvar List = require(\"./List\");\n\nvar createDimensions = require(\"./helper/createDimensions\");\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 * Tree data structure\n *\n * @module echarts/data/Tree\n */\n\n/**\n * @constructor module:echarts/data/Tree~TreeNode\n * @param {string} name\n * @param {module:echarts/data/Tree} hostTree\n */\nvar TreeNode = function (name, hostTree) {\n /**\n * @type {string}\n */\n this.name = name || '';\n /**\n * Depth of node\n *\n * @type {number}\n * @readOnly\n */\n\n this.depth = 0;\n /**\n * Height of the subtree rooted at this node.\n * @type {number}\n * @readOnly\n */\n\n this.height = 0;\n /**\n * @type {module:echarts/data/Tree~TreeNode}\n * @readOnly\n */\n\n this.parentNode = null;\n /**\n * Reference to list item.\n * Do not persistent dataIndex outside,\n * besause it may be changed by list.\n * If dataIndex -1,\n * this node is logical deleted (filtered) in list.\n *\n * @type {Object}\n * @readOnly\n */\n\n this.dataIndex = -1;\n /**\n * @type {Array.}\n * @readOnly\n */\n\n this.children = [];\n /**\n * @type {Array.}\n * @pubilc\n */\n\n this.viewChildren = [];\n /**\n * @type {moduel:echarts/data/Tree}\n * @readOnly\n */\n\n this.hostTree = hostTree;\n};\n\nTreeNode.prototype = {\n constructor: TreeNode,\n\n /**\n * The node is removed.\n * @return {boolean} is removed.\n */\n isRemoved: function () {\n return this.dataIndex < 0;\n },\n\n /**\n * Travel this subtree (include this node).\n * Usage:\n * node.eachNode(function () { ... }); // preorder\n * node.eachNode('preorder', function () { ... }); // preorder\n * node.eachNode('postorder', function () { ... }); // postorder\n * node.eachNode(\n * {order: 'postorder', attr: 'viewChildren'},\n * function () { ... }\n * ); // postorder\n *\n * @param {(Object|string)} options If string, means order.\n * @param {string=} options.order 'preorder' or 'postorder'\n * @param {string=} options.attr 'children' or 'viewChildren'\n * @param {Function} cb If in preorder and return false,\n * its subtree will not be visited.\n * @param {Object} [context]\n */\n eachNode: function (options, cb, context) {\n if (typeof options === 'function') {\n context = cb;\n cb = options;\n options = null;\n }\n\n options = options || {};\n\n if (zrUtil.isString(options)) {\n options = {\n order: options\n };\n }\n\n var order = options.order || 'preorder';\n var children = this[options.attr || 'children'];\n var suppressVisitSub;\n order === 'preorder' && (suppressVisitSub = cb.call(context, this));\n\n for (var i = 0; !suppressVisitSub && i < children.length; i++) {\n children[i].eachNode(options, cb, context);\n }\n\n order === 'postorder' && cb.call(context, this);\n },\n\n /**\n * Update depth and height of this subtree.\n *\n * @param {number} depth\n */\n updateDepthAndHeight: function (depth) {\n var height = 0;\n this.depth = depth;\n\n for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n child.updateDepthAndHeight(depth + 1);\n\n if (child.height > height) {\n height = child.height;\n }\n }\n\n this.height = height + 1;\n },\n\n /**\n * @param {string} id\n * @return {module:echarts/data/Tree~TreeNode}\n */\n getNodeById: function (id) {\n if (this.getId() === id) {\n return this;\n }\n\n for (var i = 0, children = this.children, len = children.length; i < len; i++) {\n var res = children[i].getNodeById(id);\n\n if (res) {\n return res;\n }\n }\n },\n\n /**\n * @param {module:echarts/data/Tree~TreeNode} node\n * @return {boolean}\n */\n contains: function (node) {\n if (node === this) {\n return true;\n }\n\n for (var i = 0, children = this.children, len = children.length; i < len; i++) {\n var res = children[i].contains(node);\n\n if (res) {\n return res;\n }\n }\n },\n\n /**\n * @param {boolean} includeSelf Default false.\n * @return {Array.} order: [root, child, grandchild, ...]\n */\n getAncestors: function (includeSelf) {\n var ancestors = [];\n var node = includeSelf ? this : this.parentNode;\n\n while (node) {\n ancestors.push(node);\n node = node.parentNode;\n }\n\n ancestors.reverse();\n return ancestors;\n },\n\n /**\n * @param {string|Array=} [dimension='value'] Default 'value'. can be 0, 1, 2, 3\n * @return {number} Value.\n */\n getValue: function (dimension) {\n var data = this.hostTree.data;\n return data.get(data.getDimension(dimension || 'value'), this.dataIndex);\n },\n\n /**\n * @param {Object} layout\n * @param {boolean=} [merge=false]\n */\n setLayout: function (layout, merge) {\n this.dataIndex >= 0 && this.hostTree.data.setItemLayout(this.dataIndex, layout, merge);\n },\n\n /**\n * @return {Object} layout\n */\n getLayout: function () {\n return this.hostTree.data.getItemLayout(this.dataIndex);\n },\n\n /**\n * @param {string} [path]\n * @return {module:echarts/model/Model}\n */\n getModel: function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n\n var hostTree = this.hostTree;\n var itemModel = hostTree.data.getItemModel(this.dataIndex);\n return itemModel.getModel(path);\n },\n\n /**\n * @example\n * setItemVisual('color', color);\n * setItemVisual({\n * 'color': color\n * });\n */\n setVisual: function (key, value) {\n this.dataIndex >= 0 && this.hostTree.data.setItemVisual(this.dataIndex, key, value);\n },\n\n /**\n * Get item visual\n */\n getVisual: function (key, ignoreParent) {\n return this.hostTree.data.getItemVisual(this.dataIndex, key, ignoreParent);\n },\n\n /**\n * @public\n * @return {number}\n */\n getRawIndex: function () {\n return this.hostTree.data.getRawIndex(this.dataIndex);\n },\n\n /**\n * @public\n * @return {string}\n */\n getId: function () {\n return this.hostTree.data.getId(this.dataIndex);\n },\n\n /**\n * if this is an ancestor of another node\n *\n * @public\n * @param {TreeNode} node another node\n * @return {boolean} if is ancestor\n */\n isAncestorOf: function (node) {\n var parent = node.parentNode;\n\n while (parent) {\n if (parent === this) {\n return true;\n }\n\n parent = parent.parentNode;\n }\n\n return false;\n },\n\n /**\n * if this is an descendant of another node\n *\n * @public\n * @param {TreeNode} node another node\n * @return {boolean} if is descendant\n */\n isDescendantOf: function (node) {\n return node !== this && node.isAncestorOf(this);\n }\n};\n/**\n * @constructor\n * @alias module:echarts/data/Tree\n * @param {module:echarts/model/Model} hostModel\n */\n\nfunction Tree(hostModel) {\n /**\n * @type {module:echarts/data/Tree~TreeNode}\n * @readOnly\n */\n this.root;\n /**\n * @type {module:echarts/data/List}\n * @readOnly\n */\n\n this.data;\n /**\n * Index of each item is the same as the raw index of coresponding list item.\n * @private\n * @type {Array.}, ...]\n * @private\n * @type {Array.}\n */\n\n this._pieceList = [];\n this.resetExtent();\n /**\n * 'pieces', 'categories', 'splitNumber'\n * @type {string}\n */\n\n var mode = this._mode = this._determineMode();\n\n resetMethods[this._mode].call(this);\n\n this._resetSelected(newOption, isInit);\n\n var categories = this.option.categories;\n this.resetVisual(function (mappingOption, state) {\n if (mode === 'categories') {\n mappingOption.mappingMethod = 'category';\n mappingOption.categories = zrUtil.clone(categories);\n } else {\n mappingOption.dataExtent = this.getExtent();\n mappingOption.mappingMethod = 'piecewise';\n mappingOption.pieceList = zrUtil.map(this._pieceList, function (piece) {\n var piece = zrUtil.clone(piece);\n\n if (state !== 'inRange') {\n // FIXME\n // outOfRange do not support special visual in pieces.\n piece.visual = null;\n }\n\n return piece;\n });\n }\n });\n },\n\n /**\n * @protected\n * @override\n */\n completeVisualOption: function () {\n // Consider this case:\n // visualMap: {\n // pieces: [{symbol: 'circle', lt: 0}, {symbol: 'rect', gte: 0}]\n // }\n // where no inRange/outOfRange set but only pieces. So we should make\n // default inRange/outOfRange for this case, otherwise visuals that only\n // appear in `pieces` will not be taken into account in visual encoding.\n var option = this.option;\n var visualTypesInPieces = {};\n var visualTypes = VisualMapping.listVisualTypes();\n var isCategory = this.isCategory();\n zrUtil.each(option.pieces, function (piece) {\n zrUtil.each(visualTypes, function (visualType) {\n if (piece.hasOwnProperty(visualType)) {\n visualTypesInPieces[visualType] = 1;\n }\n });\n });\n zrUtil.each(visualTypesInPieces, function (v, visualType) {\n var exists = 0;\n zrUtil.each(this.stateList, function (state) {\n exists |= has(option, state, visualType) || has(option.target, state, visualType);\n }, this);\n !exists && zrUtil.each(this.stateList, function (state) {\n (option[state] || (option[state] = {}))[visualType] = visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory);\n });\n }, this);\n\n function has(obj, state, visualType) {\n return obj && obj[state] && (zrUtil.isObject(obj[state]) ? obj[state].hasOwnProperty(visualType) : obj[state] === visualType // e.g., inRange: 'symbol'\n );\n }\n\n VisualMapModel.prototype.completeVisualOption.apply(this, arguments);\n },\n _resetSelected: function (newOption, isInit) {\n var thisOption = this.option;\n var pieceList = this._pieceList; // Selected do not merge but all override.\n\n var selected = (isInit ? thisOption : newOption).selected || {};\n thisOption.selected = selected; // Consider 'not specified' means true.\n\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n\n if (!selected.hasOwnProperty(key)) {\n selected[key] = true;\n }\n }, this);\n\n if (thisOption.selectedMode === 'single') {\n // Ensure there is only one selected.\n var hasSel = false;\n zrUtil.each(pieceList, function (piece, index) {\n var key = this.getSelectedMapKey(piece);\n\n if (selected[key]) {\n hasSel ? selected[key] = false : hasSel = true;\n }\n }, this);\n } // thisOption.selectedMode === 'multiple', default: all selected.\n\n },\n\n /**\n * @public\n */\n getSelectedMapKey: function (piece) {\n return this._mode === 'categories' ? piece.value + '' : piece.index + '';\n },\n\n /**\n * @public\n */\n getPieceList: function () {\n return this._pieceList;\n },\n\n /**\n * @private\n * @return {string}\n */\n _determineMode: function () {\n var option = this.option;\n return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber';\n },\n\n /**\n * @public\n * @override\n */\n setSelected: function (selected) {\n this.option.selected = zrUtil.clone(selected);\n },\n\n /**\n * @public\n * @override\n */\n getValueState: function (value) {\n var index = VisualMapping.findPieceIndex(value, this._pieceList);\n return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange';\n },\n\n /**\n * @public\n * @params {number} pieceIndex piece index in visualMapModel.getPieceList()\n * @return {Array.} [{seriesId, dataIndex: >}, ...]\n */\n findTargetDataIndices: function (pieceIndex) {\n var result = [];\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimension(data), function (value, dataIndex) {\n // Should always base on model pieceList, because it is order sensitive.\n var pIdx = VisualMapping.findPieceIndex(value, this._pieceList);\n pIdx === pieceIndex && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n },\n\n /**\n * @private\n * @param {Object} piece piece.value or piece.interval is required.\n * @return {number} Can be Infinity or -Infinity\n */\n getRepresentValue: function (piece) {\n var representValue;\n\n if (this.isCategory()) {\n representValue = piece.value;\n } else {\n if (piece.value != null) {\n representValue = piece.value;\n } else {\n var pieceInterval = piece.interval || [];\n representValue = pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity ? 0 : (pieceInterval[0] + pieceInterval[1]) / 2;\n }\n }\n\n return representValue;\n },\n getVisualMeta: function (getColorVisual) {\n // Do not support category. (category axis is ordinal, numerical)\n if (this.isCategory()) {\n return;\n }\n\n var stops = [];\n var outerColors = [];\n var visualMapModel = this;\n\n function setStop(interval, valueState) {\n var representValue = visualMapModel.getRepresentValue({\n interval: interval\n });\n\n if (!valueState) {\n valueState = visualMapModel.getValueState(representValue);\n }\n\n var color = getColorVisual(representValue, valueState);\n\n if (interval[0] === -Infinity) {\n outerColors[0] = color;\n } else if (interval[1] === Infinity) {\n outerColors[1] = color;\n } else {\n stops.push({\n value: interval[0],\n color: color\n }, {\n value: interval[1],\n color: color\n });\n }\n } // Suplement\n\n\n var pieceList = this._pieceList.slice();\n\n if (!pieceList.length) {\n pieceList.push({\n interval: [-Infinity, Infinity]\n });\n } else {\n var edge = pieceList[0].interval[0];\n edge !== -Infinity && pieceList.unshift({\n interval: [-Infinity, edge]\n });\n edge = pieceList[pieceList.length - 1].interval[1];\n edge !== Infinity && pieceList.push({\n interval: [edge, Infinity]\n });\n }\n\n var curr = -Infinity;\n zrUtil.each(pieceList, function (piece) {\n var interval = piece.interval;\n\n if (interval) {\n // Fulfill gap.\n interval[0] > curr && setStop([curr, interval[0]], 'outOfRange');\n setStop(interval.slice());\n curr = interval[1];\n }\n }, this);\n return {\n stops: stops,\n outerColors: outerColors\n };\n }\n});\n/**\n * Key is this._mode\n * @type {Object}\n * @this {module:echarts/component/viusalMap/PiecewiseMode}\n */\n\nvar resetMethods = {\n splitNumber: function () {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n var precision = Math.min(thisOption.precision, 20);\n var dataExtent = this.getExtent();\n var splitNumber = thisOption.splitNumber;\n splitNumber = Math.max(parseInt(splitNumber, 10), 1);\n thisOption.splitNumber = splitNumber;\n var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber; // Precision auto-adaption\n\n while (+splitStep.toFixed(precision) !== splitStep && precision < 5) {\n precision++;\n }\n\n thisOption.precision = precision;\n splitStep = +splitStep.toFixed(precision);\n\n if (thisOption.minOpen) {\n pieceList.push({\n interval: [-Infinity, dataExtent[0]],\n close: [0, 0]\n });\n }\n\n for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) {\n var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep;\n pieceList.push({\n interval: [curr, max],\n close: [1, 1]\n });\n }\n\n if (thisOption.maxOpen) {\n pieceList.push({\n interval: [dataExtent[1], Infinity],\n close: [0, 0]\n });\n }\n\n reformIntervals(pieceList);\n zrUtil.each(pieceList, function (piece, index) {\n piece.index = index;\n piece.text = this.formatValueText(piece.interval);\n }, this);\n },\n categories: function () {\n var thisOption = this.option;\n zrUtil.each(thisOption.categories, function (cate) {\n // FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。\n // 是否改一致。\n this._pieceList.push({\n text: this.formatValueText(cate, true),\n value: cate\n });\n }, this); // See \"Order Rule\".\n\n normalizeReverse(thisOption, this._pieceList);\n },\n pieces: function () {\n var thisOption = this.option;\n var pieceList = this._pieceList;\n zrUtil.each(thisOption.pieces, function (pieceListItem, index) {\n if (!zrUtil.isObject(pieceListItem)) {\n pieceListItem = {\n value: pieceListItem\n };\n }\n\n var item = {\n text: '',\n index: index\n };\n\n if (pieceListItem.label != null) {\n item.text = pieceListItem.label;\n }\n\n if (pieceListItem.hasOwnProperty('value')) {\n var value = item.value = pieceListItem.value;\n item.interval = [value, value];\n item.close = [1, 1];\n } else {\n // `min` `max` is legacy option.\n // `lt` `gt` `lte` `gte` is recommanded.\n var interval = item.interval = [];\n var close = item.close = [0, 0];\n var closeList = [1, 0, 1];\n var infinityList = [-Infinity, Infinity];\n var useMinMax = [];\n\n for (var lg = 0; lg < 2; lg++) {\n var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg];\n\n for (var i = 0; i < 3 && interval[lg] == null; i++) {\n interval[lg] = pieceListItem[names[i]];\n close[lg] = closeList[i];\n useMinMax[lg] = i === 2;\n }\n\n interval[lg] == null && (interval[lg] = infinityList[lg]);\n }\n\n useMinMax[0] && interval[1] === Infinity && (close[0] = 0);\n useMinMax[1] && interval[0] === -Infinity && (close[1] = 0);\n\n if (interval[0] === interval[1] && close[0] && close[1]) {\n // Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}],\n // we use value to lift the priority when min === max\n item.value = interval[0];\n }\n }\n\n item.visual = VisualMapping.retrieveVisuals(pieceListItem);\n pieceList.push(item);\n }, this); // See \"Order Rule\".\n\n normalizeReverse(thisOption, pieceList); // Only pieces\n\n reformIntervals(pieceList);\n zrUtil.each(pieceList, function (piece) {\n var close = piece.close;\n var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]];\n piece.text = piece.text || this.formatValueText(piece.value != null ? piece.value : piece.interval, false, edgeSymbols);\n }, this);\n }\n};\n\nfunction normalizeReverse(thisOption, pieceList) {\n var inverse = thisOption.inverse;\n\n if (thisOption.orient === 'vertical' ? !inverse : inverse) {\n pieceList.reverse();\n }\n}\n\nvar _default = PiecewiseModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar zrColor = require(\"zrender/lib/tool/color\");\n\nvar eventUtil = require(\"zrender/lib/core/event\");\n\nvar domUtil = require(\"zrender/lib/core/dom\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar formatUtil = require(\"../../util/format\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar each = zrUtil.each;\nvar toCamelCase = formatUtil.toCamelCase;\nvar vendors = ['', '-webkit-', '-moz-', '-o-'];\nvar gCssText = 'position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;';\n/**\n * @param {number} duration\n * @return {string}\n * @inner\n */\n\nfunction assembleTransition(duration) {\n var transitionCurve = 'cubic-bezier(0.23, 1, 0.32, 1)';\n var transitionText = 'left ' + duration + 's ' + transitionCurve + ',' + 'top ' + duration + 's ' + transitionCurve;\n return zrUtil.map(vendors, function (vendorPrefix) {\n return vendorPrefix + 'transition:' + transitionText;\n }).join(';');\n}\n/**\n * @param {Object} textStyle\n * @return {string}\n * @inner\n */\n\n\nfunction assembleFont(textStyleModel) {\n var cssText = [];\n var fontSize = textStyleModel.get('fontSize');\n var color = textStyleModel.getTextColor();\n color && cssText.push('color:' + color);\n cssText.push('font:' + textStyleModel.getFont());\n var lineHeight = textStyleModel.get('lineHeight');\n\n if (lineHeight == null) {\n lineHeight = Math.round(fontSize * 3 / 2);\n }\n\n fontSize && cssText.push('line-height:' + lineHeight + 'px');\n var shadowColor = textStyleModel.get('textShadowColor');\n var shadowBlur = textStyleModel.get('textShadowBlur') || 0;\n var shadowOffsetX = textStyleModel.get('textShadowOffsetX') || 0;\n var shadowOffsetY = textStyleModel.get('textShadowOffsetY') || 0;\n shadowBlur && cssText.push('text-shadow:' + shadowOffsetX + 'px ' + shadowOffsetY + 'px ' + shadowBlur + 'px ' + shadowColor);\n each(['decoration', 'align'], function (name) {\n var val = textStyleModel.get(name);\n val && cssText.push('text-' + name + ':' + val);\n });\n return cssText.join(';');\n}\n/**\n * @param {Object} tooltipModel\n * @return {string}\n * @inner\n */\n\n\nfunction assembleCssText(tooltipModel) {\n var cssText = [];\n var transitionDuration = tooltipModel.get('transitionDuration');\n var backgroundColor = tooltipModel.get('backgroundColor');\n var textStyleModel = tooltipModel.getModel('textStyle');\n var padding = tooltipModel.get('padding'); // Animation transition. Do not animate when transitionDuration is 0.\n\n transitionDuration && cssText.push(assembleTransition(transitionDuration));\n\n if (backgroundColor) {\n if (env.canvasSupported) {\n cssText.push('background-Color:' + backgroundColor);\n } else {\n // for ie\n cssText.push('background-Color:#' + zrColor.toHex(backgroundColor));\n cssText.push('filter:alpha(opacity=70)');\n }\n } // Border style\n\n\n each(['width', 'color', 'radius'], function (name) {\n var borderName = 'border-' + name;\n var camelCase = toCamelCase(borderName);\n var val = tooltipModel.get(camelCase);\n val != null && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));\n }); // Text style\n\n cssText.push(assembleFont(textStyleModel)); // Padding\n\n if (padding != null) {\n cssText.push('padding:' + formatUtil.normalizeCssArray(padding).join('px ') + 'px');\n }\n\n return cssText.join(';') + ';';\n} // If not able to make, do not modify the input `out`.\n\n\nfunction makeStyleCoord(out, zr, appendToBody, zrX, zrY) {\n var zrPainter = zr && zr.painter;\n\n if (appendToBody) {\n var zrViewportRoot = zrPainter && zrPainter.getViewportRoot();\n\n if (zrViewportRoot) {\n // Some APPs might use scale on body, so we support CSS transform here.\n domUtil.transformLocalCoord(out, zrViewportRoot, document.body, zrX, zrY);\n }\n } else {\n out[0] = zrX;\n out[1] = zrY; // xy should be based on canvas root. But tooltipContent is\n // the sibling of canvas root. So padding of ec container\n // should be considered here.\n\n var viewportRootOffset = zrPainter && zrPainter.getViewportRootOffset();\n\n if (viewportRootOffset) {\n out[0] += viewportRootOffset.offsetLeft;\n out[1] += viewportRootOffset.offsetTop;\n }\n }\n\n out[2] = out[0] / zr.getWidth(); // The ratio of left to width\n\n out[3] = out[1] / zr.getHeight(); // The ratio of top to height\n}\n/**\n * @alias module:echarts/component/tooltip/TooltipContent\n * @param {HTMLElement} container\n * @param {ExtensionAPI} api\n * @param {Object} [opt]\n * @param {boolean} [opt.appendToBody]\n * `false`: the DOM element will be inside the container. Default value.\n * `true`: the DOM element will be appended to HTML body, which avoid\n * some overflow clip but intrude outside of the container.\n * @constructor\n */\n\n\nfunction TooltipContent(container, api, opt) {\n if (env.wxa) {\n return null;\n }\n\n var el = document.createElement('div');\n el.domBelongToZr = true;\n this.el = el;\n var zr = this._zr = api.getZr();\n var appendToBody = this._appendToBody = opt && opt.appendToBody;\n this._styleCoord = [0, 0, 0, 0]; // [left, top, left/width, top/height]\n\n makeStyleCoord(this._styleCoord, zr, appendToBody, api.getWidth() / 2, api.getHeight() / 2);\n\n if (appendToBody) {\n document.body.appendChild(el);\n } else {\n container.appendChild(el);\n }\n\n this._container = container;\n this._show = false;\n /**\n * @private\n */\n\n this._hideTimeout; // FIXME\n // Is it needed to trigger zr event manually if\n // the browser do not support `pointer-events: none`.\n\n var self = this;\n\n el.onmouseenter = function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n\n self._inContent = true;\n };\n\n el.onmousemove = function (e) {\n e = e || window.event;\n\n if (!self._enterable) {\n // `pointer-events: none` is set to tooltip content div\n // if `enterable` is set as `false`, and `el.onmousemove`\n // can not be triggered. But in browser that do not\n // support `pointer-events`, we need to do this:\n // Try trigger zrender event to avoid mouse\n // in and out shape too frequently\n var handler = zr.handler;\n var zrViewportRoot = zr.painter.getViewportRoot();\n eventUtil.normalizeEvent(zrViewportRoot, e, true);\n handler.dispatch('mousemove', e);\n }\n };\n\n el.onmouseleave = function () {\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n\n self._inContent = false;\n };\n}\n\nTooltipContent.prototype = {\n constructor: TooltipContent,\n\n /**\n * @private\n * @type {boolean}\n */\n _enterable: true,\n\n /**\n * Update when tooltip is rendered\n */\n update: function (tooltipModel) {\n // FIXME\n // Move this logic to ec main?\n var container = this._container;\n var stl = container.currentStyle || document.defaultView.getComputedStyle(container);\n var domStyle = container.style;\n\n if (domStyle.position !== 'absolute' && stl.position !== 'absolute') {\n domStyle.position = 'relative';\n }\n\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveTooltipIfResized(); // Hide the tooltip\n // PENDING\n // this.hide();\n },\n\n /**\n * when `alwaysShowContent` is true,\n * we should move the tooltip after chart resized\n */\n _moveTooltipIfResized: function () {\n var ratioX = this._styleCoord[2]; // The ratio of left to width\n\n var ratioY = this._styleCoord[3]; // The ratio of top to height\n\n var realX = ratioX * this._zr.getWidth();\n\n var realY = ratioY * this._zr.getHeight();\n\n this.moveTo(realX, realY);\n },\n show: function (tooltipModel) {\n clearTimeout(this._hideTimeout);\n var el = this.el;\n var styleCoord = this._styleCoord;\n el.style.cssText = gCssText + assembleCssText(tooltipModel) // Because of the reason described in:\n // http://stackoverflow.com/questions/21125587/css3-transition-not-working-in-chrome-anymore\n // we should set initial value to `left` and `top`.\n + ';left:' + styleCoord[0] + 'px;top:' + styleCoord[1] + 'px;' + (tooltipModel.get('extraCssText') || '');\n el.style.display = el.innerHTML ? 'block' : 'none'; // If mouse occasionally move over the tooltip, a mouseout event will be\n // triggered by canvas, and cause some unexpectable result like dragging\n // stop, \"unfocusAdjacency\". Here `pointer-events: none` is used to solve\n // it. Although it is not supported by IE8~IE10, fortunately it is a rare\n // scenario.\n\n el.style.pointerEvents = this._enterable ? 'auto' : 'none';\n this._show = true;\n },\n setContent: function (content) {\n this.el.innerHTML = content == null ? '' : content;\n },\n setEnterable: function (enterable) {\n this._enterable = enterable;\n },\n getSize: function () {\n var el = this.el;\n return [el.clientWidth, el.clientHeight];\n },\n moveTo: function (zrX, zrY) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, this._appendToBody, zrX, zrY);\n var style = this.el.style;\n style.left = styleCoord[0] + 'px';\n style.top = styleCoord[1] + 'px';\n },\n hide: function () {\n this.el.style.display = 'none';\n this._show = false;\n },\n hideLater: function (time) {\n if (this._show && !(this._inContent && this._enterable)) {\n if (time) {\n this._hideDelay = time; // Set show false to avoid invoke hideLater multiple times\n\n this._show = false;\n this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n },\n isShow: function () {\n return this._show;\n },\n dispose: function () {\n this.el.parentNode.removeChild(this.el);\n },\n getOuterSize: function () {\n var width = this.el.clientWidth;\n var height = this.el.clientHeight; // Consider browser compatibility.\n // IE8 does not support getComputedStyle.\n\n if (document.defaultView && document.defaultView.getComputedStyle) {\n var stl = document.defaultView.getComputedStyle(this.el);\n\n if (stl) {\n width += parseInt(stl.borderLeftWidth, 10) + parseInt(stl.borderRightWidth, 10);\n height += parseInt(stl.borderTopWidth, 10) + parseInt(stl.borderBottomWidth, 10);\n }\n }\n\n return {\n width: width,\n height: height\n };\n }\n};\nvar _default = TooltipContent;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"./gauge/GaugeSeries\");\n\nrequire(\"./gauge/GaugeView\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"../component/parallel\");\n\nrequire(\"./parallel/ParallelSeries\");\n\nrequire(\"./parallel/ParallelView\");\n\nvar parallelVisual = require(\"./parallel/parallelVisual\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerVisual(parallelVisual);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./candlestick/CandlestickSeries\");\n\nrequire(\"./candlestick/CandlestickView\");\n\nvar preprocessor = require(\"./candlestick/preprocessor\");\n\nvar candlestickVisual = require(\"./candlestick/candlestickVisual\");\n\nvar candlestickLayout = require(\"./candlestick/candlestickLayout\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerPreprocessor(preprocessor);\necharts.registerVisual(candlestickVisual);\necharts.registerLayout(candlestickLayout);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Axis = require(\"../../coord/Axis\");\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 * Extend axis 2d\n * @constructor module:echarts/coord/cartesian/Axis2D\n * @extends {module:echarts/coord/cartesian/Axis}\n * @param {string} dim\n * @param {*} scale\n * @param {Array.} coordExtent\n * @param {string} axisType\n * @param {string} position\n */\nvar TimelineAxis = function (dim, scale, coordExtent, axisType) {\n Axis.call(this, dim, scale, coordExtent);\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n\n this.type = axisType || 'value';\n /**\n * Axis model\n * @param {module:echarts/component/TimelineModel}\n */\n\n this.model = null;\n};\n\nTimelineAxis.prototype = {\n constructor: TimelineAxis,\n\n /**\n * @override\n */\n getLabelModel: function () {\n return this.model.getModel('label');\n },\n\n /**\n * @override\n */\n isHorizontal: function () {\n return this.model.get('orient') === 'horizontal';\n }\n};\nzrUtil.inherits(TimelineAxis, Axis);\nvar _default = TimelineAxis;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _graphic = require(\"../../util/graphic\");\n\nvar subPixelOptimize = _graphic.subPixelOptimize;\n\nvar createRenderPlanner = require(\"../helper/createRenderPlanner\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar retrieve2 = _util.retrieve2;\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/* global Float32Array */\nvar LargeArr = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nvar _default = {\n seriesType: 'candlestick',\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var data = seriesModel.getData();\n var candleWidth = calculateCandleWidth(seriesModel, data);\n var cDimIdx = 0;\n var vDimIdx = 1;\n var coordDims = ['x', 'y'];\n var cDim = data.mapDimension(coordDims[cDimIdx]);\n var vDims = data.mapDimension(coordDims[vDimIdx], true);\n var openDim = vDims[0];\n var closeDim = vDims[1];\n var lowestDim = vDims[2];\n var highestDim = vDims[3];\n data.setLayout({\n candleWidth: candleWidth,\n // The value is experimented visually.\n isSimpleBox: candleWidth <= 1.3\n });\n\n if (cDim == null || vDims.length < 4) {\n return;\n }\n\n return {\n progress: seriesModel.pipelineContext.large ? largeProgress : normalProgress\n };\n\n function normalProgress(params, data) {\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var axisDimVal = data.get(cDim, dataIndex);\n var openVal = data.get(openDim, dataIndex);\n var closeVal = data.get(closeDim, dataIndex);\n var lowestVal = data.get(lowestDim, dataIndex);\n var highestVal = data.get(highestDim, dataIndex);\n var ocLow = Math.min(openVal, closeVal);\n var ocHigh = Math.max(openVal, closeVal);\n var ocLowPoint = getPoint(ocLow, axisDimVal);\n var ocHighPoint = getPoint(ocHigh, axisDimVal);\n var lowestPoint = getPoint(lowestVal, axisDimVal);\n var highestPoint = getPoint(highestVal, axisDimVal);\n var ends = [];\n addBodyEnd(ends, ocHighPoint, 0);\n addBodyEnd(ends, ocLowPoint, 1);\n ends.push(subPixelOptimizePoint(highestPoint), subPixelOptimizePoint(ocHighPoint), subPixelOptimizePoint(lowestPoint), subPixelOptimizePoint(ocLowPoint));\n data.setItemLayout(dataIndex, {\n sign: getSign(data, dataIndex, openVal, closeVal, closeDim),\n initBaseline: openVal > closeVal ? ocHighPoint[vDimIdx] : ocLowPoint[vDimIdx],\n // open point.\n ends: ends,\n brushRect: makeBrushRect(lowestVal, highestVal, axisDimVal)\n });\n }\n\n function getPoint(val, axisDimVal) {\n var p = [];\n p[cDimIdx] = axisDimVal;\n p[vDimIdx] = val;\n return isNaN(axisDimVal) || isNaN(val) ? [NaN, NaN] : coordSys.dataToPoint(p);\n }\n\n function addBodyEnd(ends, point, start) {\n var point1 = point.slice();\n var point2 = point.slice();\n point1[cDimIdx] = subPixelOptimize(point1[cDimIdx] + candleWidth / 2, 1, false);\n point2[cDimIdx] = subPixelOptimize(point2[cDimIdx] - candleWidth / 2, 1, true);\n start ? ends.push(point1, point2) : ends.push(point2, point1);\n }\n\n function makeBrushRect(lowestVal, highestVal, axisDimVal) {\n var pmin = getPoint(lowestVal, axisDimVal);\n var pmax = getPoint(highestVal, axisDimVal);\n pmin[cDimIdx] -= candleWidth / 2;\n pmax[cDimIdx] -= candleWidth / 2;\n return {\n x: pmin[0],\n y: pmin[1],\n width: vDimIdx ? candleWidth : pmax[0] - pmin[0],\n height: vDimIdx ? pmax[1] - pmin[1] : candleWidth\n };\n }\n\n function subPixelOptimizePoint(point) {\n point[cDimIdx] = subPixelOptimize(point[cDimIdx], 1);\n return point;\n }\n }\n\n function largeProgress(params, data) {\n // Structure: [sign, x, yhigh, ylow, sign, x, yhigh, ylow, ...]\n var points = new LargeArr(params.count * 4);\n var offset = 0;\n var point;\n var tmpIn = [];\n var tmpOut = [];\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var axisDimVal = data.get(cDim, dataIndex);\n var openVal = data.get(openDim, dataIndex);\n var closeVal = data.get(closeDim, dataIndex);\n var lowestVal = data.get(lowestDim, dataIndex);\n var highestVal = data.get(highestDim, dataIndex);\n\n if (isNaN(axisDimVal) || isNaN(lowestVal) || isNaN(highestVal)) {\n points[offset++] = NaN;\n offset += 3;\n continue;\n }\n\n points[offset++] = getSign(data, dataIndex, openVal, closeVal, closeDim);\n tmpIn[cDimIdx] = axisDimVal;\n tmpIn[vDimIdx] = lowestVal;\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n tmpIn[vDimIdx] = highestVal;\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n points[offset++] = point ? point[1] : NaN;\n }\n\n data.setLayout('largePoints', points);\n }\n }\n};\n\nfunction getSign(data, dataIndex, openVal, closeVal, closeDim) {\n var sign;\n\n if (openVal > closeVal) {\n sign = -1;\n } else if (openVal < closeVal) {\n sign = 1;\n } else {\n sign = dataIndex > 0 // If close === open, compare with close of last record\n ? data.get(closeDim, dataIndex - 1) <= closeVal ? 1 : -1 : // No record of previous, set to be positive\n 1;\n }\n\n return sign;\n}\n\nfunction calculateCandleWidth(seriesModel, data) {\n var baseAxis = seriesModel.getBaseAxis();\n var extent;\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : (extent = baseAxis.getExtent(), Math.abs(extent[1] - extent[0]) / data.count());\n var barMaxWidth = parsePercent(retrieve2(seriesModel.get('barMaxWidth'), bandWidth), bandWidth);\n var barMinWidth = parsePercent(retrieve2(seriesModel.get('barMinWidth'), 1), bandWidth);\n var barWidth = seriesModel.get('barWidth');\n return barWidth != null ? parsePercent(barWidth, bandWidth) // Put max outer to ensure bar visible in spite of overlap.\n : Math.max(Math.min(bandWidth / 2, barMaxWidth), barMinWidth);\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"./dataZoomSlider\");\n\nrequire(\"./dataZoomInside\");","\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\nrequire(\"./legend\");\n\nrequire(\"./legend/ScrollableLegendModel\");\n\nrequire(\"./legend/ScrollableLegendView\");\n\nrequire(\"./legend/scrollableLegendAction\");","// Myers' Diff Algorithm\n// Modified from https://github.com/kpdecker/jsdiff/blob/master/src/diff/base.js\nfunction Diff() {}\n\nDiff.prototype = {\n diff: function (oldArr, newArr, equals) {\n if (!equals) {\n equals = function (a, b) {\n return a === b;\n };\n }\n\n this.equals = equals;\n var self = this;\n oldArr = oldArr.slice();\n newArr = newArr.slice(); // Allow subclasses to massage the input prior to running\n\n var newLen = newArr.length;\n var oldLen = oldArr.length;\n var editLength = 1;\n var maxEditLength = newLen + oldLen;\n var bestPath = [{\n newPos: -1,\n components: []\n }]; // Seed editLength = 0, i.e. the content starts with the same values\n\n var oldPos = this.extractCommon(bestPath[0], newArr, oldArr, 0);\n\n if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n var indices = [];\n\n for (var i = 0; i < newArr.length; i++) {\n indices.push(i);\n } // Identity per the equality and tokenizer\n\n\n return [{\n indices: indices,\n count: newArr.length\n }];\n } // Main worker method. checks all permutations of a given edit length for acceptance.\n\n\n function execEditLength() {\n for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {\n var basePath;\n var addPath = bestPath[diagonalPath - 1];\n var removePath = bestPath[diagonalPath + 1];\n var oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;\n\n if (addPath) {\n // No one else is going to attempt to use this value, clear it\n bestPath[diagonalPath - 1] = undefined;\n }\n\n var canAdd = addPath && addPath.newPos + 1 < newLen;\n var canRemove = removePath && 0 <= oldPos && oldPos < oldLen;\n\n if (!canAdd && !canRemove) {\n // If this path is a terminal then prune\n bestPath[diagonalPath] = undefined;\n continue;\n } // Select the diagonal that we want to branch from. We select the prior\n // path whose position in the new string is the farthest from the origin\n // and does not pass the bounds of the diff graph\n\n\n if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {\n basePath = clonePath(removePath);\n self.pushComponent(basePath.components, undefined, true);\n } else {\n basePath = addPath; // No need to clone, we've pulled it from the list\n\n basePath.newPos++;\n self.pushComponent(basePath.components, true, undefined);\n }\n\n oldPos = self.extractCommon(basePath, newArr, oldArr, diagonalPath); // If we have hit the end of both strings, then we are done\n\n if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n return buildValues(self, basePath.components, newArr, oldArr);\n } else {\n // Otherwise track this path as a potential candidate and continue.\n bestPath[diagonalPath] = basePath;\n }\n }\n\n editLength++;\n }\n\n while (editLength <= maxEditLength) {\n var ret = execEditLength();\n\n if (ret) {\n return ret;\n }\n }\n },\n pushComponent: function (components, added, removed) {\n var last = components[components.length - 1];\n\n if (last && last.added === added && last.removed === removed) {\n // We need to clone here as the component clone operation is just\n // as shallow array clone\n components[components.length - 1] = {\n count: last.count + 1,\n added: added,\n removed: removed\n };\n } else {\n components.push({\n count: 1,\n added: added,\n removed: removed\n });\n }\n },\n extractCommon: function (basePath, newArr, oldArr, diagonalPath) {\n var newLen = newArr.length;\n var oldLen = oldArr.length;\n var newPos = basePath.newPos;\n var oldPos = newPos - diagonalPath;\n var commonCount = 0;\n\n while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newArr[newPos + 1], oldArr[oldPos + 1])) {\n newPos++;\n oldPos++;\n commonCount++;\n }\n\n if (commonCount) {\n basePath.components.push({\n count: commonCount\n });\n }\n\n basePath.newPos = newPos;\n return oldPos;\n },\n tokenize: function (value) {\n return value.slice();\n },\n join: function (value) {\n return value.slice();\n }\n};\n\nfunction buildValues(diff, components, newArr, oldArr) {\n var componentPos = 0;\n var componentLen = components.length;\n var newPos = 0;\n var oldPos = 0;\n\n for (; componentPos < componentLen; componentPos++) {\n var component = components[componentPos];\n\n if (!component.removed) {\n var indices = [];\n\n for (var i = newPos; i < newPos + component.count; i++) {\n indices.push(i);\n }\n\n component.indices = indices;\n newPos += component.count; // Common case\n\n if (!component.added) {\n oldPos += component.count;\n }\n } else {\n var indices = [];\n\n for (var i = oldPos; i < oldPos + component.count; i++) {\n indices.push(i);\n }\n\n component.indices = indices;\n oldPos += component.count;\n }\n }\n\n return components;\n}\n\nfunction clonePath(path) {\n return {\n newPos: path.newPos,\n components: path.components.slice(0)\n };\n}\n\nvar arrayDiff = new Diff();\n\nfunction _default(oldArr, newArr, callback) {\n return arrayDiff.diff(oldArr, newArr, callback);\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar KEY_DELIMITER = '-->';\n/**\n * params handler\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @returns {*}\n */\n\nvar getAutoCurvenessParams = function (seriesModel) {\n return seriesModel.get('autoCurveness') || null;\n};\n/**\n * Generate a list of edge curvatures, 20 is the default\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @param {number} appendLength\n * @return 20 => [0, -0.2, 0.2, -0.4, 0.4, -0.6, 0.6, -0.8, 0.8, -1, 1, -1.2, 1.2, -1.4, 1.4, -1.6, 1.6, -1.8, 1.8, -2]\n */\n\n\nvar createCurveness = function (seriesModel, appendLength) {\n var autoCurvenessParmas = getAutoCurvenessParams(seriesModel);\n var length = 20;\n var curvenessList = []; // handler the function set\n\n if (typeof autoCurvenessParmas === 'number') {\n length = autoCurvenessParmas;\n } else if (zrUtil.isArray(autoCurvenessParmas)) {\n seriesModel.__curvenessList = autoCurvenessParmas;\n return;\n } // append length\n\n\n if (appendLength > length) {\n length = appendLength;\n } // make sure the length is even\n\n\n var len = length % 2 ? length + 2 : length + 3;\n curvenessList = [];\n\n for (var i = 0; i < len; i++) {\n curvenessList.push((i % 2 ? i + 1 : i) / 10 * (i % 2 ? -1 : 1));\n }\n\n seriesModel.__curvenessList = curvenessList;\n};\n/**\n * Create different cache key data in the positive and negative directions, in order to set the curvature later\n * @param {number|string|module:echarts/data/Graph.Node} n1\n * @param {number|string|module:echarts/data/Graph.Node} n2\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @returns {string} key\n */\n\n\nvar getKeyOfEdges = function (n1, n2, seriesModel) {\n var source = [n1.id, n1.dataIndex].join('.');\n var target = [n2.id, n2.dataIndex].join('.');\n return [seriesModel.uid, source, target].join(KEY_DELIMITER);\n};\n/**\n * get opposite key\n * @param {string} key\n * @returns {string}\n */\n\n\nvar getOppositeKey = function (key) {\n var keys = key.split(KEY_DELIMITER);\n return [keys[0], keys[2], keys[1]].join(KEY_DELIMITER);\n};\n/**\n * get edgeMap with key\n * @param edge\n * @param {module:echarts/model/SeriesModel} seriesModel\n */\n\n\nvar getEdgeFromMap = function (edge, seriesModel) {\n var key = getKeyOfEdges(edge.node1, edge.node2, seriesModel);\n return seriesModel.__edgeMap[key];\n};\n/**\n * calculate all cases total length\n * @param edge\n * @param seriesModel\n * @returns {number}\n */\n\n\nvar getTotalLengthBetweenNodes = function (edge, seriesModel) {\n var len = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node1, edge.node2, seriesModel), seriesModel);\n var lenV = getEdgeMapLengthWithKey(getKeyOfEdges(edge.node2, edge.node1, seriesModel), seriesModel);\n return len + lenV;\n};\n/**\n *\n * @param key\n */\n\n\nvar getEdgeMapLengthWithKey = function (key, seriesModel) {\n var edgeMap = seriesModel.__edgeMap;\n return edgeMap[key] ? edgeMap[key].length : 0;\n};\n/**\n * Count the number of edges between the same two points, used to obtain the curvature table and the parity of the edge\n * @see /graph/GraphSeries.js@getInitialData\n * @param {module:echarts/model/SeriesModel} seriesModel\n */\n\n\nfunction initCurvenessList(seriesModel) {\n if (!getAutoCurvenessParams(seriesModel)) {\n return;\n }\n\n seriesModel.__curvenessList = [];\n seriesModel.__edgeMap = {}; // calc the array of curveness List\n\n createCurveness(seriesModel);\n}\n/**\n * set edgeMap with key\n * @param {number|string|module:echarts/data/Graph.Node} n1\n * @param {number|string|module:echarts/data/Graph.Node} n2\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @param {number} index\n */\n\n\nfunction createEdgeMapForCurveness(n1, n2, seriesModel, index) {\n if (!getAutoCurvenessParams(seriesModel)) {\n return;\n }\n\n var key = getKeyOfEdges(n1, n2, seriesModel);\n var edgeMap = seriesModel.__edgeMap;\n var oppositeEdges = edgeMap[getOppositeKey(key)]; // set direction\n\n if (edgeMap[key] && !oppositeEdges) {\n edgeMap[key].isForward = true;\n } else if (oppositeEdges && edgeMap[key]) {\n oppositeEdges.isForward = true;\n edgeMap[key].isForward = false;\n }\n\n edgeMap[key] = edgeMap[key] || [];\n edgeMap[key].push(index);\n}\n/**\n * get curvature for edge\n * @param edge\n * @param {module:echarts/model/SeriesModel} seriesModel\n * @param index\n */\n\n\nfunction getCurvenessForEdge(edge, seriesModel, index, needReverse) {\n var autoCurvenessParams = getAutoCurvenessParams(seriesModel);\n var isArrayParam = zrUtil.isArray(autoCurvenessParams);\n\n if (!autoCurvenessParams) {\n return null;\n }\n\n var edgeArray = getEdgeFromMap(edge, seriesModel);\n\n if (!edgeArray) {\n return null;\n }\n\n var edgeIndex = -1;\n\n for (var i = 0; i < edgeArray.length; i++) {\n if (edgeArray[i] === index) {\n edgeIndex = i;\n break;\n }\n } // if totalLen is Longer createCurveness\n\n\n var totalLen = getTotalLengthBetweenNodes(edge, seriesModel);\n createCurveness(seriesModel, totalLen);\n edge.lineStyle = edge.lineStyle || {}; // if is opposite edge, must set curvenss to opposite number\n\n var curKey = getKeyOfEdges(edge.node1, edge.node2, seriesModel);\n var curvenessList = seriesModel.__curvenessList; // if pass array no need parity\n\n var parityCorrection = isArrayParam ? 0 : totalLen % 2 ? 0 : 1;\n\n if (!edgeArray.isForward) {\n // the opposite edge show outside\n var oppositeKey = getOppositeKey(curKey);\n var len = getEdgeMapLengthWithKey(oppositeKey, seriesModel);\n var resValue = curvenessList[edgeIndex + len + parityCorrection]; // isNeedReverse, simple, force type need reverse the curveness in the junction of the forword and the opposite\n\n if (needReverse) {\n // set as array may make the parity handle with the len of opposite\n if (isArrayParam) {\n if (autoCurvenessParams && autoCurvenessParams[0] === 0) {\n return (len + parityCorrection) % 2 ? resValue : -resValue;\n } else {\n return ((len % 2 ? 0 : 1) + parityCorrection) % 2 ? resValue : -resValue;\n }\n } else {\n return (len + parityCorrection) % 2 ? resValue : -resValue;\n }\n } else {\n return curvenessList[edgeIndex + len + parityCorrection];\n }\n } else {\n return curvenessList[parityCorrection + edgeIndex];\n }\n}\n\nexports.initCurvenessList = initCurvenessList;\nexports.createEdgeMapForCurveness = createEdgeMapForCurveness;\nexports.getCurvenessForEdge = getCurvenessForEdge;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar RoamController = require(\"./RoamController\");\n\nvar roamHelper = require(\"../../component/helper/roamHelper\");\n\nvar _cursorHelper = require(\"../../component/helper/cursorHelper\");\n\nvar onIrrelevantElement = _cursorHelper.onIrrelevantElement;\n\nvar graphic = require(\"../../util/graphic\");\n\nvar geoSourceManager = require(\"../../coord/geo/geoSourceManager\");\n\nvar _component = require(\"../../util/component\");\n\nvar getUID = _component.getUID;\n\nvar Transformable = require(\"zrender/lib/mixin/Transformable\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction getFixedItemStyle(model) {\n var itemStyle = model.getItemStyle();\n var areaColor = model.get('areaColor'); // If user want the color not to be changed when hover,\n // they should both set areaColor and color to be null.\n\n if (areaColor != null) {\n itemStyle.fill = areaColor;\n }\n\n return itemStyle;\n}\n\nfunction updateMapSelectHandler(mapDraw, mapOrGeoModel, regionsGroup, api, fromView) {\n regionsGroup.off('click');\n regionsGroup.off('mousedown');\n\n if (mapOrGeoModel.get('selectedMode')) {\n regionsGroup.on('mousedown', function () {\n mapDraw._mouseDownFlag = true;\n });\n regionsGroup.on('click', function (e) {\n if (!mapDraw._mouseDownFlag) {\n return;\n }\n\n mapDraw._mouseDownFlag = false;\n var el = e.target;\n\n while (!el.__regions) {\n el = el.parent;\n }\n\n if (!el) {\n return;\n }\n\n var action = {\n type: (mapOrGeoModel.mainType === 'geo' ? 'geo' : 'map') + 'ToggleSelect',\n batch: zrUtil.map(el.__regions, function (region) {\n return {\n name: region.name,\n from: fromView.uid\n };\n })\n };\n action[mapOrGeoModel.mainType + 'Id'] = mapOrGeoModel.id;\n api.dispatchAction(action);\n updateMapSelected(mapOrGeoModel, regionsGroup);\n });\n }\n}\n\nfunction updateMapSelected(mapOrGeoModel, regionsGroup) {\n // FIXME\n regionsGroup.eachChild(function (otherRegionEl) {\n zrUtil.each(otherRegionEl.__regions, function (region) {\n otherRegionEl.trigger(mapOrGeoModel.isSelected(region.name) ? 'emphasis' : 'normal');\n });\n });\n}\n/**\n * @alias module:echarts/component/helper/MapDraw\n * @param {module:echarts/ExtensionAPI} api\n * @param {boolean} updateGroup\n */\n\n\nfunction MapDraw(api, updateGroup) {\n var group = new graphic.Group();\n /**\n * @type {string}\n * @private\n */\n\n this.uid = getUID('ec_map_draw');\n /**\n * @type {module:echarts/component/helper/RoamController}\n * @private\n */\n\n this._controller = new RoamController(api.getZr());\n /**\n * @type {Object} {target, zoom, zoomLimit}\n * @private\n */\n\n this._controllerHost = {\n target: updateGroup ? group : null\n };\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n\n this.group = group;\n /**\n * @type {boolean}\n * @private\n */\n\n this._updateGroup = updateGroup;\n /**\n * This flag is used to make sure that only one among\n * `pan`, `zoom`, `click` can occurs, otherwise 'selected'\n * action may be triggered when `pan`, which is unexpected.\n * @type {booelan}\n */\n\n this._mouseDownFlag;\n /**\n * @type {string}\n */\n\n this._mapName;\n /**\n * @type {boolean}\n */\n\n this._initialized;\n /**\n * @type {module:zrender/container/Group}\n */\n\n group.add(this._regionsGroup = new graphic.Group());\n /**\n * @type {module:zrender/container/Group}\n */\n\n group.add(this._backgroundGroup = new graphic.Group());\n}\n\nMapDraw.prototype = {\n constructor: MapDraw,\n draw: function (mapOrGeoModel, ecModel, api, fromView, payload) {\n var isGeo = mapOrGeoModel.mainType === 'geo'; // Map series has data. GEO model that controlled by map series\n // will be assigned with map data. Other GEO model has no data.\n\n var data = mapOrGeoModel.getData && mapOrGeoModel.getData();\n isGeo && ecModel.eachComponent({\n mainType: 'series',\n subType: 'map'\n }, function (mapSeries) {\n if (!data && mapSeries.getHostGeoModel() === mapOrGeoModel) {\n data = mapSeries.getData();\n }\n });\n var geo = mapOrGeoModel.coordinateSystem;\n\n this._updateBackground(geo);\n\n var regionsGroup = this._regionsGroup;\n var group = this.group;\n var transformInfo = geo.getTransformInfo(); // No animation when first draw or in action\n\n var isFirstDraw = !regionsGroup.childAt(0) || payload;\n var targetScale;\n\n if (isFirstDraw) {\n group.transform = transformInfo.roamTransform;\n group.decomposeTransform();\n group.dirty();\n } else {\n var target = new Transformable();\n target.transform = transformInfo.roamTransform;\n target.decomposeTransform();\n var props = {\n scale: target.scale,\n position: target.position\n };\n targetScale = target.scale;\n graphic.updateProps(group, props, mapOrGeoModel);\n }\n\n var scale = transformInfo.rawScale;\n var position = transformInfo.rawPosition;\n regionsGroup.removeAll();\n var itemStyleAccessPath = ['itemStyle'];\n var hoverItemStyleAccessPath = ['emphasis', 'itemStyle'];\n var labelAccessPath = ['label'];\n var hoverLabelAccessPath = ['emphasis', 'label'];\n var nameMap = zrUtil.createHashMap();\n zrUtil.each(geo.regions, function (region) {\n // Consider in GeoJson properties.name may be duplicated, for example,\n // there is multiple region named \"United Kindom\" or \"France\" (so many\n // colonies). And it is not appropriate to merge them in geo, which\n // will make them share the same label and bring trouble in label\n // location calculation.\n var regionGroup = nameMap.get(region.name) || nameMap.set(region.name, new graphic.Group());\n var compoundPath = new graphic.CompoundPath({\n segmentIgnoreThreshold: 1,\n shape: {\n paths: []\n }\n });\n regionGroup.add(compoundPath);\n var regionModel = mapOrGeoModel.getRegionModel(region.name) || mapOrGeoModel;\n var itemStyleModel = regionModel.getModel(itemStyleAccessPath);\n var hoverItemStyleModel = regionModel.getModel(hoverItemStyleAccessPath);\n var itemStyle = getFixedItemStyle(itemStyleModel);\n var hoverItemStyle = getFixedItemStyle(hoverItemStyleModel);\n var labelModel = regionModel.getModel(labelAccessPath);\n var hoverLabelModel = regionModel.getModel(hoverLabelAccessPath);\n var dataIdx; // Use the itemStyle in data if has data\n\n if (data) {\n dataIdx = data.indexOfName(region.name); // Only visual color of each item will be used. It can be encoded by dataRange\n // But visual color of series is used in symbol drawing\n //\n // Visual color for each series is for the symbol draw\n\n var visualColor = data.getItemVisual(dataIdx, 'color', true);\n\n if (visualColor) {\n itemStyle.fill = visualColor;\n }\n }\n\n var transformPoint = function (point) {\n return [point[0] * scale[0] + position[0], point[1] * scale[1] + position[1]];\n };\n\n zrUtil.each(region.geometries, function (geometry) {\n if (geometry.type !== 'polygon') {\n return;\n }\n\n var points = [];\n\n for (var i = 0; i < geometry.exterior.length; ++i) {\n points.push(transformPoint(geometry.exterior[i]));\n }\n\n compoundPath.shape.paths.push(new graphic.Polygon({\n segmentIgnoreThreshold: 1,\n shape: {\n points: points\n }\n }));\n\n for (var i = 0; i < (geometry.interiors ? geometry.interiors.length : 0); ++i) {\n var interior = geometry.interiors[i];\n var points = [];\n\n for (var j = 0; j < interior.length; ++j) {\n points.push(transformPoint(interior[j]));\n }\n\n compoundPath.shape.paths.push(new graphic.Polygon({\n segmentIgnoreThreshold: 1,\n shape: {\n points: points\n }\n }));\n }\n });\n compoundPath.setStyle(itemStyle);\n compoundPath.style.strokeNoScale = true;\n compoundPath.culling = true; // Label\n\n var showLabel = labelModel.get('show');\n var hoverShowLabel = hoverLabelModel.get('show');\n var isDataNaN = data && isNaN(data.get(data.mapDimension('value'), dataIdx));\n var itemLayout = data && data.getItemLayout(dataIdx); // In the following cases label will be drawn\n // 1. In map series and data value is NaN\n // 2. In geo component\n // 4. Region has no series legendSymbol, which will be add a showLabel flag in mapSymbolLayout\n\n if (isGeo || isDataNaN && (showLabel || hoverShowLabel) || itemLayout && itemLayout.showLabel) {\n var query = !isGeo ? dataIdx : region.name;\n var labelFetcher; // Consider dataIdx not found.\n\n if (!data || dataIdx >= 0) {\n labelFetcher = mapOrGeoModel;\n }\n\n var textEl = new graphic.Text({\n position: transformPoint(region.center.slice()),\n // FIXME\n // label rotation is not support yet in geo or regions of series-map\n // that has no data. The rotation will be effected by this `scale`.\n // So needed to change to RectText?\n scale: [1 / group.scale[0], 1 / group.scale[1]],\n z2: 10,\n silent: true\n });\n graphic.setLabelStyle(textEl.style, textEl.hoverStyle = {}, labelModel, hoverLabelModel, {\n labelFetcher: labelFetcher,\n labelDataIndex: query,\n defaultText: region.name,\n useInsideStyle: false\n }, {\n textAlign: 'center',\n textVerticalAlign: 'middle'\n });\n\n if (!isFirstDraw) {\n // Text animation\n var textScale = [1 / targetScale[0], 1 / targetScale[1]];\n graphic.updateProps(textEl, {\n scale: textScale\n }, mapOrGeoModel);\n }\n\n regionGroup.add(textEl);\n } // setItemGraphicEl, setHoverStyle after all polygons and labels\n // are added to the rigionGroup\n\n\n if (data) {\n data.setItemGraphicEl(dataIdx, regionGroup);\n } else {\n var regionModel = mapOrGeoModel.getRegionModel(region.name); // Package custom mouse event for geo component\n\n compoundPath.eventData = {\n componentType: 'geo',\n componentIndex: mapOrGeoModel.componentIndex,\n geoIndex: mapOrGeoModel.componentIndex,\n name: region.name,\n region: regionModel && regionModel.option || {}\n };\n }\n\n var groupRegions = regionGroup.__regions || (regionGroup.__regions = []);\n groupRegions.push(region);\n regionGroup.highDownSilentOnTouch = !!mapOrGeoModel.get('selectedMode');\n graphic.setHoverStyle(regionGroup, hoverItemStyle);\n regionsGroup.add(regionGroup);\n });\n\n this._updateController(mapOrGeoModel, ecModel, api);\n\n updateMapSelectHandler(this, mapOrGeoModel, regionsGroup, api, fromView);\n updateMapSelected(mapOrGeoModel, regionsGroup);\n },\n remove: function () {\n this._regionsGroup.removeAll();\n\n this._backgroundGroup.removeAll();\n\n this._controller.dispose();\n\n this._mapName && geoSourceManager.removeGraphic(this._mapName, this.uid);\n this._mapName = null;\n this._controllerHost = {};\n },\n _updateBackground: function (geo) {\n var mapName = geo.map;\n\n if (this._mapName !== mapName) {\n zrUtil.each(geoSourceManager.makeGraphic(mapName, this.uid), function (root) {\n this._backgroundGroup.add(root);\n }, this);\n }\n\n this._mapName = mapName;\n },\n _updateController: function (mapOrGeoModel, ecModel, api) {\n var geo = mapOrGeoModel.coordinateSystem;\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n controllerHost.zoomLimit = mapOrGeoModel.get('scaleLimit');\n controllerHost.zoom = geo.getZoom(); // roamType is will be set default true if it is null\n\n controller.enable(mapOrGeoModel.get('roam') || false);\n var mainType = mapOrGeoModel.mainType;\n\n function makeActionBase() {\n var action = {\n type: 'geoRoam',\n componentType: mainType\n };\n action[mainType + 'Id'] = mapOrGeoModel.id;\n return action;\n }\n\n controller.off('pan').on('pan', function (e) {\n this._mouseDownFlag = false;\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n dx: e.dx,\n dy: e.dy\n }));\n }, this);\n controller.off('zoom').on('zoom', function (e) {\n this._mouseDownFlag = false;\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction(zrUtil.extend(makeActionBase(), {\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY\n }));\n\n if (this._updateGroup) {\n var scale = this.group.scale;\n\n this._regionsGroup.traverse(function (el) {\n if (el.type === 'text') {\n el.attr('scale', [1 / scale[0], 1 / scale[1]]);\n }\n });\n }\n }, this);\n controller.setPointerChecker(function (e, x, y) {\n return geo.getViewRectAfterRoam().contain(x, y) && !onIrrelevantElement(e, api, mapOrGeoModel);\n });\n }\n};\nvar _default = MapDraw;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel, payload) {\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n var graph = seriesModel.getGraph();\n var nodes = graph.nodes;\n\n if (nodes.length) {\n var minValue = Infinity;\n var maxValue = -Infinity;\n zrUtil.each(nodes, function (node) {\n var nodeValue = node.getLayout().value;\n\n if (nodeValue < minValue) {\n minValue = nodeValue;\n }\n\n if (nodeValue > maxValue) {\n maxValue = nodeValue;\n }\n });\n zrUtil.each(nodes, function (node) {\n var mapping = new VisualMapping({\n type: 'color',\n mappingMethod: 'linear',\n dataExtent: [minValue, maxValue],\n visual: seriesModel.get('color')\n });\n var mapValueToColor = mapping.mapValueToVisual(node.getLayout().value);\n var customColor = node.getModel().get('itemStyle.color');\n customColor != null ? node.setVisual('color', customColor) : node.setVisual('color', mapValueToColor);\n });\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar layoutUtil = require(\"../../util/layout\");\n\nvar LegendView = require(\"./LegendView\");\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 * Separate legend and scrollable legend to reduce package size.\n */\nvar Group = graphic.Group;\nvar WH = ['width', 'height'];\nvar XY = ['x', 'y'];\nvar ScrollableLegendView = LegendView.extend({\n type: 'legend.scroll',\n newlineDisabled: true,\n init: function () {\n ScrollableLegendView.superCall(this, 'init');\n /**\n * @private\n * @type {number} For `scroll`.\n */\n\n this._currentIndex = 0;\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n\n this.group.add(this._containerGroup = new Group());\n\n this._containerGroup.add(this.getContentGroup());\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n\n\n this.group.add(this._controllerGroup = new Group());\n /**\n *\n * @private\n */\n\n this._showController;\n },\n\n /**\n * @override\n */\n resetInner: function () {\n ScrollableLegendView.superCall(this, 'resetInner');\n\n this._controllerGroup.removeAll();\n\n this._containerGroup.removeClipPath();\n\n this._containerGroup.__rectSize = null;\n },\n\n /**\n * @override\n */\n renderInner: function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var me = this; // Render content items.\n\n ScrollableLegendView.superCall(this, 'renderInner', itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n var controllerGroup = this._controllerGroup; // FIXME: support be 'auto' adapt to size number text length,\n // e.g., '3/12345' should not overlap with the control arrow button.\n\n var pageIconSize = legendModel.get('pageIconSize', true);\n\n if (!zrUtil.isArray(pageIconSize)) {\n pageIconSize = [pageIconSize, pageIconSize];\n }\n\n createPageButton('pagePrev', 0);\n var pageTextStyleModel = legendModel.getModel('pageTextStyle');\n controllerGroup.add(new graphic.Text({\n name: 'pageText',\n style: {\n textFill: pageTextStyleModel.getTextColor(),\n font: pageTextStyleModel.getFont(),\n textVerticalAlign: 'middle',\n textAlign: 'center'\n },\n silent: true\n }));\n createPageButton('pageNext', 1);\n\n function createPageButton(name, iconIdx) {\n var pageDataIndexName = name + 'DataIndex';\n var icon = graphic.createIcon(legendModel.get('pageIcons', true)[legendModel.getOrient().name][iconIdx], {\n // Buttons will be created in each render, so we do not need\n // to worry about avoiding using legendModel kept in scope.\n onclick: zrUtil.bind(me._pageGo, me, pageDataIndexName, legendModel, api)\n }, {\n x: -pageIconSize[0] / 2,\n y: -pageIconSize[1] / 2,\n width: pageIconSize[0],\n height: pageIconSize[1]\n });\n icon.name = name;\n controllerGroup.add(icon);\n }\n },\n\n /**\n * @override\n */\n layoutInner: function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n var hw = WH[1 - orientIdx];\n var yx = XY[1 - orientIdx];\n selector && layoutUtil.box( // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var processMaxSize = zrUtil.clone(maxSize);\n selector && (processMaxSize[wh] = maxSize[wh] - selectorRect[wh] - selectorButtonGap);\n\n var mainRect = this._layoutContentAndController(legendModel, isFirstRender, processMaxSize, orientIdx, wh, hw, yx);\n\n if (selector) {\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += mainRect[wh] + selectorButtonGap;\n } else {\n var offset = selectorRect[wh] + selectorButtonGap;\n selectorPos[orientIdx] -= offset;\n mainRect[xy] -= offset;\n }\n\n mainRect[wh] += selectorRect[wh] + selectorButtonGap;\n selectorPos[1 - orientIdx] += mainRect[yx] + mainRect[hw] / 2 - selectorRect[hw] / 2;\n mainRect[hw] = Math.max(mainRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(mainRect[yx], selectorRect[yx] + selectorPos[1 - orientIdx]);\n selectorGroup.attr('position', selectorPos);\n }\n\n return mainRect;\n },\n _layoutContentAndController: function (legendModel, isFirstRender, maxSize, orientIdx, wh, hw, yx) {\n var contentGroup = this.getContentGroup();\n var containerGroup = this._containerGroup;\n var controllerGroup = this._controllerGroup; // Place items in contentGroup.\n\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), !orientIdx ? null : maxSize.width, orientIdx ? null : maxSize.height);\n layoutUtil.box( // Buttons in controller are layout always horizontally.\n 'horizontal', controllerGroup, legendModel.get('pageButtonItemGap', true));\n var contentRect = contentGroup.getBoundingRect();\n var controllerRect = controllerGroup.getBoundingRect();\n var showController = this._showController = contentRect[wh] > maxSize[wh];\n var contentPos = [-contentRect.x, -contentRect.y]; // Remain contentPos when scroll animation perfroming.\n // If first rendering, `contentGroup.position` is [0, 0], which\n // does not make sense and may cause unexepcted animation if adopted.\n\n if (!isFirstRender) {\n contentPos[orientIdx] = contentGroup.position[orientIdx];\n } // Layout container group based on 0.\n\n\n var containerPos = [0, 0];\n var controllerPos = [-controllerRect.x, -controllerRect.y];\n var pageButtonGap = zrUtil.retrieve2(legendModel.get('pageButtonGap', true), legendModel.get('itemGap', true)); // Place containerGroup and controllerGroup and contentGroup.\n\n if (showController) {\n var pageButtonPosition = legendModel.get('pageButtonPosition', true); // controller is on the right / bottom.\n\n if (pageButtonPosition === 'end') {\n controllerPos[orientIdx] += maxSize[wh] - controllerRect[wh];\n } // controller is on the left / top.\n else {\n containerPos[orientIdx] += controllerRect[wh] + pageButtonGap;\n }\n } // Always align controller to content as 'middle'.\n\n\n controllerPos[1 - orientIdx] += contentRect[hw] / 2 - controllerRect[hw] / 2;\n contentGroup.attr('position', contentPos);\n containerGroup.attr('position', containerPos);\n controllerGroup.attr('position', controllerPos); // Calculate `mainRect` and set `clipPath`.\n // mainRect should not be calculated by `this.group.getBoundingRect()`\n // for sake of the overflow.\n\n var mainRect = {\n x: 0,\n y: 0\n }; // Consider content may be overflow (should be clipped).\n\n mainRect[wh] = showController ? maxSize[wh] : contentRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], controllerRect[hw]); // `containerRect[yx] + containerPos[1 - orientIdx]` is 0.\n\n mainRect[yx] = Math.min(0, controllerRect[yx] + controllerPos[1 - orientIdx]);\n containerGroup.__rectSize = maxSize[wh];\n\n if (showController) {\n var clipShape = {\n x: 0,\n y: 0\n };\n clipShape[wh] = Math.max(maxSize[wh] - controllerRect[wh] - pageButtonGap, 0);\n clipShape[hw] = mainRect[hw];\n containerGroup.setClipPath(new graphic.Rect({\n shape: clipShape\n })); // Consider content may be larger than container, container rect\n // can not be obtained from `containerGroup.getBoundingRect()`.\n\n containerGroup.__rectSize = clipShape[wh];\n } else {\n // Do not remove or ignore controller. Keep them set as placeholders.\n controllerGroup.eachChild(function (child) {\n child.attr({\n invisible: true,\n silent: true\n });\n });\n } // Content translate animation.\n\n\n var pageInfo = this._getPageInfo(legendModel);\n\n pageInfo.pageIndex != null && graphic.updateProps(contentGroup, {\n position: pageInfo.contentPosition\n }, // When switch from \"show controller\" to \"not show controller\", view should be\n // updated immediately without animation, otherwise causes weird effect.\n showController ? legendModel : false);\n\n this._updatePageInfoView(legendModel, pageInfo);\n\n return mainRect;\n },\n _pageGo: function (to, legendModel, api) {\n var scrollDataIndex = this._getPageInfo(legendModel)[to];\n\n scrollDataIndex != null && api.dispatchAction({\n type: 'legendScroll',\n scrollDataIndex: scrollDataIndex,\n legendId: legendModel.id\n });\n },\n _updatePageInfoView: function (legendModel, pageInfo) {\n var controllerGroup = this._controllerGroup;\n zrUtil.each(['pagePrev', 'pageNext'], function (name) {\n var canJump = pageInfo[name + 'DataIndex'] != null;\n var icon = controllerGroup.childOfName(name);\n\n if (icon) {\n icon.setStyle('fill', canJump ? legendModel.get('pageIconColor', true) : legendModel.get('pageIconInactiveColor', true));\n icon.cursor = canJump ? 'pointer' : 'default';\n }\n });\n var pageText = controllerGroup.childOfName('pageText');\n var pageFormatter = legendModel.get('pageFormatter');\n var pageIndex = pageInfo.pageIndex;\n var current = pageIndex != null ? pageIndex + 1 : 0;\n var total = pageInfo.pageCount;\n pageText && pageFormatter && pageText.setStyle('text', zrUtil.isString(pageFormatter) ? pageFormatter.replace('{current}', current).replace('{total}', total) : pageFormatter({\n current: current,\n total: total\n }));\n },\n\n /**\n * @param {module:echarts/model/Model} legendModel\n * @return {Object} {\n * contentPosition: Array., null when data item not found.\n * pageIndex: number, null when data item not found.\n * pageCount: number, always be a number, can be 0.\n * pagePrevDataIndex: number, null when no previous page.\n * pageNextDataIndex: number, null when no next page.\n * }\n */\n _getPageInfo: function (legendModel) {\n var scrollDataIndex = legendModel.get('scrollDataIndex', true);\n var contentGroup = this.getContentGroup();\n var containerRectSize = this._containerGroup.__rectSize;\n var orientIdx = legendModel.getOrient().index;\n var wh = WH[orientIdx];\n var xy = XY[orientIdx];\n\n var targetItemIndex = this._findTargetItemIndex(scrollDataIndex);\n\n var children = contentGroup.children();\n var targetItem = children[targetItemIndex];\n var itemCount = children.length;\n var pCount = !itemCount ? 0 : 1;\n var result = {\n contentPosition: contentGroup.position.slice(),\n pageCount: pCount,\n pageIndex: pCount - 1,\n pagePrevDataIndex: null,\n pageNextDataIndex: null\n };\n\n if (!targetItem) {\n return result;\n }\n\n var targetItemInfo = getItemInfo(targetItem);\n result.contentPosition[orientIdx] = -targetItemInfo.s; // Strategy:\n // (1) Always align based on the left/top most item.\n // (2) It is user-friendly that the last item shown in the\n // current window is shown at the begining of next window.\n // Otherwise if half of the last item is cut by the window,\n // it will have no chance to display entirely.\n // (3) Consider that item size probably be different, we\n // have calculate pageIndex by size rather than item index,\n // and we can not get page index directly by division.\n // (4) The window is to narrow to contain more than\n // one item, we should make sure that the page can be fliped.\n\n for (var i = targetItemIndex + 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i <= itemCount; ++i) {\n currItemInfo = getItemInfo(children[i]);\n\n if ( // Half of the last item is out of the window.\n !currItemInfo && winEndItemInfo.e > winStartItemInfo.s + containerRectSize || // If the current item does not intersect with the window, the new page\n // can be started at the current item or the last item.\n currItemInfo && !intersect(currItemInfo, winStartItemInfo.s)) {\n if (winEndItemInfo.i > winStartItemInfo.i) {\n winStartItemInfo = winEndItemInfo;\n } else {\n // e.g., when page size is smaller than item size.\n winStartItemInfo = currItemInfo;\n }\n\n if (winStartItemInfo) {\n if (result.pageNextDataIndex == null) {\n result.pageNextDataIndex = winStartItemInfo.i;\n }\n\n ++result.pageCount;\n }\n }\n\n winEndItemInfo = currItemInfo;\n }\n\n for (var i = targetItemIndex - 1, winStartItemInfo = targetItemInfo, winEndItemInfo = targetItemInfo, currItemInfo = null; i >= -1; --i) {\n currItemInfo = getItemInfo(children[i]);\n\n if ( // If the the end item does not intersect with the window started\n // from the current item, a page can be settled.\n (!currItemInfo || !intersect(winEndItemInfo, currItemInfo.s)) && // e.g., when page size is smaller than item size.\n winStartItemInfo.i < winEndItemInfo.i) {\n winEndItemInfo = winStartItemInfo;\n\n if (result.pagePrevDataIndex == null) {\n result.pagePrevDataIndex = winStartItemInfo.i;\n }\n\n ++result.pageCount;\n ++result.pageIndex;\n }\n\n winStartItemInfo = currItemInfo;\n }\n\n return result;\n\n function getItemInfo(el) {\n if (el) {\n var itemRect = el.getBoundingRect();\n var start = itemRect[xy] + el.position[orientIdx];\n return {\n s: start,\n e: start + itemRect[wh],\n i: el.__legendDataIndex\n };\n }\n }\n\n function intersect(itemInfo, winStart) {\n return itemInfo.e >= winStart && itemInfo.s <= winStart + containerRectSize;\n }\n },\n _findTargetItemIndex: function (targetDataIndex) {\n if (!this._showController) {\n return 0;\n }\n\n var index;\n var contentGroup = this.getContentGroup();\n var defaultIndex;\n contentGroup.eachChild(function (child, idx) {\n var legendDataIdx = child.__legendDataIndex; // FIXME\n // If the given targetDataIndex (from model) is illegal,\n // we use defaultIndex. But the index on the legend model and\n // action payload is still illegal. That case will not be\n // changed until some scenario requires.\n\n if (defaultIndex == null && legendDataIdx != null) {\n defaultIndex = idx;\n }\n\n if (legendDataIdx === targetDataIndex) {\n index = idx;\n }\n });\n return index != null ? index : defaultIndex;\n }\n});\nvar _default = ScrollableLegendView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Axis = require(\"../Axis\");\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 * @constructor module:echarts/coord/parallel/ParallelAxis\n * @extends {module:echarts/coord/Axis}\n * @param {string} dim\n * @param {*} scale\n * @param {Array.} coordExtent\n * @param {string} axisType\n */\nvar ParallelAxis = function (dim, scale, coordExtent, axisType, axisIndex) {\n Axis.call(this, dim, scale, coordExtent);\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n\n this.type = axisType || 'value';\n /**\n * @type {number}\n * @readOnly\n */\n\n this.axisIndex = axisIndex;\n};\n\nParallelAxis.prototype = {\n constructor: ParallelAxis,\n\n /**\n * Axis model\n * @param {module:echarts/coord/parallel/AxisModel}\n */\n model: null,\n\n /**\n * @override\n */\n isHorizontal: function () {\n return this.coordinateSystem.getModel().get('layout') !== 'horizontal';\n }\n};\nzrUtil.inherits(ParallelAxis, Axis);\nvar _default = ParallelAxis;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar Line = require(\"./Line\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar vec2 = require(\"zrender/lib/core/vector\");\n\nvar curveUtil = require(\"zrender/lib/core/curve\");\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 * Provide effect for line\n * @module echarts/chart/helper/EffectLine\n */\n\n/**\n * @constructor\n * @extends {module:zrender/graphic/Group}\n * @alias {module:echarts/chart/helper/Line}\n */\nfunction EffectLine(lineData, idx, seriesScope) {\n graphic.Group.call(this);\n this.add(this.createLine(lineData, idx, seriesScope));\n\n this._updateEffectSymbol(lineData, idx);\n}\n\nvar effectLineProto = EffectLine.prototype;\n\neffectLineProto.createLine = function (lineData, idx, seriesScope) {\n return new Line(lineData, idx, seriesScope);\n};\n\neffectLineProto._updateEffectSymbol = function (lineData, idx) {\n var itemModel = lineData.getItemModel(idx);\n var effectModel = itemModel.getModel('effect');\n var size = effectModel.get('symbolSize');\n var symbolType = effectModel.get('symbol');\n\n if (!zrUtil.isArray(size)) {\n size = [size, size];\n }\n\n var color = effectModel.get('color') || lineData.getItemVisual(idx, 'color');\n var symbol = this.childAt(1);\n\n if (this._symbolType !== symbolType) {\n // Remove previous\n this.remove(symbol);\n symbol = createSymbol(symbolType, -0.5, -0.5, 1, 1, color);\n symbol.z2 = 100;\n symbol.culling = true;\n this.add(symbol);\n } // Symbol may be removed if loop is false\n\n\n if (!symbol) {\n return;\n } // Shadow color is same with color in default\n\n\n symbol.setStyle('shadowColor', color);\n symbol.setStyle(effectModel.getItemStyle(['color']));\n symbol.attr('scale', size);\n symbol.setColor(color);\n symbol.attr('scale', size);\n this._symbolType = symbolType;\n this._symbolScale = size;\n\n this._updateEffectAnimation(lineData, effectModel, idx);\n};\n\neffectLineProto._updateEffectAnimation = function (lineData, effectModel, idx) {\n var symbol = this.childAt(1);\n\n if (!symbol) {\n return;\n }\n\n var self = this;\n var points = lineData.getItemLayout(idx);\n var period = effectModel.get('period') * 1000;\n var loop = effectModel.get('loop');\n var constantSpeed = effectModel.get('constantSpeed');\n var delayExpr = zrUtil.retrieve(effectModel.get('delay'), function (idx) {\n return idx / lineData.count() * period / 3;\n });\n var isDelayFunc = typeof delayExpr === 'function'; // Ignore when updating\n\n symbol.ignore = true;\n this.updateAnimationPoints(symbol, points);\n\n if (constantSpeed > 0) {\n period = this.getLineLength(symbol) / constantSpeed * 1000;\n }\n\n if (period !== this._period || loop !== this._loop) {\n symbol.stopAnimation();\n var delay = delayExpr;\n\n if (isDelayFunc) {\n delay = delayExpr(idx);\n }\n\n if (symbol.__t > 0) {\n delay = -period * symbol.__t;\n }\n\n symbol.__t = 0;\n var animator = symbol.animate('', loop).when(period, {\n __t: 1\n }).delay(delay).during(function () {\n self.updateSymbolPosition(symbol);\n });\n\n if (!loop) {\n animator.done(function () {\n self.remove(symbol);\n });\n }\n\n animator.start();\n }\n\n this._period = period;\n this._loop = loop;\n};\n\neffectLineProto.getLineLength = function (symbol) {\n // Not so accurate\n return vec2.dist(symbol.__p1, symbol.__cp1) + vec2.dist(symbol.__cp1, symbol.__p2);\n};\n\neffectLineProto.updateAnimationPoints = function (symbol, points) {\n symbol.__p1 = points[0];\n symbol.__p2 = points[1];\n symbol.__cp1 = points[2] || [(points[0][0] + points[1][0]) / 2, (points[0][1] + points[1][1]) / 2];\n};\n\neffectLineProto.updateData = function (lineData, idx, seriesScope) {\n this.childAt(0).updateData(lineData, idx, seriesScope);\n\n this._updateEffectSymbol(lineData, idx);\n};\n\neffectLineProto.updateSymbolPosition = function (symbol) {\n var p1 = symbol.__p1;\n var p2 = symbol.__p2;\n var cp1 = symbol.__cp1;\n var t = symbol.__t;\n var pos = symbol.position;\n var lastPos = [pos[0], pos[1]];\n var quadraticAt = curveUtil.quadraticAt;\n var quadraticDerivativeAt = curveUtil.quadraticDerivativeAt;\n pos[0] = quadraticAt(p1[0], cp1[0], p2[0], t);\n pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t); // Tangent\n\n var tx = quadraticDerivativeAt(p1[0], cp1[0], p2[0], t);\n var ty = quadraticDerivativeAt(p1[1], cp1[1], p2[1], t);\n symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2; // enable continuity trail for 'line', 'rect', 'roundRect' symbolType\n\n if (this._symbolType === 'line' || this._symbolType === 'rect' || this._symbolType === 'roundRect') {\n if (symbol.__lastT !== undefined && symbol.__lastT < symbol.__t) {\n var scaleY = vec2.dist(lastPos, pos) * 1.05;\n symbol.attr('scale', [symbol.scale[0], scaleY]); // make sure the last segment render within endPoint\n\n if (t === 1) {\n pos[0] = lastPos[0] + (pos[0] - lastPos[0]) / 2;\n pos[1] = lastPos[1] + (pos[1] - lastPos[1]) / 2;\n }\n } else if (symbol.__lastT === 1) {\n // After first loop, symbol.__t does NOT start with 0, so connect p1 to pos directly.\n var scaleY = 2 * vec2.dist(p1, pos);\n symbol.attr('scale', [symbol.scale[0], scaleY]);\n } else {\n symbol.attr('scale', this._symbolScale);\n }\n }\n\n symbol.__lastT = symbol.__t;\n symbol.ignore = false;\n};\n\neffectLineProto.updateLayout = function (lineData, idx) {\n this.childAt(0).updateLayout(lineData, idx);\n var effectModel = lineData.getItemModel(idx).getModel('effect');\n\n this._updateEffectAnimation(lineData, effectModel, idx);\n};\n\nzrUtil.inherits(EffectLine, graphic.Group);\nvar _default = EffectLine;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar visualSolution = require(\"../../visual/visualSolution\");\n\nvar selector = require(\"./selector\");\n\nvar throttleUtil = require(\"../../util/throttle\");\n\nvar BrushTargetManager = require(\"../helper/BrushTargetManager\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar STATE_LIST = ['inBrush', 'outOfBrush'];\nvar DISPATCH_METHOD = '__ecBrushSelect';\nvar DISPATCH_FLAG = '__ecInBrushSelectEvent';\nvar PRIORITY_BRUSH = echarts.PRIORITY.VISUAL.BRUSH;\n/**\n * Layout for visual, the priority higher than other layout, and before brush visual.\n */\n\necharts.registerLayout(PRIORITY_BRUSH, function (ecModel, api, payload) {\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n payload && payload.type === 'takeGlobalCursor' && brushModel.setBrushOption(payload.key === 'brush' ? payload.brushOption : {\n brushType: false\n });\n });\n layoutCovers(ecModel);\n});\n\nfunction layoutCovers(ecModel) {\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n var brushTargetManager = brushModel.brushTargetManager = new BrushTargetManager(brushModel.option, ecModel);\n brushTargetManager.setInputRanges(brushModel.areas, ecModel);\n });\n}\n/**\n * Register the visual encoding if this modules required.\n */\n\n\necharts.registerVisual(PRIORITY_BRUSH, function (ecModel, api, payload) {\n var brushSelected = [];\n var throttleType;\n var throttleDelay;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel, brushIndex) {\n var thisBrushSelected = {\n brushId: brushModel.id,\n brushIndex: brushIndex,\n brushName: brushModel.name,\n areas: zrUtil.clone(brushModel.areas),\n selected: []\n }; // Every brush component exists in event params, convenient\n // for user to find by index.\n\n brushSelected.push(thisBrushSelected);\n var brushOption = brushModel.option;\n var brushLink = brushOption.brushLink;\n var linkedSeriesMap = [];\n var selectedDataIndexForLink = [];\n var rangeInfoBySeries = [];\n var hasBrushExists = 0;\n\n if (!brushIndex) {\n // Only the first throttle setting works.\n throttleType = brushOption.throttleType;\n throttleDelay = brushOption.throttleDelay;\n } // Add boundingRect and selectors to range.\n\n\n var areas = zrUtil.map(brushModel.areas, function (area) {\n return bindSelector(zrUtil.defaults({\n boundingRect: boundingRectBuilders[area.brushType](area)\n }, area));\n });\n var visualMappings = visualSolution.createVisualMappings(brushModel.option, STATE_LIST, function (mappingOption) {\n mappingOption.mappingMethod = 'fixed';\n });\n zrUtil.isArray(brushLink) && zrUtil.each(brushLink, function (seriesIndex) {\n linkedSeriesMap[seriesIndex] = 1;\n });\n\n function linkOthers(seriesIndex) {\n return brushLink === 'all' || linkedSeriesMap[seriesIndex];\n } // If no supported brush or no brush on the series,\n // all visuals should be in original state.\n\n\n function brushed(rangeInfoList) {\n return !!rangeInfoList.length;\n }\n /**\n * Logic for each series: (If the logic has to be modified one day, do it carefully!)\n *\n * ( brushed ┬ && ┬hasBrushExist ┬ && linkOthers ) => StepA: ┬record, ┬ StepB: ┬visualByRecord.\n * !brushed┘ ├hasBrushExist ┤ └nothing,┘ ├visualByRecord.\n * └!hasBrushExist┘ └nothing.\n * ( !brushed && ┬hasBrushExist ┬ && linkOthers ) => StepA: nothing, StepB: ┬visualByRecord.\n * └!hasBrushExist┘ └nothing.\n * ( brushed ┬ && !linkOthers ) => StepA: nothing, StepB: ┬visualByCheck.\n * !brushed┘ └nothing.\n * ( !brushed && !linkOthers ) => StepA: nothing, StepB: nothing.\n */\n // Step A\n\n\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var rangeInfoList = rangeInfoBySeries[seriesIndex] = [];\n seriesModel.subType === 'parallel' ? stepAParallel(seriesModel, seriesIndex, rangeInfoList) : stepAOthers(seriesModel, seriesIndex, rangeInfoList);\n });\n\n function stepAParallel(seriesModel, seriesIndex) {\n var coordSys = seriesModel.coordinateSystem;\n hasBrushExists |= coordSys.hasAxisBrushed();\n linkOthers(seriesIndex) && coordSys.eachActiveState(seriesModel.getData(), function (activeState, dataIndex) {\n activeState === 'active' && (selectedDataIndexForLink[dataIndex] = 1);\n });\n }\n\n function stepAOthers(seriesModel, seriesIndex, rangeInfoList) {\n var selectorsByBrushType = getSelectorsByBrushType(seriesModel);\n\n if (!selectorsByBrushType || brushModelNotControll(brushModel, seriesIndex)) {\n return;\n }\n\n zrUtil.each(areas, function (area) {\n selectorsByBrushType[area.brushType] && brushModel.brushTargetManager.controlSeries(area, seriesModel, ecModel) && rangeInfoList.push(area);\n hasBrushExists |= brushed(rangeInfoList);\n });\n\n if (linkOthers(seriesIndex) && brushed(rangeInfoList)) {\n var data = seriesModel.getData();\n data.each(function (dataIndex) {\n if (checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex)) {\n selectedDataIndexForLink[dataIndex] = 1;\n }\n });\n }\n } // Step B\n\n\n ecModel.eachSeries(function (seriesModel, seriesIndex) {\n var seriesBrushSelected = {\n seriesId: seriesModel.id,\n seriesIndex: seriesIndex,\n seriesName: seriesModel.name,\n dataIndex: []\n }; // Every series exists in event params, convenient\n // for user to find series by seriesIndex.\n\n thisBrushSelected.selected.push(seriesBrushSelected);\n var selectorsByBrushType = getSelectorsByBrushType(seriesModel);\n var rangeInfoList = rangeInfoBySeries[seriesIndex];\n var data = seriesModel.getData();\n var getValueState = linkOthers(seriesIndex) ? function (dataIndex) {\n return selectedDataIndexForLink[dataIndex] ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush';\n } : function (dataIndex) {\n return checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex) ? (seriesBrushSelected.dataIndex.push(data.getRawIndex(dataIndex)), 'inBrush') : 'outOfBrush';\n }; // If no supported brush or no brush, all visuals are in original state.\n\n (linkOthers(seriesIndex) ? hasBrushExists : brushed(rangeInfoList)) && visualSolution.applyVisual(STATE_LIST, visualMappings, data, getValueState);\n });\n });\n dispatchAction(api, throttleType, throttleDelay, brushSelected, payload);\n});\n\nfunction dispatchAction(api, throttleType, throttleDelay, brushSelected, payload) {\n // This event will not be triggered when `setOpion`, otherwise dead lock may\n // triggered when do `setOption` in event listener, which we do not find\n // satisfactory way to solve yet. Some considered resolutions:\n // (a) Diff with prevoius selected data ant only trigger event when changed.\n // But store previous data and diff precisely (i.e., not only by dataIndex, but\n // also detect value changes in selected data) might bring complexity or fragility.\n // (b) Use spectial param like `silent` to suppress event triggering.\n // But such kind of volatile param may be weird in `setOption`.\n if (!payload) {\n return;\n }\n\n var zr = api.getZr();\n\n if (zr[DISPATCH_FLAG]) {\n return;\n }\n\n if (!zr[DISPATCH_METHOD]) {\n zr[DISPATCH_METHOD] = doDispatch;\n }\n\n var fn = throttleUtil.createOrUpdate(zr, DISPATCH_METHOD, throttleDelay, throttleType);\n fn(api, brushSelected);\n}\n\nfunction doDispatch(api, brushSelected) {\n if (!api.isDisposed()) {\n var zr = api.getZr();\n zr[DISPATCH_FLAG] = true;\n api.dispatchAction({\n type: 'brushSelect',\n batch: brushSelected\n });\n zr[DISPATCH_FLAG] = false;\n }\n}\n\nfunction checkInRange(selectorsByBrushType, rangeInfoList, data, dataIndex) {\n for (var i = 0, len = rangeInfoList.length; i < len; i++) {\n var area = rangeInfoList[i];\n\n if (selectorsByBrushType[area.brushType](dataIndex, data, area.selectors, area)) {\n return true;\n }\n }\n}\n\nfunction getSelectorsByBrushType(seriesModel) {\n var brushSelector = seriesModel.brushSelector;\n\n if (zrUtil.isString(brushSelector)) {\n var sels = [];\n zrUtil.each(selector, function (selectorsByElementType, brushType) {\n sels[brushType] = function (dataIndex, data, selectors, area) {\n var itemLayout = data.getItemLayout(dataIndex);\n return selectorsByElementType[brushSelector](itemLayout, selectors, area);\n };\n });\n return sels;\n } else if (zrUtil.isFunction(brushSelector)) {\n var bSelector = {};\n zrUtil.each(selector, function (sel, brushType) {\n bSelector[brushType] = brushSelector;\n });\n return bSelector;\n }\n\n return brushSelector;\n}\n\nfunction brushModelNotControll(brushModel, seriesIndex) {\n var seriesIndices = brushModel.option.seriesIndex;\n return seriesIndices != null && seriesIndices !== 'all' && (zrUtil.isArray(seriesIndices) ? zrUtil.indexOf(seriesIndices, seriesIndex) < 0 : seriesIndex !== seriesIndices);\n}\n\nfunction bindSelector(area) {\n var selectors = area.selectors = {};\n zrUtil.each(selector[area.brushType], function (selFn, elType) {\n // Do not use function binding or curry for performance.\n selectors[elType] = function (itemLayout) {\n return selFn(itemLayout, selectors, area);\n };\n });\n return area;\n}\n\nvar boundingRectBuilders = {\n lineX: zrUtil.noop,\n lineY: zrUtil.noop,\n rect: function (area) {\n return getBoundingRectFromMinMax(area.range);\n },\n polygon: function (area) {\n var minMax;\n var range = area.range;\n\n for (var i = 0, len = range.length; i < len; i++) {\n minMax = minMax || [[Infinity, -Infinity], [Infinity, -Infinity]];\n var rg = range[i];\n rg[0] < minMax[0][0] && (minMax[0][0] = rg[0]);\n rg[0] > minMax[0][1] && (minMax[0][1] = rg[0]);\n rg[1] < minMax[1][0] && (minMax[1][0] = rg[1]);\n rg[1] > minMax[1][1] && (minMax[1][1] = rg[1]);\n }\n\n return minMax && getBoundingRectFromMinMax(minMax);\n }\n};\n\nfunction getBoundingRectFromMinMax(minMax) {\n return new BoundingRect(minMax[0][0], minMax[1][0], minMax[0][1] - minMax[0][0], minMax[1][1] - minMax[1][0]);\n}\n\nexports.layoutCovers = layoutCovers;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./effectScatter/EffectScatterSeries\");\n\nrequire(\"./effectScatter/EffectScatterView\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar layoutPoints = require(\"../layout/points\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerVisual(visualSymbol('effectScatter', 'circle'));\necharts.registerLayout(layoutPoints('effectScatter'));","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar symbolUtil = require(\"../../util/symbol\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction normalizeSymbolSize(symbolSize) {\n if (!zrUtil.isArray(symbolSize)) {\n symbolSize = [+symbolSize, +symbolSize];\n }\n\n return symbolSize;\n}\n\nvar _default = echarts.extendChartView({\n type: 'radar',\n render: function (seriesModel, ecModel, api) {\n var polar = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n\n function createSymbol(data, idx) {\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var color = data.getItemVisual(idx, 'color');\n\n if (symbolType === 'none') {\n return;\n }\n\n var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n var symbolPath = symbolUtil.createSymbol(symbolType, -1, -1, 2, 2, color);\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate') || 0;\n symbolPath.attr({\n style: {\n strokeNoScale: true\n },\n z2: 100,\n scale: [symbolSize[0] / 2, symbolSize[1] / 2],\n rotation: symbolRotate * Math.PI / 180 || 0\n });\n return symbolPath;\n }\n\n function updateSymbols(oldPoints, newPoints, symbolGroup, data, idx, isInit) {\n // Simply rerender all\n symbolGroup.removeAll();\n\n for (var i = 0; i < newPoints.length - 1; i++) {\n var symbolPath = createSymbol(data, idx);\n\n if (symbolPath) {\n symbolPath.__dimIdx = i;\n\n if (oldPoints[i]) {\n symbolPath.attr('position', oldPoints[i]);\n graphic[isInit ? 'initProps' : 'updateProps'](symbolPath, {\n position: newPoints[i]\n }, seriesModel, idx);\n } else {\n symbolPath.attr('position', newPoints[i]);\n }\n\n symbolGroup.add(symbolPath);\n }\n }\n }\n\n function getInitialPoints(points) {\n return zrUtil.map(points, function (pt) {\n return [polar.cx, polar.cy];\n });\n }\n\n data.diff(oldData).add(function (idx) {\n var points = data.getItemLayout(idx);\n\n if (!points) {\n return;\n }\n\n var polygon = new graphic.Polygon();\n var polyline = new graphic.Polyline();\n var target = {\n shape: {\n points: points\n }\n };\n polygon.shape.points = getInitialPoints(points);\n polyline.shape.points = getInitialPoints(points);\n graphic.initProps(polygon, target, seriesModel, idx);\n graphic.initProps(polyline, target, seriesModel, idx);\n var itemGroup = new graphic.Group();\n var symbolGroup = new graphic.Group();\n itemGroup.add(polyline);\n itemGroup.add(polygon);\n itemGroup.add(symbolGroup);\n updateSymbols(polyline.shape.points, points, symbolGroup, data, idx, true);\n data.setItemGraphicEl(idx, itemGroup);\n }).update(function (newIdx, oldIdx) {\n var itemGroup = oldData.getItemGraphicEl(oldIdx);\n var polyline = itemGroup.childAt(0);\n var polygon = itemGroup.childAt(1);\n var symbolGroup = itemGroup.childAt(2);\n var target = {\n shape: {\n points: data.getItemLayout(newIdx)\n }\n };\n\n if (!target.shape.points) {\n return;\n }\n\n updateSymbols(polyline.shape.points, target.shape.points, symbolGroup, data, newIdx, false);\n graphic.updateProps(polyline, target, seriesModel);\n graphic.updateProps(polygon, target, seriesModel);\n data.setItemGraphicEl(newIdx, itemGroup);\n }).remove(function (idx) {\n group.remove(oldData.getItemGraphicEl(idx));\n }).execute();\n data.eachItemGraphicEl(function (itemGroup, idx) {\n var itemModel = data.getItemModel(idx);\n var polyline = itemGroup.childAt(0);\n var polygon = itemGroup.childAt(1);\n var symbolGroup = itemGroup.childAt(2);\n var color = data.getItemVisual(idx, 'color');\n group.add(itemGroup);\n polyline.useStyle(zrUtil.defaults(itemModel.getModel('lineStyle').getLineStyle(), {\n fill: 'none',\n stroke: color\n }));\n polyline.hoverStyle = itemModel.getModel('emphasis.lineStyle').getLineStyle();\n var areaStyleModel = itemModel.getModel('areaStyle');\n var hoverAreaStyleModel = itemModel.getModel('emphasis.areaStyle');\n var polygonIgnore = areaStyleModel.isEmpty() && areaStyleModel.parentModel.isEmpty();\n var hoverPolygonIgnore = hoverAreaStyleModel.isEmpty() && hoverAreaStyleModel.parentModel.isEmpty();\n hoverPolygonIgnore = hoverPolygonIgnore && polygonIgnore;\n polygon.ignore = polygonIgnore;\n polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), {\n fill: color,\n opacity: 0.7\n }));\n polygon.hoverStyle = hoverAreaStyleModel.getAreaStyle();\n var itemStyle = itemModel.getModel('itemStyle').getItemStyle(['color']);\n var itemHoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n var labelModel = itemModel.getModel('label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n symbolGroup.eachChild(function (symbolPath) {\n symbolPath.setStyle(itemStyle);\n symbolPath.hoverStyle = zrUtil.clone(itemHoverStyle);\n var defaultText = data.get(data.dimensions[symbolPath.__dimIdx], idx);\n (defaultText == null || isNaN(defaultText)) && (defaultText = '');\n graphic.setLabelStyle(symbolPath.style, symbolPath.hoverStyle, labelModel, labelHoverModel, {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n labelDimIndex: symbolPath.__dimIdx,\n defaultText: defaultText,\n autoColor: color,\n isRectText: true\n });\n });\n\n itemGroup.highDownOnUpdate = function (fromState, toState) {\n polygon.attr('ignore', toState === 'emphasis' ? hoverPolygonIgnore : polygonIgnore);\n };\n\n graphic.setHoverStyle(itemGroup);\n });\n this._data = data;\n },\n remove: function () {\n this.group.removeAll();\n this._data = null;\n },\n dispose: function () {}\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./scatter/ScatterSeries\");\n\nrequire(\"./scatter/ScatterView\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar layoutPoints = require(\"../layout/points\");\n\nrequire(\"../component/gridSimple\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// import * as zrUtil from 'zrender/src/core/util';\n// In case developer forget to include grid component\necharts.registerVisual(visualSymbol('scatter', 'circle'));\necharts.registerLayout(layoutPoints('scatter')); // echarts.registerProcessor(function (ecModel, api) {\n// ecModel.eachSeriesByType('scatter', function (seriesModel) {\n// var data = seriesModel.getData();\n// var coordSys = seriesModel.coordinateSystem;\n// if (coordSys.type !== 'geo') {\n// return;\n// }\n// var startPt = coordSys.pointToData([0, 0]);\n// var endPt = coordSys.pointToData([api.getWidth(), api.getHeight()]);\n// var dims = zrUtil.map(coordSys.dimensions, function (dim) {\n// return data.mapDimension(dim);\n// });\n// var range = {};\n// range[dims[0]] = [Math.min(startPt[0], endPt[0]), Math.max(startPt[0], endPt[0])];\n// range[dims[1]] = [Math.min(startPt[1], endPt[1]), Math.max(startPt[1], endPt[1])];\n// data.selectRange(range);\n// });\n// });","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar axisDefault = require(\"../axisDefault\");\n\nvar Model = require(\"../../model/Model\");\n\nvar axisModelCommonMixin = require(\"../axisModelCommonMixin\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar valueAxisDefault = axisDefault.valueAxis;\n\nfunction defaultsShow(opt, show) {\n return zrUtil.defaults({\n show: show\n }, opt);\n}\n\nvar RadarModel = echarts.extendComponentModel({\n type: 'radar',\n optionUpdated: function () {\n var boundaryGap = this.get('boundaryGap');\n var splitNumber = this.get('splitNumber');\n var scale = this.get('scale');\n var axisLine = this.get('axisLine');\n var axisTick = this.get('axisTick');\n var axisType = this.get('axisType');\n var axisLabel = this.get('axisLabel');\n var nameTextStyle = this.get('name');\n var showName = this.get('name.show');\n var nameFormatter = this.get('name.formatter');\n var nameGap = this.get('nameGap');\n var triggerEvent = this.get('triggerEvent');\n var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) {\n // PENDING\n if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) {\n indicatorOpt.min = 0;\n } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) {\n indicatorOpt.max = 0;\n }\n\n var iNameTextStyle = nameTextStyle;\n\n if (indicatorOpt.color != null) {\n iNameTextStyle = zrUtil.defaults({\n color: indicatorOpt.color\n }, nameTextStyle);\n } // Use same configuration\n\n\n indicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), {\n boundaryGap: boundaryGap,\n splitNumber: splitNumber,\n scale: scale,\n axisLine: axisLine,\n axisTick: axisTick,\n axisType: axisType,\n axisLabel: axisLabel,\n // Compatible with 2 and use text\n name: indicatorOpt.text,\n nameLocation: 'end',\n nameGap: nameGap,\n // min: 0,\n nameTextStyle: iNameTextStyle,\n triggerEvent: triggerEvent\n }, false);\n\n if (!showName) {\n indicatorOpt.name = '';\n }\n\n if (typeof nameFormatter === 'string') {\n var indName = indicatorOpt.name;\n indicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : '');\n } else if (typeof nameFormatter === 'function') {\n indicatorOpt.name = nameFormatter(indicatorOpt.name, indicatorOpt);\n }\n\n var model = zrUtil.extend(new Model(indicatorOpt, null, this.ecModel), axisModelCommonMixin); // For triggerEvent.\n\n model.mainType = 'radar';\n model.componentIndex = this.componentIndex;\n return model;\n }, this);\n\n this.getIndicatorModels = function () {\n return indicatorModels;\n };\n },\n defaultOption: {\n zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '75%',\n startAngle: 90,\n name: {\n show: true // formatter: null\n // textStyle: {}\n\n },\n boundaryGap: [0, 0],\n splitNumber: 5,\n nameGap: 15,\n scale: false,\n // Polygon or circle\n shape: 'polygon',\n axisLine: zrUtil.merge({\n lineStyle: {\n color: '#bbb'\n }\n }, valueAxisDefault.axisLine),\n axisLabel: defaultsShow(valueAxisDefault.axisLabel, false),\n axisTick: defaultsShow(valueAxisDefault.axisTick, false),\n axisType: 'interval',\n splitLine: defaultsShow(valueAxisDefault.splitLine, true),\n splitArea: defaultsShow(valueAxisDefault.splitArea, true),\n // {text, min, max}\n indicator: []\n }\n});\nvar _default = RadarModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar coordsOffsetMap = {\n '南海诸岛': [32, 80],\n // 全国\n '广东': [0, -10],\n '香港': [10, 5],\n '澳门': [-10, 10],\n //'北京': [-10, 0],\n '天津': [5, 5]\n};\n\nfunction _default(mapType, region) {\n if (mapType === 'china') {\n var coordFix = coordsOffsetMap[region.name];\n\n if (coordFix) {\n var cp = region.center;\n cp[0] += coordFix[0] / 10.5;\n cp[1] += -coordFix[1] / (10.5 / 0.75);\n }\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar BaseBarSeries = require(\"./BaseBarSeries\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = BaseBarSeries.extend({\n type: 'series.bar',\n dependencies: ['grid', 'polar'],\n brushSelector: 'rect',\n\n /**\n * @override\n */\n getProgressive: function () {\n // Do not support progressive in normal mode.\n return this.get('large') ? this.get('progressive') : false;\n },\n\n /**\n * @override\n */\n getProgressiveThreshold: function () {\n // Do not support progressive in normal mode.\n var progressiveThreshold = this.get('progressiveThreshold');\n var largeThreshold = this.get('largeThreshold');\n\n if (largeThreshold > progressiveThreshold) {\n progressiveThreshold = largeThreshold;\n }\n\n return progressiveThreshold;\n },\n defaultOption: {\n // If clipped\n // Only available on cartesian2d\n clip: true,\n // If use caps on two sides of bars\n // Only available on tangential polar bar\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 }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar MarkerModel = require(\"./MarkerModel\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = MarkerModel.extend({\n type: 'markLine',\n defaultOption: {\n zlevel: 0,\n z: 5,\n symbol: ['circle', 'arrow'],\n symbolSize: [8, 16],\n //symbolRotate: 0,\n precision: 2,\n tooltip: {\n trigger: 'item'\n },\n label: {\n show: true,\n position: 'end',\n distance: 5\n },\n lineStyle: {\n type: 'dashed'\n },\n emphasis: {\n label: {\n show: true\n },\n lineStyle: {\n width: 3\n }\n },\n animationEasing: 'linear'\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar ChartView = require(\"../../view/Chart\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar Path = require(\"zrender/lib/graphic/Path\");\n\nvar _createClipPathFromCoordSys = require(\"../helper/createClipPathFromCoordSys\");\n\nvar createClipPath = _createClipPathFromCoordSys.createClipPath;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar NORMAL_ITEM_STYLE_PATH = ['itemStyle'];\nvar EMPHASIS_ITEM_STYLE_PATH = ['emphasis', 'itemStyle'];\nvar SKIP_PROPS = ['color', 'color0', 'borderColor', 'borderColor0'];\nvar CandlestickView = ChartView.extend({\n type: 'candlestick',\n render: function (seriesModel, ecModel, api) {\n // If there is clipPath created in large mode. Remove it.\n this.group.removeClipPath();\n\n this._updateDrawMode(seriesModel);\n\n this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel);\n },\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n this._clear();\n\n this._updateDrawMode(seriesModel);\n },\n incrementalRender: function (params, seriesModel, ecModel, api) {\n this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel);\n },\n _updateDrawMode: function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n\n if (this._isLargeDraw == null || isLargeDraw ^ this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n\n this._clear();\n }\n },\n _renderNormal: function (seriesModel) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n var isSimpleBox = data.getLayout('isSimpleBox');\n var needsClip = seriesModel.get('clip', true);\n var coord = seriesModel.coordinateSystem;\n var clipArea = coord.getArea && coord.getArea(); // There is no old data only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n\n if (!this._data) {\n group.removeAll();\n }\n\n data.diff(oldData).add(function (newIdx) {\n if (data.hasValue(newIdx)) {\n var el;\n var itemLayout = data.getItemLayout(newIdx);\n\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n return;\n }\n\n el = createNormalBox(itemLayout, newIdx, true);\n graphic.initProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }\n }).update(function (newIdx, oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx); // Empty data\n\n if (!data.hasValue(newIdx)) {\n group.remove(el);\n return;\n }\n\n var itemLayout = data.getItemLayout(newIdx);\n\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n group.remove(el);\n return;\n }\n\n if (!el) {\n el = createNormalBox(itemLayout, newIdx);\n } else {\n graphic.updateProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n }\n\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n }).execute();\n this._data = data;\n },\n _renderLarge: function (seriesModel) {\n this._clear();\n\n createLarge(seriesModel, this.group);\n var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;\n\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n },\n _incrementalRenderNormal: function (params, seriesModel) {\n var data = seriesModel.getData();\n var isSimpleBox = data.getLayout('isSimpleBox');\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var el;\n var itemLayout = data.getItemLayout(dataIndex);\n el = createNormalBox(itemLayout, dataIndex);\n setBoxCommon(el, data, dataIndex, isSimpleBox);\n el.incremental = true;\n this.group.add(el);\n }\n },\n _incrementalRenderLarge: function (params, seriesModel) {\n createLarge(seriesModel, this.group, true);\n },\n remove: function (ecModel) {\n this._clear();\n },\n _clear: function () {\n this.group.removeAll();\n this._data = null;\n },\n dispose: zrUtil.noop\n});\nvar NormalBoxPath = Path.extend({\n type: 'normalCandlestickBox',\n shape: {},\n buildPath: function (ctx, shape) {\n var ends = shape.points;\n\n if (this.__simpleBox) {\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[6][0], ends[6][1]);\n } else {\n ctx.moveTo(ends[0][0], ends[0][1]);\n ctx.lineTo(ends[1][0], ends[1][1]);\n ctx.lineTo(ends[2][0], ends[2][1]);\n ctx.lineTo(ends[3][0], ends[3][1]);\n ctx.closePath();\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[5][0], ends[5][1]);\n ctx.moveTo(ends[6][0], ends[6][1]);\n ctx.lineTo(ends[7][0], ends[7][1]);\n }\n }\n});\n\nfunction createNormalBox(itemLayout, dataIndex, isInit) {\n var ends = itemLayout.ends;\n return new NormalBoxPath({\n shape: {\n points: isInit ? transInit(ends, itemLayout) : ends\n },\n z2: 100\n });\n}\n\nfunction isNormalBoxClipped(clipArea, itemLayout) {\n var clipped = true;\n\n for (var i = 0; i < itemLayout.ends.length; i++) {\n // If any point are in the region.\n if (clipArea.contain(itemLayout.ends[i][0], itemLayout.ends[i][1])) {\n clipped = false;\n break;\n }\n }\n\n return clipped;\n}\n\nfunction setBoxCommon(el, data, dataIndex, isSimpleBox) {\n var itemModel = data.getItemModel(dataIndex);\n var normalItemStyleModel = itemModel.getModel(NORMAL_ITEM_STYLE_PATH);\n var color = data.getItemVisual(dataIndex, 'color');\n var borderColor = data.getItemVisual(dataIndex, 'borderColor') || color; // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n\n var itemStyle = normalItemStyleModel.getItemStyle(SKIP_PROPS);\n el.useStyle(itemStyle);\n el.style.strokeNoScale = true;\n el.style.fill = color;\n el.style.stroke = borderColor;\n el.__simpleBox = isSimpleBox;\n var hoverStyle = itemModel.getModel(EMPHASIS_ITEM_STYLE_PATH).getItemStyle();\n graphic.setHoverStyle(el, hoverStyle);\n}\n\nfunction transInit(points, itemLayout) {\n return zrUtil.map(points, function (point) {\n point = point.slice();\n point[1] = itemLayout.initBaseline;\n return point;\n });\n}\n\nvar LargeBoxPath = Path.extend({\n type: 'largeCandlestickBox',\n shape: {},\n 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\n for (var i = 0; i < points.length;) {\n if (this.__sign === points[i++]) {\n var x = points[i++];\n ctx.moveTo(x, points[i++]);\n ctx.lineTo(x, points[i++]);\n } else {\n i += 3;\n }\n }\n }\n});\n\nfunction createLarge(seriesModel, group, incremental) {\n var data = seriesModel.getData();\n var largePoints = data.getLayout('largePoints');\n var elP = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: 1\n });\n group.add(elP);\n var elN = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: -1\n });\n group.add(elN);\n setLargeStyle(1, elP, seriesModel, data);\n setLargeStyle(-1, elN, seriesModel, data);\n\n if (incremental) {\n elP.incremental = true;\n elN.incremental = true;\n }\n}\n\nfunction setLargeStyle(sign, el, seriesModel, data) {\n var suffix = sign > 0 ? 'P' : 'N';\n var borderColor = data.getVisual('borderColor' + suffix) || data.getVisual('color' + suffix); // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n\n var itemStyle = seriesModel.getModel(NORMAL_ITEM_STYLE_PATH).getItemStyle(SKIP_PROPS);\n el.useStyle(itemStyle);\n el.style.fill = null;\n el.style.stroke = borderColor; // No different\n // el.style.lineWidth = .5;\n}\n\nvar _default = CandlestickView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar ChartView = require(\"../../view/Chart\");\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 * @param {module:echarts/model/Series} seriesModel\n * @param {boolean} hasAnimation\n * @inner\n */\nfunction updateDataSelected(uid, seriesModel, hasAnimation, api) {\n var data = seriesModel.getData();\n var dataIndex = this.dataIndex;\n var name = data.getName(dataIndex);\n var selectedOffset = seriesModel.get('selectedOffset');\n api.dispatchAction({\n type: 'pieToggleSelect',\n from: uid,\n name: name,\n seriesId: seriesModel.id\n });\n data.each(function (idx) {\n toggleItemSelected(data.getItemGraphicEl(idx), data.getItemLayout(idx), seriesModel.isSelected(data.getName(idx)), selectedOffset, hasAnimation);\n });\n}\n/**\n * @param {module:zrender/graphic/Sector} el\n * @param {Object} layout\n * @param {boolean} isSelected\n * @param {number} selectedOffset\n * @param {boolean} hasAnimation\n * @inner\n */\n\n\nfunction toggleItemSelected(el, layout, isSelected, selectedOffset, hasAnimation) {\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n var dx = Math.cos(midAngle);\n var dy = Math.sin(midAngle);\n var offset = isSelected ? selectedOffset : 0;\n var position = [dx * offset, dy * offset];\n hasAnimation // animateTo will stop revious animation like update transition\n ? el.animate().when(200, {\n position: position\n }).start('bounceOut') : el.attr('position', position);\n}\n/**\n * Piece of pie including Sector, Label, LabelLine\n * @constructor\n * @extends {module:zrender/graphic/Group}\n */\n\n\nfunction PiePiece(data, idx) {\n graphic.Group.call(this);\n var sector = new graphic.Sector({\n z2: 2\n });\n var polyline = new graphic.Polyline();\n var text = new graphic.Text();\n this.add(sector);\n this.add(polyline);\n this.add(text);\n this.updateData(data, idx, true);\n}\n\nvar piePieceProto = PiePiece.prototype;\n\npiePieceProto.updateData = function (data, idx, firstCreate) {\n var sector = this.childAt(0);\n var labelLine = this.childAt(1);\n var labelText = this.childAt(2);\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var layout = data.getItemLayout(idx);\n var sectorShape = zrUtil.extend({}, layout);\n sectorShape.label = null;\n var animationTypeUpdate = seriesModel.getShallow('animationTypeUpdate');\n\n if (firstCreate) {\n sector.setShape(sectorShape);\n var animationType = seriesModel.getShallow('animationType');\n\n if (animationType === 'scale') {\n sector.shape.r = layout.r0;\n graphic.initProps(sector, {\n shape: {\n r: layout.r\n }\n }, seriesModel, idx);\n } // Expansion\n else {\n sector.shape.endAngle = layout.startAngle;\n graphic.updateProps(sector, {\n shape: {\n endAngle: layout.endAngle\n }\n }, seriesModel, idx);\n }\n } else {\n if (animationTypeUpdate === 'expansion') {\n // Sectors are set to be target shape and an overlaying clipPath is used for animation\n sector.setShape(sectorShape);\n } else {\n // Transition animation from the old shape\n graphic.updateProps(sector, {\n shape: sectorShape\n }, seriesModel, idx);\n }\n } // Update common style\n\n\n var visualColor = data.getItemVisual(idx, 'color');\n sector.useStyle(zrUtil.defaults({\n lineJoin: 'bevel',\n fill: visualColor\n }, itemModel.getModel('itemStyle').getItemStyle()));\n sector.hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && sector.attr('cursor', cursorStyle); // Toggle selected\n\n toggleItemSelected(this, data.getItemLayout(idx), seriesModel.isSelected(data.getName(idx)), seriesModel.get('selectedOffset'), seriesModel.get('animation')); // Label and text animation should be applied only for transition type animation when update\n\n var withAnimation = !firstCreate && animationTypeUpdate === 'transition';\n\n this._updateLabel(data, idx, withAnimation);\n\n this.highDownOnUpdate = !seriesModel.get('silent') ? function (fromState, toState) {\n var hasAnimation = seriesModel.isAnimationEnabled() && itemModel.get('hoverAnimation');\n\n if (toState === 'emphasis') {\n labelLine.ignore = labelLine.hoverIgnore;\n labelText.ignore = labelText.hoverIgnore; // Sector may has animation of updating data. Force to move to the last frame\n // Or it may stopped on the wrong shape\n\n if (hasAnimation) {\n sector.stopAnimation(true);\n sector.animateTo({\n shape: {\n r: layout.r + seriesModel.get('hoverOffset')\n }\n }, 300, 'elasticOut');\n }\n } else {\n labelLine.ignore = labelLine.normalIgnore;\n labelText.ignore = labelText.normalIgnore;\n\n if (hasAnimation) {\n sector.stopAnimation(true);\n sector.animateTo({\n shape: {\n r: layout.r\n }\n }, 300, 'elasticOut');\n }\n }\n } : null;\n graphic.setHoverStyle(this);\n};\n\npiePieceProto._updateLabel = function (data, idx, withAnimation) {\n var labelLine = this.childAt(1);\n var labelText = this.childAt(2);\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var layout = data.getItemLayout(idx);\n var labelLayout = layout.label;\n var visualColor = data.getItemVisual(idx, 'color');\n\n if (!labelLayout || isNaN(labelLayout.x) || isNaN(labelLayout.y)) {\n labelText.ignore = labelText.normalIgnore = labelText.hoverIgnore = labelLine.ignore = labelLine.normalIgnore = labelLine.hoverIgnore = true;\n return;\n }\n\n var targetLineShape = {\n points: labelLayout.linePoints || [[labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y], [labelLayout.x, labelLayout.y]]\n };\n var targetTextStyle = {\n x: labelLayout.x,\n y: labelLayout.y\n };\n\n if (withAnimation) {\n graphic.updateProps(labelLine, {\n shape: targetLineShape\n }, seriesModel, idx);\n graphic.updateProps(labelText, {\n style: targetTextStyle\n }, seriesModel, idx);\n } else {\n labelLine.attr({\n shape: targetLineShape\n });\n labelText.attr({\n style: targetTextStyle\n });\n }\n\n labelText.attr({\n rotation: labelLayout.rotation,\n origin: [labelLayout.x, labelLayout.y],\n z2: 10\n });\n var labelModel = itemModel.getModel('label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n var labelLineModel = itemModel.getModel('labelLine');\n var labelLineHoverModel = itemModel.getModel('emphasis.labelLine');\n var visualColor = data.getItemVisual(idx, 'color');\n graphic.setLabelStyle(labelText.style, labelText.hoverStyle = {}, labelModel, labelHoverModel, {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n defaultText: labelLayout.text,\n autoColor: visualColor,\n useInsideStyle: !!labelLayout.inside\n }, {\n textAlign: labelLayout.textAlign,\n textVerticalAlign: labelLayout.verticalAlign,\n opacity: data.getItemVisual(idx, 'opacity')\n });\n labelText.ignore = labelText.normalIgnore = !labelModel.get('show');\n labelText.hoverIgnore = !labelHoverModel.get('show');\n labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show');\n labelLine.hoverIgnore = !labelLineHoverModel.get('show'); // Default use item visual color\n\n labelLine.setStyle({\n stroke: visualColor,\n opacity: data.getItemVisual(idx, 'opacity')\n });\n labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle());\n labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle();\n var smooth = labelLineModel.get('smooth');\n\n if (smooth && smooth === true) {\n smooth = 0.4;\n }\n\n labelLine.setShape({\n smooth: smooth\n });\n};\n\nzrUtil.inherits(PiePiece, graphic.Group); // Pie view\n\nvar PieView = ChartView.extend({\n type: 'pie',\n init: function () {\n var sectorGroup = new graphic.Group();\n this._sectorGroup = sectorGroup;\n },\n render: function (seriesModel, ecModel, api, payload) {\n if (payload && payload.from === this.uid) {\n return;\n }\n\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n var hasAnimation = ecModel.get('animation');\n var isFirstRender = !oldData;\n var animationType = seriesModel.get('animationType');\n var animationTypeUpdate = seriesModel.get('animationTypeUpdate');\n var onSectorClick = zrUtil.curry(updateDataSelected, this.uid, seriesModel, hasAnimation, api);\n var selectedMode = seriesModel.get('selectedMode');\n data.diff(oldData).add(function (idx) {\n var piePiece = new PiePiece(data, idx); // Default expansion animation\n\n if (isFirstRender && animationType !== 'scale') {\n piePiece.eachChild(function (child) {\n child.stopAnimation(true);\n });\n }\n\n selectedMode && piePiece.on('click', onSectorClick);\n data.setItemGraphicEl(idx, piePiece);\n group.add(piePiece);\n }).update(function (newIdx, oldIdx) {\n var piePiece = oldData.getItemGraphicEl(oldIdx);\n\n if (!isFirstRender && animationTypeUpdate !== 'transition') {\n piePiece.eachChild(function (child) {\n child.stopAnimation(true);\n });\n }\n\n piePiece.updateData(data, newIdx);\n piePiece.off('click');\n selectedMode && piePiece.on('click', onSectorClick);\n group.add(piePiece);\n data.setItemGraphicEl(newIdx, piePiece);\n }).remove(function (idx) {\n var piePiece = oldData.getItemGraphicEl(idx);\n group.remove(piePiece);\n }).execute();\n\n if (hasAnimation && data.count() > 0 && (isFirstRender ? animationType !== 'scale' : animationTypeUpdate !== 'transition')) {\n var shape = data.getItemLayout(0);\n\n for (var s = 1; isNaN(shape.startAngle) && s < data.count(); ++s) {\n shape = data.getItemLayout(s);\n }\n\n var r = Math.max(api.getWidth(), api.getHeight()) / 2;\n var removeClipPath = zrUtil.bind(group.removeClipPath, group);\n group.setClipPath(this._createClipPath(shape.cx, shape.cy, r, shape.startAngle, shape.clockwise, removeClipPath, seriesModel, isFirstRender));\n } else {\n // clipPath is used in first-time animation, so remove it when otherwise. See: #8994\n group.removeClipPath();\n }\n\n this._data = data;\n },\n dispose: function () {},\n _createClipPath: function (cx, cy, r, startAngle, clockwise, cb, seriesModel, isFirstRender) {\n var clipPath = new graphic.Sector({\n shape: {\n cx: cx,\n cy: cy,\n r0: 0,\n r: r,\n startAngle: startAngle,\n endAngle: startAngle,\n clockwise: clockwise\n }\n });\n var initOrUpdate = isFirstRender ? graphic.initProps : graphic.updateProps;\n initOrUpdate(clipPath, {\n shape: {\n endAngle: startAngle + (clockwise ? 1 : -1) * Math.PI * 2\n }\n }, seriesModel, cb);\n return clipPath;\n },\n\n /**\n * @implement\n */\n containPoint: function (point, seriesModel) {\n var data = seriesModel.getData();\n var itemLayout = data.getItemLayout(0);\n\n if (itemLayout) {\n var dx = point[0] - itemLayout.cx;\n var dy = point[1] - itemLayout.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n return radius <= itemLayout.r && radius >= itemLayout.r0;\n }\n }\n});\nvar _default = PieView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar vec2 = require(\"zrender/lib/core/vector\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _multipleGraphEdgeHelper = require(\"../helper/multipleGraphEdgeHelper\");\n\nvar getCurvenessForEdge = _multipleGraphEdgeHelper.getCurvenessForEdge;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction simpleLayout(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n\n var graph = seriesModel.getGraph();\n graph.eachNode(function (node) {\n var model = node.getModel();\n node.setLayout([+model.get('x'), +model.get('y')]);\n });\n simpleLayoutEdge(graph, seriesModel);\n}\n\nfunction simpleLayoutEdge(graph, seriesModel) {\n graph.eachEdge(function (edge, index) {\n var curveness = zrUtil.retrieve3(edge.getModel().get('lineStyle.curveness'), -getCurvenessForEdge(edge, seriesModel, index, true), 0);\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var points = [p1, p2];\n\n if (+curveness) {\n points.push([(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * curveness]);\n }\n\n edge.setLayout(points);\n });\n}\n\nexports.simpleLayout = simpleLayout;\nexports.simpleLayoutEdge = simpleLayoutEdge;","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./chart.vue?vue&type=style&index=0&lang=scss&\"","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Path = require(\"zrender/lib/graphic/Path\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = Path.extend({\n type: 'echartsGaugePointer',\n shape: {\n angle: 0,\n width: 10,\n r: 10,\n x: 0,\n y: 0\n },\n buildPath: function (ctx, shape) {\n var mathCos = Math.cos;\n var mathSin = Math.sin;\n var r = shape.r;\n var width = shape.width;\n var angle = shape.angle;\n var x = shape.x - mathCos(angle) * width * (width >= r / 3 ? 1 : 2);\n var y = shape.y - mathSin(angle) * width * (width >= r / 3 ? 1 : 2);\n angle = shape.angle - Math.PI / 2;\n ctx.moveTo(x, y);\n ctx.lineTo(shape.x + mathCos(angle) * width, shape.y + mathSin(angle) * width);\n ctx.lineTo(shape.x + mathCos(shape.angle) * r, shape.y + mathSin(shape.angle) * r);\n ctx.lineTo(shape.x - mathCos(angle) * width, shape.y - mathSin(angle) * width);\n ctx.lineTo(x, y);\n return;\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar modelUtil = require(\"../../util/model\");\n\nvar ComponentModel = require(\"../../model/Component\");\n\nvar Model = require(\"../../model/Model\");\n\nvar selectableMixin = require(\"../../component/helper/selectableMixin\");\n\nvar geoCreator = require(\"./geoCreator\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar GeoModel = ComponentModel.extend({\n type: 'geo',\n\n /**\n * @type {module:echarts/coord/geo/Geo}\n */\n coordinateSystem: null,\n layoutMode: 'box',\n init: function (option) {\n ComponentModel.prototype.init.apply(this, arguments); // Default label emphasis `show`\n\n modelUtil.defaultEmphasis(option, 'label', ['show']);\n },\n optionUpdated: function () {\n var option = this.option;\n var self = this;\n option.regions = geoCreator.getFilledRegions(option.regions, option.map, option.nameMap);\n this._optionModelMap = zrUtil.reduce(option.regions || [], function (optionModelMap, regionOpt) {\n if (regionOpt.name) {\n optionModelMap.set(regionOpt.name, new Model(regionOpt, self));\n }\n\n return optionModelMap;\n }, zrUtil.createHashMap());\n this.updateSelectedMap(option.regions);\n },\n defaultOption: {\n zlevel: 0,\n z: 0,\n show: true,\n left: 'center',\n top: 'center',\n // width:,\n // height:,\n // right\n // bottom\n // Aspect is width / height. Inited to be geoJson bbox aspect\n // This parameter is used for scale this aspect\n // If svg used, aspectScale is 1 by default.\n // aspectScale: 0.75,\n aspectScale: null,\n ///// Layout with center and size\n // If you wan't to put map in a fixed size box with right aspect ratio\n // This two properties may more conveninet\n // layoutCenter: [50%, 50%]\n // layoutSize: 100\n silent: false,\n // Map type\n map: '',\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ]\n boundingCoords: null,\n // Default on center of map\n center: null,\n zoom: 1,\n scaleLimit: null,\n // selectedMode: false\n label: {\n show: false,\n color: '#000'\n },\n itemStyle: {\n // color: 各异,\n borderWidth: 0.5,\n borderColor: '#444',\n color: '#eee'\n },\n emphasis: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n color: 'rgba(255,215,0,0.8)'\n }\n },\n regions: []\n },\n\n /**\n * Get model of region\n * @param {string} name\n * @return {module:echarts/model/Model}\n */\n getRegionModel: function (name) {\n return this._optionModelMap.get(name) || new Model(null, this, this.ecModel);\n },\n\n /**\n * Format label\n * @param {string} name Region name\n * @param {string} [status='normal'] 'normal' or 'emphasis'\n * @return {string}\n */\n getFormattedLabel: function (name, status) {\n status = status || 'normal';\n var regionModel = this.getRegionModel(name);\n var formatter = regionModel.get((status === 'normal' ? '' : status + '.') + 'label.formatter');\n var params = {\n name: name\n };\n\n if (typeof formatter === 'function') {\n params.status = status;\n return formatter(params);\n } else if (typeof formatter === 'string') {\n return formatter.replace('{a}', name != null ? name : '');\n }\n },\n setZoom: function (zoom) {\n this.option.zoom = zoom;\n },\n setCenter: function (center) {\n this.option.center = center;\n }\n});\nzrUtil.mixin(GeoModel, selectableMixin);\nvar _default = GeoModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar features = {};\n\nfunction register(name, ctor) {\n features[name] = ctor;\n}\n\nfunction get(name) {\n return features[name];\n}\n\nexports.register = register;\nexports.get = get;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar Tree = require(\"../../data/Tree\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\n\nvar Model = require(\"../../model/Model\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.tree',\n layoutInfo: null,\n // can support the position parameters 'left', 'top','right','bottom', 'width',\n // 'height' in the setOption() with 'merge' mode normal.\n layoutMode: 'box',\n\n /**\n * Init a tree data structure from data in option series\n * @param {Object} option the object used to config echarts view\n * @return {module:echarts/data/List} storage initial data\n */\n getInitialData: function (option) {\n //create an virtual root\n var root = {\n name: option.name,\n children: option.data\n };\n var leaves = option.leaves || {};\n var leavesModel = new Model(leaves, this, this.ecModel);\n var tree = Tree.createTree(root, this, beforeLink);\n\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n\n if (!node.children.length || !node.isExpand) {\n model.parentModel = leavesModel;\n }\n\n return model;\n });\n }\n\n var treeDepth = 0;\n tree.eachNode('preorder', function (node) {\n if (node.depth > treeDepth) {\n treeDepth = node.depth;\n }\n });\n var expandAndCollapse = option.expandAndCollapse;\n var expandTreeDepth = expandAndCollapse && option.initialTreeDepth >= 0 ? option.initialTreeDepth : treeDepth;\n tree.root.eachNode('preorder', function (node) {\n var item = node.hostTree.data.getRawDataItem(node.dataIndex); // Add item.collapsed != null, because users can collapse node original in the series.data.\n\n node.isExpand = item && item.collapsed != null ? !item.collapsed : node.depth <= expandTreeDepth;\n });\n return tree.data;\n },\n\n /**\n * Make the configuration 'orient' backward compatibly, with 'horizontal = LR', 'vertical = TB'.\n * @returns {string} orient\n */\n getOrient: function () {\n var orient = this.get('orient');\n\n if (orient === 'horizontal') {\n orient = 'LR';\n } else if (orient === 'vertical') {\n orient = 'TB';\n }\n\n return orient;\n },\n setZoom: function (zoom) {\n this.option.zoom = zoom;\n },\n setCenter: function (center) {\n this.option.center = center;\n },\n\n /**\n * @override\n * @param {number} dataIndex\n */\n formatTooltip: function (dataIndex) {\n var tree = this.getData().tree;\n var realRoot = tree.root.children[0];\n var node = tree.getNodeByDataIndex(dataIndex);\n var value = node.getValue();\n var name = node.name;\n\n while (node && node !== realRoot) {\n name = node.parentNode.name + '.' + name;\n node = node.parentNode;\n }\n\n return encodeHTML(name + (isNaN(value) || value == null ? '' : ' : ' + value));\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n // the position of the whole view\n left: '12%',\n top: '12%',\n right: '12%',\n bottom: '12%',\n // the layout of the tree, two value can be selected, 'orthogonal' or 'radial'\n layout: 'orthogonal',\n // value can be 'polyline'\n edgeShape: 'curve',\n edgeForkPosition: '50%',\n // true | false | 'move' | 'scale', see module:component/helper/RoamController.\n roam: false,\n // Symbol size scale ratio in roam\n nodeScaleRatio: 0.4,\n // Default on center of graph\n center: null,\n zoom: 1,\n // The orient of orthoginal layout, can be setted to 'LR', 'TB', 'RL', 'BT'.\n // and the backward compatibility configuration 'horizontal = LR', 'vertical = TB'.\n orient: 'LR',\n symbol: 'emptyCircle',\n symbolSize: 7,\n expandAndCollapse: true,\n initialTreeDepth: 2,\n lineStyle: {\n color: '#ccc',\n width: 1.5,\n curveness: 0.5\n },\n itemStyle: {\n color: 'lightsteelblue',\n borderColor: '#c23531',\n borderWidth: 1.5\n },\n label: {\n show: true,\n color: '#555'\n },\n leaves: {\n label: {\n show: true\n }\n },\n animationEasing: 'linear',\n animationDuration: 700,\n animationDurationUpdate: 1000\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Component = require(\"../../model/Component\");\n\nrequire(\"./AxisModel\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = Component.extend({\n type: 'parallel',\n dependencies: ['parallelAxis'],\n\n /**\n * @type {module:echarts/coord/parallel/Parallel}\n */\n coordinateSystem: null,\n\n /**\n * Each item like: 'dim0', 'dim1', 'dim2', ...\n * @type {Array.}\n * @readOnly\n */\n dimensions: null,\n\n /**\n * Coresponding to dimensions.\n * @type {Array.}\n * @readOnly\n */\n parallelAxisIndex: null,\n layoutMode: 'box',\n defaultOption: {\n zlevel: 0,\n z: 0,\n left: 80,\n top: 60,\n right: 80,\n bottom: 60,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n layout: 'horizontal',\n // 'horizontal' or 'vertical'\n // FIXME\n // naming?\n axisExpandable: false,\n axisExpandCenter: null,\n axisExpandCount: 0,\n axisExpandWidth: 50,\n // FIXME '10%' ?\n axisExpandRate: 17,\n axisExpandDebounce: 50,\n // [out, in, jumpTarget]. In percentage. If use [null, 0.05], null means full.\n // Do not doc to user until necessary.\n axisExpandSlideTriggerArea: [-0.15, 0.05, 0.4],\n axisExpandTriggerOn: 'click',\n // 'mousemove' or 'click'\n parallelAxisDefault: null\n },\n\n /**\n * @override\n */\n init: function () {\n Component.prototype.init.apply(this, arguments);\n this.mergeOption({});\n },\n\n /**\n * @override\n */\n mergeOption: function (newOption) {\n var thisOption = this.option;\n newOption && zrUtil.merge(thisOption, newOption, true);\n\n this._initDimensions();\n },\n\n /**\n * Whether series or axis is in this coordinate system.\n * @param {module:echarts/model/Series|module:echarts/coord/parallel/AxisModel} model\n * @param {module:echarts/model/Global} ecModel\n */\n contains: function (model, ecModel) {\n var parallelIndex = model.get('parallelIndex');\n return parallelIndex != null && ecModel.getComponent('parallel', parallelIndex) === this;\n },\n setAxisExpand: function (opt) {\n zrUtil.each(['axisExpandable', 'axisExpandCenter', 'axisExpandCount', 'axisExpandWidth', 'axisExpandWindow'], function (name) {\n if (opt.hasOwnProperty(name)) {\n this.option[name] = opt[name];\n }\n }, this);\n },\n\n /**\n * @private\n */\n _initDimensions: function () {\n var dimensions = this.dimensions = [];\n var parallelAxisIndex = this.parallelAxisIndex = [];\n var axisModels = zrUtil.filter(this.dependentModels.parallelAxis, function (axisModel) {\n // Can not use this.contains here, because\n // initialization has not been completed yet.\n return (axisModel.get('parallelIndex') || 0) === this.componentIndex;\n }, this);\n zrUtil.each(axisModels, function (axisModel) {\n dimensions.push('dim' + axisModel.get('dim'));\n parallelAxisIndex.push(axisModel.componentIndex);\n });\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar layout = require(\"../../util/layout\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* A third-party license is embeded for some of the code in this file:\n* The tree layoutHelper implementation was originally copied from\n* \"d3.js\"(https://github.com/d3/d3-hierarchy) with\n* some modifications made for this project.\n* (see more details in the comment of the specific method below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the licence of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\n\n/**\n * @file The layout algorithm of node-link tree diagrams. Here we using Reingold-Tilford algorithm to drawing\n * the tree.\n */\n\n/**\n * Initialize all computational message for following algorithm.\n *\n * @param {module:echarts/data/Tree~TreeNode} root The virtual root of the tree.\n */\nfunction init(root) {\n root.hierNode = {\n defaultAncestor: null,\n ancestor: root,\n prelim: 0,\n modifier: 0,\n change: 0,\n shift: 0,\n i: 0,\n thread: null\n };\n var nodes = [root];\n var node;\n var children;\n\n while (node = nodes.pop()) {\n // jshint ignore:line\n children = node.children;\n\n if (node.isExpand && children.length) {\n var n = children.length;\n\n for (var i = n - 1; i >= 0; i--) {\n var child = children[i];\n child.hierNode = {\n defaultAncestor: null,\n ancestor: child,\n prelim: 0,\n modifier: 0,\n change: 0,\n shift: 0,\n i: i,\n thread: null\n };\n nodes.push(child);\n }\n }\n }\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes a preliminary x coordinate for node. Before that, this function is\n * applied recursively to the children of node, as well as the function\n * apportion(). After spacing out the children by calling executeShifts(), the\n * node is placed to the midpoint of its outermost children.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {Function} separation\n */\n\n\nfunction firstWalk(node, separation) {\n var children = node.isExpand ? node.children : [];\n var siblings = node.parentNode.children;\n var subtreeW = node.hierNode.i ? siblings[node.hierNode.i - 1] : null;\n\n if (children.length) {\n executeShifts(node);\n var midPoint = (children[0].hierNode.prelim + children[children.length - 1].hierNode.prelim) / 2;\n\n if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n node.hierNode.modifier = node.hierNode.prelim - midPoint;\n } else {\n node.hierNode.prelim = midPoint;\n }\n } else if (subtreeW) {\n node.hierNode.prelim = subtreeW.hierNode.prelim + separation(node, subtreeW);\n }\n\n node.parentNode.hierNode.defaultAncestor = apportion(node, subtreeW, node.parentNode.hierNode.defaultAncestor || siblings[0], separation);\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Computes all real x-coordinates by summing up the modifiers recursively.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n */\n\n\nfunction secondWalk(node) {\n var nodeX = node.hierNode.prelim + node.parentNode.hierNode.modifier;\n node.setLayout({\n x: nodeX\n }, true);\n node.hierNode.modifier += node.parentNode.hierNode.modifier;\n}\n\nfunction separation(cb) {\n return arguments.length ? cb : defaultSeparation;\n}\n/**\n * Transform the common coordinate to radial coordinate.\n *\n * @param {number} x\n * @param {number} y\n * @return {Object}\n */\n\n\nfunction radialCoordinate(x, y) {\n var radialCoor = {};\n x -= Math.PI / 2;\n radialCoor.x = y * Math.cos(x);\n radialCoor.y = y * Math.sin(x);\n return radialCoor;\n}\n/**\n * Get the layout position of the whole view.\n *\n * @param {module:echarts/model/Series} seriesModel the model object of sankey series\n * @param {module:echarts/ExtensionAPI} api provide the API list that the developer can call\n * @return {module:zrender/core/BoundingRect} size of rect to draw the sankey view\n */\n\n\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n/**\n * All other shifts, applied to the smaller subtrees between w- and w+, are\n * performed by this function.\n *\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n */\n\n\nfunction executeShifts(node) {\n var children = node.children;\n var n = children.length;\n var shift = 0;\n var change = 0;\n\n while (--n >= 0) {\n var child = children[n];\n child.hierNode.prelim += shift;\n child.hierNode.modifier += shift;\n change += child.hierNode.change;\n shift += child.hierNode.shift + change;\n }\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * The core of the algorithm. Here, a new subtree is combined with the\n * previous subtrees. Threads are used to traverse the inside and outside\n * contours of the left and right subtree up to the highest common level.\n * Whenever two nodes of the inside contours conflict, we compute the left\n * one of the greatest uncommon ancestors using the function nextAncestor()\n * and call moveSubtree() to shift the subtree and prepare the shifts of\n * smaller subtrees. Finally, we add a new thread (if necessary).\n *\n * @param {module:echarts/data/Tree~TreeNode} subtreeV\n * @param {module:echarts/data/Tree~TreeNode} subtreeW\n * @param {module:echarts/data/Tree~TreeNode} ancestor\n * @param {Function} separation\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction apportion(subtreeV, subtreeW, ancestor, separation) {\n if (subtreeW) {\n var nodeOutRight = subtreeV;\n var nodeInRight = subtreeV;\n var nodeOutLeft = nodeInRight.parentNode.children[0];\n var nodeInLeft = subtreeW;\n var sumOutRight = nodeOutRight.hierNode.modifier;\n var sumInRight = nodeInRight.hierNode.modifier;\n var sumOutLeft = nodeOutLeft.hierNode.modifier;\n var sumInLeft = nodeInLeft.hierNode.modifier;\n\n while (nodeInLeft = nextRight(nodeInLeft), nodeInRight = nextLeft(nodeInRight), nodeInLeft && nodeInRight) {\n nodeOutRight = nextRight(nodeOutRight);\n nodeOutLeft = nextLeft(nodeOutLeft);\n nodeOutRight.hierNode.ancestor = subtreeV;\n var shift = nodeInLeft.hierNode.prelim + sumInLeft - nodeInRight.hierNode.prelim - sumInRight + separation(nodeInLeft, nodeInRight);\n\n if (shift > 0) {\n moveSubtree(nextAncestor(nodeInLeft, subtreeV, ancestor), subtreeV, shift);\n sumInRight += shift;\n sumOutRight += shift;\n }\n\n sumInLeft += nodeInLeft.hierNode.modifier;\n sumInRight += nodeInRight.hierNode.modifier;\n sumOutRight += nodeOutRight.hierNode.modifier;\n sumOutLeft += nodeOutLeft.hierNode.modifier;\n }\n\n if (nodeInLeft && !nextRight(nodeOutRight)) {\n nodeOutRight.hierNode.thread = nodeInLeft;\n nodeOutRight.hierNode.modifier += sumInLeft - sumOutRight;\n }\n\n if (nodeInRight && !nextLeft(nodeOutLeft)) {\n nodeOutLeft.hierNode.thread = nodeInRight;\n nodeOutLeft.hierNode.modifier += sumInRight - sumOutLeft;\n ancestor = subtreeV;\n }\n }\n\n return ancestor;\n}\n/**\n * This function is used to traverse the right contour of a subtree.\n * It returns the rightmost child of node or the thread of node. The function\n * returns null if and only if node is on the highest depth of its subtree.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction nextRight(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[children.length - 1] : node.hierNode.thread;\n}\n/**\n * This function is used to traverse the left contour of a subtree (or a subforest).\n * It returns the leftmost child of node or the thread of node. The function\n * returns null if and only if node is on the highest depth of its subtree.\n *\n * @param {module:echarts/data/Tree~TreeNode} node\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction nextLeft(node) {\n var children = node.children;\n return children.length && node.isExpand ? children[0] : node.hierNode.thread;\n}\n/**\n * If nodeInLeft’s ancestor is a sibling of node, returns nodeInLeft’s ancestor.\n * Otherwise, returns the specified ancestor.\n *\n * @param {module:echarts/data/Tree~TreeNode} nodeInLeft\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {module:echarts/data/Tree~TreeNode} ancestor\n * @return {module:echarts/data/Tree~TreeNode}\n */\n\n\nfunction nextAncestor(nodeInLeft, node, ancestor) {\n return nodeInLeft.hierNode.ancestor.parentNode === node.parentNode ? nodeInLeft.hierNode.ancestor : ancestor;\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * Shifts the current subtree rooted at wr.\n * This is done by increasing prelim(w+) and modifier(w+) by shift.\n *\n * @param {module:echarts/data/Tree~TreeNode} wl\n * @param {module:echarts/data/Tree~TreeNode} wr\n * @param {number} shift [description]\n */\n\n\nfunction moveSubtree(wl, wr, shift) {\n var change = shift / (wr.hierNode.i - wl.hierNode.i);\n wr.hierNode.change -= change;\n wr.hierNode.shift += shift;\n wr.hierNode.modifier += shift;\n wr.hierNode.prelim += shift;\n wl.hierNode.change += change;\n}\n/**\n * The implementation of this function was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n */\n\n\nfunction defaultSeparation(node1, node2) {\n return node1.parentNode === node2.parentNode ? 1 : 2;\n}\n\nexports.init = init;\nexports.firstWalk = firstWalk;\nexports.secondWalk = secondWalk;\nexports.separation = separation;\nexports.radialCoordinate = radialCoordinate;\nexports.getViewRect = getViewRect;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar eventTool = require(\"zrender/lib/core/event\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar throttle = require(\"../../util/throttle\");\n\nvar DataZoomView = require(\"./DataZoomView\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar layout = require(\"../../util/layout\");\n\nvar sliderMove = require(\"../helper/sliderMove\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar Rect = graphic.Rect;\nvar linearMap = numberUtil.linearMap;\nvar asc = numberUtil.asc;\nvar bind = zrUtil.bind;\nvar each = zrUtil.each; // Constants\n\nvar DEFAULT_LOCATION_EDGE_GAP = 7;\nvar DEFAULT_FRAME_BORDER_WIDTH = 1;\nvar DEFAULT_FILLER_SIZE = 30;\nvar HORIZONTAL = 'horizontal';\nvar VERTICAL = 'vertical';\nvar LABEL_GAP = 5;\nvar SHOW_DATA_SHADOW_SERIES_TYPE = ['line', 'bar', 'candlestick', 'scatter'];\nvar SliderZoomView = DataZoomView.extend({\n type: 'dataZoom.slider',\n init: function (ecModel, api) {\n /**\n * @private\n * @type {Object}\n */\n this._displayables = {};\n /**\n * @private\n * @type {string}\n */\n\n this._orient;\n /**\n * [0, 100]\n * @private\n */\n\n this._range;\n /**\n * [coord of the first handle, coord of the second handle]\n * @private\n */\n\n this._handleEnds;\n /**\n * [length, thick]\n * @private\n * @type {Array.}\n */\n\n this._size;\n /**\n * @private\n * @type {number}\n */\n\n this._handleWidth;\n /**\n * @private\n * @type {number}\n */\n\n this._handleHeight;\n /**\n * @private\n */\n\n this._location;\n /**\n * @private\n */\n\n this._dragging;\n /**\n * @private\n */\n\n this._dataShadowInfo;\n this.api = api;\n },\n\n /**\n * @override\n */\n render: function (dataZoomModel, ecModel, api, payload) {\n SliderZoomView.superApply(this, 'render', arguments);\n throttle.createOrUpdate(this, '_dispatchZoomAction', this.dataZoomModel.get('throttle'), 'fixRate');\n this._orient = dataZoomModel.get('orient');\n\n if (this.dataZoomModel.get('show') === false) {\n this.group.removeAll();\n return;\n } // Notice: this._resetInterval() should not be executed when payload.type\n // is 'dataZoom', origin this._range should be maintained, otherwise 'pan'\n // or 'zoom' info will be missed because of 'throttle' of this.dispatchAction,\n\n\n if (!payload || payload.type !== 'dataZoom' || payload.from !== this.uid) {\n this._buildView();\n }\n\n this._updateView();\n },\n\n /**\n * @override\n */\n remove: function () {\n SliderZoomView.superApply(this, 'remove', arguments);\n throttle.clear(this, '_dispatchZoomAction');\n },\n\n /**\n * @override\n */\n dispose: function () {\n SliderZoomView.superApply(this, 'dispose', arguments);\n throttle.clear(this, '_dispatchZoomAction');\n },\n _buildView: function () {\n var thisGroup = this.group;\n thisGroup.removeAll();\n\n this._resetLocation();\n\n this._resetInterval();\n\n var barGroup = this._displayables.barGroup = new graphic.Group();\n\n this._renderBackground();\n\n this._renderHandle();\n\n this._renderDataShadow();\n\n thisGroup.add(barGroup);\n\n this._positionGroup();\n },\n\n /**\n * @private\n */\n _resetLocation: function () {\n var dataZoomModel = this.dataZoomModel;\n var api = this.api; // If some of x/y/width/height are not specified,\n // auto-adapt according to target grid.\n\n var coordRect = this._findCoordRect();\n\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n }; // Default align by coordinate system rect.\n\n var positionInfo = this._orient === HORIZONTAL ? {\n // Why using 'right', because right should be used in vertical,\n // and it is better to be consistent for dealing with position param merge.\n right: ecSize.width - coordRect.x - coordRect.width,\n top: ecSize.height - DEFAULT_FILLER_SIZE - DEFAULT_LOCATION_EDGE_GAP,\n width: coordRect.width,\n height: DEFAULT_FILLER_SIZE\n } : {\n // vertical\n right: DEFAULT_LOCATION_EDGE_GAP,\n top: coordRect.y,\n width: DEFAULT_FILLER_SIZE,\n height: coordRect.height\n }; // Do not write back to option and replace value 'ph', because\n // the 'ph' value should be recalculated when resize.\n\n var layoutParams = layout.getLayoutParams(dataZoomModel.option); // Replace the placeholder value.\n\n zrUtil.each(['right', 'top', 'width', 'height'], function (name) {\n if (layoutParams[name] === 'ph') {\n layoutParams[name] = positionInfo[name];\n }\n });\n var layoutRect = layout.getLayoutRect(layoutParams, ecSize, dataZoomModel.padding);\n this._location = {\n x: layoutRect.x,\n y: layoutRect.y\n };\n this._size = [layoutRect.width, layoutRect.height];\n this._orient === VERTICAL && this._size.reverse();\n },\n\n /**\n * @private\n */\n _positionGroup: function () {\n var thisGroup = this.group;\n var location = this._location;\n var orient = this._orient; // Just use the first axis to determine mapping.\n\n var targetAxisModel = this.dataZoomModel.getFirstTargetAxisModel();\n var inverse = targetAxisModel && targetAxisModel.get('inverse');\n var barGroup = this._displayables.barGroup;\n var otherAxisInverse = (this._dataShadowInfo || {}).otherAxisInverse; // Transform barGroup.\n\n barGroup.attr(orient === HORIZONTAL && !inverse ? {\n scale: otherAxisInverse ? [1, 1] : [1, -1]\n } : orient === HORIZONTAL && inverse ? {\n scale: otherAxisInverse ? [-1, 1] : [-1, -1]\n } : orient === VERTICAL && !inverse ? {\n scale: otherAxisInverse ? [1, -1] : [1, 1],\n rotation: Math.PI / 2 // Dont use Math.PI, considering shadow direction.\n\n } : {\n scale: otherAxisInverse ? [-1, -1] : [-1, 1],\n rotation: Math.PI / 2\n }); // Position barGroup\n\n var rect = thisGroup.getBoundingRect([barGroup]);\n thisGroup.attr('position', [location.x - rect.x, location.y - rect.y]);\n },\n\n /**\n * @private\n */\n _getViewExtent: function () {\n return [0, this._size[0]];\n },\n _renderBackground: function () {\n var dataZoomModel = this.dataZoomModel;\n var size = this._size;\n var barGroup = this._displayables.barGroup;\n barGroup.add(new Rect({\n silent: true,\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n fill: dataZoomModel.get('backgroundColor')\n },\n z2: -40\n })); // Click panel, over shadow, below handles.\n\n barGroup.add(new Rect({\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n fill: 'transparent'\n },\n z2: 0,\n onclick: zrUtil.bind(this._onClickPanelClick, this)\n }));\n },\n _renderDataShadow: function () {\n var info = this._dataShadowInfo = this._prepareDataShadowInfo();\n\n if (!info) {\n return;\n }\n\n var size = this._size;\n var seriesModel = info.series;\n var data = seriesModel.getRawData();\n var otherDim = seriesModel.getShadowDim ? seriesModel.getShadowDim() // @see candlestick\n : info.otherDim;\n\n if (otherDim == null) {\n return;\n }\n\n var otherDataExtent = data.getDataExtent(otherDim); // Nice extent.\n\n var otherOffset = (otherDataExtent[1] - otherDataExtent[0]) * 0.3;\n otherDataExtent = [otherDataExtent[0] - otherOffset, otherDataExtent[1] + otherOffset];\n var otherShadowExtent = [0, size[1]];\n var thisShadowExtent = [0, size[0]];\n var areaPoints = [[size[0], 0], [0, 0]];\n var linePoints = [];\n var step = thisShadowExtent[1] / (data.count() - 1);\n var thisCoord = 0; // Optimize for large data shadow\n\n var stride = Math.round(data.count() / size[0]);\n var lastIsEmpty;\n data.each([otherDim], function (value, index) {\n if (stride > 0 && index % stride) {\n thisCoord += step;\n return;\n } // FIXME\n // Should consider axis.min/axis.max when drawing dataShadow.\n // FIXME\n // 应该使用统一的空判断?还是在list里进行空判断?\n\n\n var isEmpty = value == null || isNaN(value) || value === ''; // See #4235.\n\n var otherCoord = isEmpty ? 0 : linearMap(value, otherDataExtent, otherShadowExtent, true); // Attempt to draw data shadow precisely when there are empty value.\n\n if (isEmpty && !lastIsEmpty && index) {\n areaPoints.push([areaPoints[areaPoints.length - 1][0], 0]);\n linePoints.push([linePoints[linePoints.length - 1][0], 0]);\n } else if (!isEmpty && lastIsEmpty) {\n areaPoints.push([thisCoord, 0]);\n linePoints.push([thisCoord, 0]);\n }\n\n areaPoints.push([thisCoord, otherCoord]);\n linePoints.push([thisCoord, otherCoord]);\n thisCoord += step;\n lastIsEmpty = isEmpty;\n });\n var dataZoomModel = this.dataZoomModel; // var dataBackgroundModel = dataZoomModel.getModel('dataBackground');\n\n this._displayables.barGroup.add(new graphic.Polygon({\n shape: {\n points: areaPoints\n },\n style: zrUtil.defaults({\n fill: dataZoomModel.get('dataBackgroundColor')\n }, dataZoomModel.getModel('dataBackground.areaStyle').getAreaStyle()),\n silent: true,\n z2: -20\n }));\n\n this._displayables.barGroup.add(new graphic.Polyline({\n shape: {\n points: linePoints\n },\n style: dataZoomModel.getModel('dataBackground.lineStyle').getLineStyle(),\n silent: true,\n z2: -19\n }));\n },\n _prepareDataShadowInfo: function () {\n var dataZoomModel = this.dataZoomModel;\n var showDataShadow = dataZoomModel.get('showDataShadow');\n\n if (showDataShadow === false) {\n return;\n } // Find a representative series.\n\n\n var result;\n var ecModel = this.ecModel;\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex) {\n var seriesModels = dataZoomModel.getAxisProxy(dimNames.name, axisIndex).getTargetSeriesModels();\n zrUtil.each(seriesModels, function (seriesModel) {\n if (result) {\n return;\n }\n\n if (showDataShadow !== true && zrUtil.indexOf(SHOW_DATA_SHADOW_SERIES_TYPE, seriesModel.get('type')) < 0) {\n return;\n }\n\n var thisAxis = ecModel.getComponent(dimNames.axis, axisIndex).axis;\n var otherDim = getOtherDim(dimNames.name);\n var otherAxisInverse;\n var coordSys = seriesModel.coordinateSystem;\n\n if (otherDim != null && coordSys.getOtherAxis) {\n otherAxisInverse = coordSys.getOtherAxis(thisAxis).inverse;\n }\n\n otherDim = seriesModel.getData().mapDimension(otherDim);\n result = {\n thisAxis: thisAxis,\n series: seriesModel,\n thisDim: dimNames.name,\n otherDim: otherDim,\n otherAxisInverse: otherAxisInverse\n };\n }, this);\n }, this);\n return result;\n },\n _renderHandle: function () {\n var displaybles = this._displayables;\n var handles = displaybles.handles = [];\n var handleLabels = displaybles.handleLabels = [];\n var barGroup = this._displayables.barGroup;\n var size = this._size;\n var dataZoomModel = this.dataZoomModel;\n barGroup.add(displaybles.filler = new Rect({\n draggable: true,\n cursor: getCursor(this._orient),\n drift: bind(this._onDragMove, this, 'all'),\n ondragstart: bind(this._showDataInfo, this, true),\n ondragend: bind(this._onDragEnd, this),\n onmouseover: bind(this._showDataInfo, this, true),\n onmouseout: bind(this._showDataInfo, this, false),\n style: {\n fill: dataZoomModel.get('fillerColor'),\n textPosition: 'inside'\n }\n })); // Frame border.\n\n barGroup.add(new Rect({\n silent: true,\n subPixelOptimize: true,\n shape: {\n x: 0,\n y: 0,\n width: size[0],\n height: size[1]\n },\n style: {\n stroke: dataZoomModel.get('dataBackgroundColor') || dataZoomModel.get('borderColor'),\n lineWidth: DEFAULT_FRAME_BORDER_WIDTH,\n fill: 'rgba(0,0,0,0)'\n }\n }));\n each([0, 1], function (handleIndex) {\n var path = graphic.createIcon(dataZoomModel.get('handleIcon'), {\n cursor: getCursor(this._orient),\n draggable: true,\n drift: bind(this._onDragMove, this, handleIndex),\n ondragend: bind(this._onDragEnd, this),\n onmouseover: bind(this._showDataInfo, this, true),\n onmouseout: bind(this._showDataInfo, this, false)\n }, {\n x: -1,\n y: 0,\n width: 2,\n height: 2\n });\n var bRect = path.getBoundingRect();\n this._handleHeight = numberUtil.parsePercent(dataZoomModel.get('handleSize'), this._size[1]);\n this._handleWidth = bRect.width / bRect.height * this._handleHeight;\n path.setStyle(dataZoomModel.getModel('handleStyle').getItemStyle());\n var handleColor = dataZoomModel.get('handleColor'); // Compatitable with previous version\n\n if (handleColor != null) {\n path.style.fill = handleColor;\n }\n\n barGroup.add(handles[handleIndex] = path);\n var textStyleModel = dataZoomModel.textStyleModel;\n this.group.add(handleLabels[handleIndex] = new graphic.Text({\n silent: true,\n invisible: true,\n style: {\n x: 0,\n y: 0,\n text: '',\n textVerticalAlign: 'middle',\n textAlign: 'center',\n textFill: textStyleModel.getTextColor(),\n textFont: textStyleModel.getFont()\n },\n z2: 10\n }));\n }, this);\n },\n\n /**\n * @private\n */\n _resetInterval: function () {\n var range = this._range = this.dataZoomModel.getPercentRange();\n\n var viewExtent = this._getViewExtent();\n\n this._handleEnds = [linearMap(range[0], [0, 100], viewExtent, true), linearMap(range[1], [0, 100], viewExtent, true)];\n },\n\n /**\n * @private\n * @param {(number|string)} handleIndex 0 or 1 or 'all'\n * @param {number} delta\n * @return {boolean} changed\n */\n _updateInterval: function (handleIndex, delta) {\n var dataZoomModel = this.dataZoomModel;\n var handleEnds = this._handleEnds;\n\n var viewExtend = this._getViewExtent();\n\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n var percentExtent = [0, 100];\n sliderMove(delta, handleEnds, viewExtend, dataZoomModel.get('zoomLock') ? 'all' : handleIndex, minMaxSpan.minSpan != null ? linearMap(minMaxSpan.minSpan, percentExtent, viewExtend, true) : null, minMaxSpan.maxSpan != null ? linearMap(minMaxSpan.maxSpan, percentExtent, viewExtend, true) : null);\n var lastRange = this._range;\n var range = this._range = asc([linearMap(handleEnds[0], viewExtend, percentExtent, true), linearMap(handleEnds[1], viewExtend, percentExtent, true)]);\n return !lastRange || lastRange[0] !== range[0] || lastRange[1] !== range[1];\n },\n\n /**\n * @private\n */\n _updateView: function (nonRealtime) {\n var displaybles = this._displayables;\n var handleEnds = this._handleEnds;\n var handleInterval = asc(handleEnds.slice());\n var size = this._size;\n each([0, 1], function (handleIndex) {\n // Handles\n var handle = displaybles.handles[handleIndex];\n var handleHeight = this._handleHeight;\n handle.attr({\n scale: [handleHeight / 2, handleHeight / 2],\n position: [handleEnds[handleIndex], size[1] / 2 - handleHeight / 2]\n });\n }, this); // Filler\n\n displaybles.filler.setShape({\n x: handleInterval[0],\n y: 0,\n width: handleInterval[1] - handleInterval[0],\n height: size[1]\n });\n\n this._updateDataInfo(nonRealtime);\n },\n\n /**\n * @private\n */\n _updateDataInfo: function (nonRealtime) {\n var dataZoomModel = this.dataZoomModel;\n var displaybles = this._displayables;\n var handleLabels = displaybles.handleLabels;\n var orient = this._orient;\n var labelTexts = ['', '']; // FIXME\n // date型,支持formatter,autoformatter(ec2 date.getAutoFormatter)\n\n if (dataZoomModel.get('showDetail')) {\n var axisProxy = dataZoomModel.findRepresentativeAxisProxy();\n\n if (axisProxy) {\n var axis = axisProxy.getAxisModel().axis;\n var range = this._range;\n var dataInterval = nonRealtime // See #4434, data and axis are not processed and reset yet in non-realtime mode.\n ? axisProxy.calculateDataWindow({\n start: range[0],\n end: range[1]\n }).valueWindow : axisProxy.getDataValueWindow();\n labelTexts = [this._formatLabel(dataInterval[0], axis), this._formatLabel(dataInterval[1], axis)];\n }\n }\n\n var orderedHandleEnds = asc(this._handleEnds.slice());\n setLabel.call(this, 0);\n setLabel.call(this, 1);\n\n function setLabel(handleIndex) {\n // Label\n // Text should not transform by barGroup.\n // Ignore handlers transform\n var barTransform = graphic.getTransform(displaybles.handles[handleIndex].parent, this.group);\n var direction = graphic.transformDirection(handleIndex === 0 ? 'right' : 'left', barTransform);\n var offset = this._handleWidth / 2 + LABEL_GAP;\n var textPoint = graphic.applyTransform([orderedHandleEnds[handleIndex] + (handleIndex === 0 ? -offset : offset), this._size[1] / 2], barTransform);\n handleLabels[handleIndex].setStyle({\n x: textPoint[0],\n y: textPoint[1],\n textVerticalAlign: orient === HORIZONTAL ? 'middle' : direction,\n textAlign: orient === HORIZONTAL ? direction : 'center',\n text: labelTexts[handleIndex]\n });\n }\n },\n\n /**\n * @private\n */\n _formatLabel: function (value, axis) {\n var dataZoomModel = this.dataZoomModel;\n var labelFormatter = dataZoomModel.get('labelFormatter');\n var labelPrecision = dataZoomModel.get('labelPrecision');\n\n if (labelPrecision == null || labelPrecision === 'auto') {\n labelPrecision = axis.getPixelPrecision();\n }\n\n var valueStr = value == null || isNaN(value) ? '' // FIXME Glue code\n : axis.type === 'category' || axis.type === 'time' ? axis.scale.getLabel(Math.round(value)) // param of toFixed should less then 20.\n : value.toFixed(Math.min(labelPrecision, 20));\n return zrUtil.isFunction(labelFormatter) ? labelFormatter(value, valueStr) : zrUtil.isString(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr;\n },\n\n /**\n * @private\n * @param {boolean} showOrHide true: show, false: hide\n */\n _showDataInfo: function (showOrHide) {\n // Always show when drgging.\n showOrHide = this._dragging || showOrHide;\n var handleLabels = this._displayables.handleLabels;\n handleLabels[0].attr('invisible', !showOrHide);\n handleLabels[1].attr('invisible', !showOrHide);\n },\n _onDragMove: function (handleIndex, dx, dy, event) {\n this._dragging = true; // For mobile device, prevent screen slider on the button.\n\n eventTool.stop(event.event); // Transform dx, dy to bar coordination.\n\n var barTransform = this._displayables.barGroup.getLocalTransform();\n\n var vertex = graphic.applyTransform([dx, dy], barTransform, true);\n\n var changed = this._updateInterval(handleIndex, vertex[0]);\n\n var realtime = this.dataZoomModel.get('realtime');\n\n this._updateView(!realtime); // Avoid dispatch dataZoom repeatly but range not changed,\n // which cause bad visual effect when progressive enabled.\n\n\n changed && realtime && this._dispatchZoomAction();\n },\n _onDragEnd: function () {\n this._dragging = false;\n\n this._showDataInfo(false); // While in realtime mode and stream mode, dispatch action when\n // drag end will cause the whole view rerender, which is unnecessary.\n\n\n var realtime = this.dataZoomModel.get('realtime');\n !realtime && this._dispatchZoomAction();\n },\n _onClickPanelClick: function (e) {\n var size = this._size;\n\n var localPoint = this._displayables.barGroup.transformCoordToLocal(e.offsetX, e.offsetY);\n\n if (localPoint[0] < 0 || localPoint[0] > size[0] || localPoint[1] < 0 || localPoint[1] > size[1]) {\n return;\n }\n\n var handleEnds = this._handleEnds;\n var center = (handleEnds[0] + handleEnds[1]) / 2;\n\n var changed = this._updateInterval('all', localPoint[0] - center);\n\n this._updateView();\n\n changed && this._dispatchZoomAction();\n },\n\n /**\n * This action will be throttled.\n * @private\n */\n _dispatchZoomAction: function () {\n var range = this._range;\n this.api.dispatchAction({\n type: 'dataZoom',\n from: this.uid,\n dataZoomId: this.dataZoomModel.id,\n start: range[0],\n end: range[1]\n });\n },\n\n /**\n * @private\n */\n _findCoordRect: function () {\n // Find the grid coresponding to the first axis referred by dataZoom.\n var rect;\n each(this.getTargetCoordInfo(), function (coordInfoList) {\n if (!rect && coordInfoList.length) {\n var coordSys = coordInfoList[0].model.coordinateSystem;\n rect = coordSys.getRect && coordSys.getRect();\n }\n });\n\n if (!rect) {\n var width = this.api.getWidth();\n var height = this.api.getHeight();\n rect = {\n x: width * 0.2,\n y: height * 0.2,\n width: width * 0.6,\n height: height * 0.6\n };\n }\n\n return rect;\n }\n});\n\nfunction getOtherDim(thisDim) {\n // FIXME\n // 这个逻辑和getOtherAxis里一致,但是写在这里是否不好\n var map = {\n x: 'y',\n y: 'x',\n radius: 'angle',\n angle: 'radius'\n };\n return map[thisDim];\n}\n\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\n\nvar _default = SliderZoomView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar List = require(\"../../data/List\");\n\nvar Graph = require(\"../../data/Graph\");\n\nvar linkList = require(\"../../data/helper/linkList\");\n\nvar createDimensions = require(\"../../data/helper/createDimensions\");\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\n\nvar createListFromArray = require(\"./createListFromArray\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(nodes, edges, seriesModel, directed, beforeLink) {\n // ??? TODO\n // support dataset?\n var graph = new Graph(directed);\n\n for (var i = 0; i < nodes.length; i++) {\n graph.addNode(zrUtil.retrieve( // Id, name, dataIndex\n nodes[i].id, nodes[i].name, i), i);\n }\n\n var linkNameList = [];\n var validEdges = [];\n var linkCount = 0;\n\n for (var i = 0; i < edges.length; i++) {\n var link = edges[i];\n var source = link.source;\n var target = link.target; // addEdge may fail when source or target not exists\n\n if (graph.addEdge(source, target, linkCount)) {\n validEdges.push(link);\n linkNameList.push(zrUtil.retrieve(link.id, source + ' > ' + target));\n linkCount++;\n }\n }\n\n var coordSys = seriesModel.get('coordinateSystem');\n var nodeData;\n\n if (coordSys === 'cartesian2d' || coordSys === 'polar') {\n nodeData = createListFromArray(nodes, seriesModel);\n } else {\n var coordSysCtor = CoordinateSystem.get(coordSys);\n var coordDimensions = coordSysCtor && coordSysCtor.type !== 'view' ? coordSysCtor.dimensions || [] : []; // FIXME: Some geo do not need `value` dimenson, whereas `calendar` needs\n // `value` dimension, but graph need `value` dimension. It's better to\n // uniform this behavior.\n\n if (zrUtil.indexOf(coordDimensions, 'value') < 0) {\n coordDimensions.concat(['value']);\n }\n\n var dimensionNames = createDimensions(nodes, {\n coordDimensions: coordDimensions\n });\n nodeData = new List(dimensionNames, seriesModel);\n nodeData.initData(nodes);\n }\n\n var edgeData = new List(['value'], seriesModel);\n edgeData.initData(validEdges, linkNameList);\n beforeLink && beforeLink(nodeData, edgeData);\n linkList({\n mainData: nodeData,\n struct: graph,\n structAttr: 'graph',\n datas: {\n node: nodeData,\n edge: edgeData\n },\n datasAttr: {\n node: 'data',\n edge: 'edgeData'\n }\n }); // Update dataIndex of nodes and edges because invalid edge may be removed\n\n graph.update();\n return graph;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar IndicatorAxis = require(\"./IndicatorAxis\");\n\nvar IntervalScale = require(\"../../scale/Interval\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar _axisHelper = require(\"../axisHelper\");\n\nvar getScaleExtent = _axisHelper.getScaleExtent;\nvar niceScaleExtent = _axisHelper.niceScaleExtent;\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\n\nvar LogScale = require(\"../../scale/Log\");\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// TODO clockwise\nfunction Radar(radarModel, ecModel, api) {\n this._model = radarModel;\n /**\n * Radar dimensions\n * @type {Array.}\n */\n\n this.dimensions = [];\n this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {\n var dim = 'indicator_' + idx;\n var indicatorAxis = new IndicatorAxis(dim, indicatorModel.get('axisType') === 'log' ? new LogScale() : new IntervalScale());\n indicatorAxis.name = indicatorModel.get('name'); // Inject model and axis\n\n indicatorAxis.model = indicatorModel;\n indicatorModel.axis = indicatorAxis;\n this.dimensions.push(dim);\n return indicatorAxis;\n }, this);\n this.resize(radarModel, api);\n /**\n * @type {number}\n * @readOnly\n */\n\n this.cx;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.cy;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.r;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.r0;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.startAngle;\n}\n\nRadar.prototype.getIndicatorAxes = function () {\n return this._indicatorAxes;\n};\n\nRadar.prototype.dataToPoint = function (value, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex);\n};\n\nRadar.prototype.coordToPoint = function (coord, indicatorIndex) {\n var indicatorAxis = this._indicatorAxes[indicatorIndex];\n var angle = indicatorAxis.angle;\n var x = this.cx + coord * Math.cos(angle);\n var y = this.cy - coord * Math.sin(angle);\n return [x, y];\n};\n\nRadar.prototype.pointToData = function (pt) {\n var dx = pt[0] - this.cx;\n var dy = pt[1] - this.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx); // Find the closest angle\n // FIXME index can calculated directly\n\n var minRadianDiff = Infinity;\n var closestAxis;\n var closestAxisIdx = -1;\n\n for (var i = 0; i < this._indicatorAxes.length; i++) {\n var indicatorAxis = this._indicatorAxes[i];\n var diff = Math.abs(radian - indicatorAxis.angle);\n\n if (diff < minRadianDiff) {\n closestAxis = indicatorAxis;\n closestAxisIdx = i;\n minRadianDiff = diff;\n }\n }\n\n return [closestAxisIdx, +(closestAxis && closestAxis.coordToData(radius))];\n};\n\nRadar.prototype.resize = function (radarModel, api) {\n var center = radarModel.get('center');\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n var viewSize = Math.min(viewWidth, viewHeight) / 2;\n this.cx = numberUtil.parsePercent(center[0], viewWidth);\n this.cy = numberUtil.parsePercent(center[1], viewHeight);\n this.startAngle = radarModel.get('startAngle') * Math.PI / 180; // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']`\n\n var radius = radarModel.get('radius');\n\n if (typeof radius === 'string' || typeof radius === 'number') {\n radius = [0, radius];\n }\n\n this.r0 = numberUtil.parsePercent(radius[0], viewSize);\n this.r = numberUtil.parsePercent(radius[1], viewSize);\n zrUtil.each(this._indicatorAxes, function (indicatorAxis, idx) {\n indicatorAxis.setExtent(this.r0, this.r);\n var angle = this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length; // Normalize to [-PI, PI]\n\n angle = Math.atan2(Math.sin(angle), Math.cos(angle));\n indicatorAxis.angle = angle;\n }, this);\n};\n\nRadar.prototype.update = function (ecModel, api) {\n var indicatorAxes = this._indicatorAxes;\n var radarModel = this._model;\n zrUtil.each(indicatorAxes, function (indicatorAxis) {\n indicatorAxis.scale.setExtent(Infinity, -Infinity);\n });\n ecModel.eachSeriesByType('radar', function (radarSeries, idx) {\n if (radarSeries.get('coordinateSystem') !== 'radar' || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel) {\n return;\n }\n\n var data = radarSeries.getData();\n zrUtil.each(indicatorAxes, function (indicatorAxis) {\n indicatorAxis.scale.unionExtentFromData(data, data.mapDimension(indicatorAxis.dim));\n });\n }, this);\n var splitNumber = radarModel.get('splitNumber');\n\n function increaseInterval(interval) {\n var exp10 = Math.pow(10, Math.floor(Math.log(interval) / Math.LN10)); // Increase interval\n\n var f = interval / exp10;\n\n if (f === 2) {\n f = 5;\n } else {\n // f is 2 or 5\n f *= 2;\n }\n\n return f * exp10;\n } // Force all the axis fixing the maxSplitNumber.\n\n\n zrUtil.each(indicatorAxes, function (indicatorAxis, idx) {\n var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model).extent;\n niceScaleExtent(indicatorAxis.scale, indicatorAxis.model);\n var axisModel = indicatorAxis.model;\n var scale = indicatorAxis.scale;\n var fixedMin = axisModel.getMin();\n var fixedMax = axisModel.getMax();\n var interval = scale.getInterval();\n\n if (fixedMin != null && fixedMax != null) {\n // User set min, max, divide to get new interval\n scale.setExtent(+fixedMin, +fixedMax);\n scale.setInterval((fixedMax - fixedMin) / splitNumber);\n } else if (fixedMin != null) {\n var max; // User set min, expand extent on the other side\n\n do {\n max = fixedMin + interval * splitNumber;\n scale.setExtent(+fixedMin, max); // Interval must been set after extent\n // FIXME\n\n scale.setInterval(interval);\n interval = increaseInterval(interval);\n } while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1]));\n } else if (fixedMax != null) {\n var min; // User set min, expand extent on the other side\n\n do {\n min = fixedMax - interval * splitNumber;\n scale.setExtent(min, +fixedMax);\n scale.setInterval(interval);\n interval = increaseInterval(interval);\n } while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0]));\n } else {\n var nicedSplitNumber = scale.getTicks().length - 1;\n\n if (nicedSplitNumber > splitNumber) {\n interval = increaseInterval(interval);\n } // TODO\n\n\n var max = Math.ceil(rawExtent[1] / interval) * interval;\n var min = numberUtil.round(max - interval * splitNumber);\n scale.setExtent(min, max);\n scale.setInterval(interval);\n }\n });\n};\n/**\n * Radar dimensions is based on the data\n * @type {Array}\n */\n\n\nRadar.dimensions = [];\n\nRadar.create = function (ecModel, api) {\n var radarList = [];\n ecModel.eachComponent('radar', function (radarModel) {\n var radar = new Radar(radarModel, ecModel, api);\n radarList.push(radar);\n radarModel.coordinateSystem = radar;\n });\n ecModel.eachSeriesByType('radar', function (radarSeries) {\n if (radarSeries.get('coordinateSystem') === 'radar') {\n // Inject coordinate system\n radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0];\n }\n });\n return radarList;\n};\n\nCoordinateSystem.register('radar', Radar);\nvar _default = Radar;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./graph/GraphSeries\");\n\nrequire(\"./graph/GraphView\");\n\nrequire(\"./graph/graphAction\");\n\nvar categoryFilter = require(\"./graph/categoryFilter\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar categoryVisual = require(\"./graph/categoryVisual\");\n\nvar edgeVisual = require(\"./graph/edgeVisual\");\n\nvar simpleLayout = require(\"./graph/simpleLayout\");\n\nvar circularLayout = require(\"./graph/circularLayout\");\n\nvar forceLayout = require(\"./graph/forceLayout\");\n\nvar createView = require(\"./graph/createView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerProcessor(categoryFilter);\necharts.registerVisual(visualSymbol('graph', 'circle', null));\necharts.registerVisual(categoryVisual);\necharts.registerVisual(edgeVisual);\necharts.registerLayout(simpleLayout);\necharts.registerLayout(echarts.PRIORITY.VISUAL.POST_CHART_LAYOUT, circularLayout);\necharts.registerLayout(forceLayout); // Graph view coordinate system\n\necharts.registerCoordinateSystem('graphView', {\n create: createView\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar modelUtil = require(\"../../util/model\");\n\nvar formatUtil = require(\"../../util/format\");\n\nvar dataFormatMixin = require(\"../../model/mixin/dataFormat\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar addCommas = formatUtil.addCommas;\nvar encodeHTML = formatUtil.encodeHTML;\n\nfunction fillLabel(opt) {\n modelUtil.defaultEmphasis(opt, 'label', ['show']);\n}\n\nvar MarkerModel = echarts.extendComponentModel({\n type: 'marker',\n dependencies: ['series', 'grid', 'polar', 'geo'],\n\n /**\n * @overrite\n */\n init: function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n\n this._mergeOption(option, ecModel, false, true);\n },\n\n /**\n * @return {boolean}\n */\n isAnimationEnabled: function () {\n if (env.node) {\n return false;\n }\n\n var hostSeries = this.__hostSeries;\n return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled();\n },\n\n /**\n * @overrite\n */\n mergeOption: function (newOpt, ecModel) {\n this._mergeOption(newOpt, ecModel, false, false);\n },\n _mergeOption: function (newOpt, ecModel, createdBySelf, isInit) {\n var MarkerModel = this.constructor;\n var modelPropName = this.mainType + 'Model';\n\n if (!createdBySelf) {\n ecModel.eachSeries(function (seriesModel) {\n var markerOpt = seriesModel.get(this.mainType, true);\n var markerModel = seriesModel[modelPropName];\n\n if (!markerOpt || !markerOpt.data) {\n seriesModel[modelPropName] = null;\n return;\n }\n\n if (!markerModel) {\n if (isInit) {\n // Default label emphasis `position` and `show`\n fillLabel(markerOpt);\n }\n\n zrUtil.each(markerOpt.data, function (item) {\n // FIXME Overwrite fillLabel method ?\n if (item instanceof Array) {\n fillLabel(item[0]);\n fillLabel(item[1]);\n } else {\n fillLabel(item);\n }\n });\n markerModel = new MarkerModel(markerOpt, this, ecModel);\n zrUtil.extend(markerModel, {\n mainType: this.mainType,\n // Use the same series index and name\n seriesIndex: seriesModel.seriesIndex,\n name: seriesModel.name,\n createdBySelf: true\n });\n markerModel.__hostSeries = seriesModel;\n } else {\n markerModel._mergeOption(markerOpt, ecModel, true);\n }\n\n seriesModel[modelPropName] = markerModel;\n }, this);\n }\n },\n formatTooltip: function (dataIndex, multipleSeries, dataType, renderMode) {\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var formattedValue = zrUtil.isArray(value) ? zrUtil.map(value, addCommas).join(', ') : addCommas(value);\n var name = data.getName(dataIndex);\n var html = encodeHTML(this.name);\n var newLine = renderMode === 'html' ? '
' : '\\n';\n\n if (value != null || name) {\n html += newLine;\n }\n\n if (name) {\n html += encodeHTML(name);\n\n if (value != null) {\n html += ' : ';\n }\n }\n\n if (value != null) {\n html += encodeHTML(formattedValue);\n }\n\n return html;\n },\n getData: function () {\n return this._data;\n },\n setData: function (data) {\n this._data = data;\n }\n});\nzrUtil.mixin(MarkerModel, dataFormatMixin);\nvar _default = MarkerModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar layout = require(\"../../util/layout\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\nvar linearMap = _number.linearMap;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n\nfunction getSortedIndices(data, sort) {\n var valueDim = data.mapDimension('value');\n var valueArr = data.mapArray(valueDim, function (val) {\n return val;\n });\n var indices = [];\n var isAscending = sort === 'ascending';\n\n for (var i = 0, len = data.count(); i < len; i++) {\n indices[i] = i;\n } // Add custom sortable function & none sortable opetion by \"options.sort\"\n\n\n if (typeof sort === 'function') {\n indices.sort(sort);\n } else if (sort !== 'none') {\n indices.sort(function (a, b) {\n return isAscending ? valueArr[a] - valueArr[b] : valueArr[b] - valueArr[a];\n });\n }\n\n return indices;\n}\n\nfunction labelLayout(data) {\n data.each(function (idx) {\n var itemModel = data.getItemModel(idx);\n var labelModel = itemModel.getModel('label');\n var labelPosition = labelModel.get('position');\n var orient = itemModel.get('orient');\n var labelLineModel = itemModel.getModel('labelLine');\n var layout = data.getItemLayout(idx);\n var points = layout.points;\n var isLabelInside = labelPosition === 'inner' || labelPosition === 'inside' || labelPosition === 'center' || labelPosition === 'insideLeft' || labelPosition === 'insideRight';\n var textAlign;\n var textX;\n var textY;\n var linePoints;\n\n if (isLabelInside) {\n if (labelPosition === 'insideLeft') {\n textX = (points[0][0] + points[3][0]) / 2 + 5;\n textY = (points[0][1] + points[3][1]) / 2;\n textAlign = 'left';\n } else if (labelPosition === 'insideRight') {\n textX = (points[1][0] + points[2][0]) / 2 - 5;\n textY = (points[1][1] + points[2][1]) / 2;\n textAlign = 'right';\n } else {\n textX = (points[0][0] + points[1][0] + points[2][0] + points[3][0]) / 4;\n textY = (points[0][1] + points[1][1] + points[2][1] + points[3][1]) / 4;\n textAlign = 'center';\n }\n\n linePoints = [[textX, textY], [textX, textY]];\n } else {\n var x1;\n var y1;\n var x2;\n var y2;\n var labelLineLen = labelLineModel.get('length');\n\n if (labelPosition === 'left') {\n // Left side\n x1 = (points[3][0] + points[0][0]) / 2;\n y1 = (points[3][1] + points[0][1]) / 2;\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n } else if (labelPosition === 'right') {\n // Right side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'left';\n } else if (labelPosition === 'top') {\n // Top side\n x1 = (points[3][0] + points[0][0]) / 2;\n y1 = (points[3][1] + points[0][1]) / 2;\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n } else if (labelPosition === 'bottom') {\n // Bottom side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else if (labelPosition === 'rightTop') {\n // RightTop side\n x1 = orient === 'horizontal' ? points[3][0] : points[1][0];\n y1 = orient === 'horizontal' ? points[3][1] : points[1][1];\n\n if (orient === 'horizontal') {\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n } else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'top';\n }\n } else if (labelPosition === 'rightBottom') {\n // RightBottom side\n x1 = points[2][0];\n y1 = points[2][1];\n\n if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'bottom';\n }\n } else if (labelPosition === 'leftTop') {\n // LeftTop side\n x1 = points[0][0];\n y1 = orient === 'horizontal' ? points[0][1] : points[1][1];\n\n if (orient === 'horizontal') {\n y2 = y1 - labelLineLen;\n textY = y2 - 5;\n textAlign = 'center';\n } else {\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n }\n } else if (labelPosition === 'leftBottom') {\n // LeftBottom side\n x1 = orient === 'horizontal' ? points[1][0] : points[3][0];\n y1 = orient === 'horizontal' ? points[1][1] : points[2][1];\n\n if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else {\n x2 = x1 - labelLineLen;\n textX = x2 - 5;\n textAlign = 'right';\n }\n } else {\n // Right side or Bottom side\n x1 = (points[1][0] + points[2][0]) / 2;\n y1 = (points[1][1] + points[2][1]) / 2;\n\n if (orient === 'horizontal') {\n y2 = y1 + labelLineLen;\n textY = y2 + 5;\n textAlign = 'center';\n } else {\n x2 = x1 + labelLineLen;\n textX = x2 + 5;\n textAlign = 'left';\n }\n }\n\n if (orient === 'horizontal') {\n x2 = x1;\n textX = x2;\n } else {\n y2 = y1;\n textY = y2;\n }\n\n linePoints = [[x1, y1], [x2, y2]];\n }\n\n layout.label = {\n linePoints: linePoints,\n x: textX,\n y: textY,\n verticalAlign: 'middle',\n textAlign: textAlign,\n inside: isLabelInside\n };\n });\n}\n\nfunction _default(ecModel, api, payload) {\n ecModel.eachSeriesByType('funnel', function (seriesModel) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var sort = seriesModel.get('sort');\n var viewRect = getViewRect(seriesModel, api);\n var indices = getSortedIndices(data, sort);\n var orient = seriesModel.get('orient');\n var viewWidth = viewRect.width;\n var viewHeight = viewRect.height;\n var x = viewRect.x;\n var y = viewRect.y;\n var sizeExtent = orient === 'horizontal' ? [parsePercent(seriesModel.get('minSize'), viewHeight), parsePercent(seriesModel.get('maxSize'), viewHeight)] : [parsePercent(seriesModel.get('minSize'), viewWidth), parsePercent(seriesModel.get('maxSize'), viewWidth)];\n var dataExtent = data.getDataExtent(valueDim);\n var min = seriesModel.get('min');\n var max = seriesModel.get('max');\n\n if (min == null) {\n min = Math.min(dataExtent[0], 0);\n }\n\n if (max == null) {\n max = dataExtent[1];\n }\n\n var funnelAlign = seriesModel.get('funnelAlign');\n var gap = seriesModel.get('gap');\n var viewSize = orient === 'horizontal' ? viewWidth : viewHeight;\n var itemSize = (viewSize - gap * (data.count() - 1)) / data.count();\n\n var getLinePoints = function (idx, offset) {\n // End point index is data.count() and we assign it 0\n if (orient === 'horizontal') {\n var val = data.get(valueDim, idx) || 0;\n var itemHeight = linearMap(val, [min, max], sizeExtent, true);\n var y0;\n\n switch (funnelAlign) {\n case 'top':\n y0 = y;\n break;\n\n case 'center':\n y0 = y + (viewHeight - itemHeight) / 2;\n break;\n\n case 'bottom':\n y0 = y + (viewHeight - itemHeight);\n break;\n }\n\n return [[offset, y0], [offset, y0 + itemHeight]];\n }\n\n var val = data.get(valueDim, idx) || 0;\n var itemWidth = linearMap(val, [min, max], sizeExtent, true);\n var x0;\n\n switch (funnelAlign) {\n case 'left':\n x0 = x;\n break;\n\n case 'center':\n x0 = x + (viewWidth - itemWidth) / 2;\n break;\n\n case 'right':\n x0 = x + viewWidth - itemWidth;\n break;\n }\n\n return [[x0, offset], [x0 + itemWidth, offset]];\n };\n\n if (sort === 'ascending') {\n // From bottom to top\n itemSize = -itemSize;\n gap = -gap;\n\n if (orient === 'horizontal') {\n x += viewWidth;\n } else {\n y += viewHeight;\n }\n\n indices = indices.reverse();\n }\n\n for (var i = 0; i < indices.length; i++) {\n var idx = indices[i];\n var nextIdx = indices[i + 1];\n var itemModel = data.getItemModel(idx);\n\n if (orient === 'horizontal') {\n var width = itemModel.get('itemStyle.width');\n\n if (width == null) {\n width = itemSize;\n } else {\n width = parsePercent(width, viewWidth);\n\n if (sort === 'ascending') {\n width = -width;\n }\n }\n\n var start = getLinePoints(idx, x);\n var end = getLinePoints(nextIdx, x + width);\n x += width + gap;\n data.setItemLayout(idx, {\n points: start.concat(end.slice().reverse())\n });\n } else {\n var height = itemModel.get('itemStyle.height');\n\n if (height == null) {\n height = itemSize;\n } else {\n height = parsePercent(height, viewHeight);\n\n if (sort === 'ascending') {\n height = -height;\n }\n }\n\n var start = orient === 'horizontal' ? getLinePoints(idx, x) : getLinePoints(idx, y);\n var end = orient === 'horizontal' ? getLinePoints(nextIdx, x + width) : getLinePoints(nextIdx, y + height);\n y += height + gap;\n data.setItemLayout(idx, {\n points: start.concat(end.slice().reverse())\n });\n }\n }\n\n labelLayout(data);\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar _poly = require(\"../line/poly\");\n\nvar Polygon = _poly.Polygon;\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar bind = _util.bind;\nvar extend = _util.extend;\n\nvar DataDiffer = require(\"../../data/DataDiffer\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = echarts.extendChartView({\n type: 'themeRiver',\n init: function () {\n this._layers = [];\n },\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var group = this.group;\n var layerSeries = seriesModel.getLayerSeries();\n var layoutInfo = data.getLayout('layoutInfo');\n var rect = layoutInfo.rect;\n var boundaryGap = layoutInfo.boundaryGap;\n group.attr('position', [0, rect.y + boundaryGap[0]]);\n\n function keyGetter(item) {\n return item.name;\n }\n\n var dataDiffer = new DataDiffer(this._layersSeries || [], layerSeries, keyGetter, keyGetter);\n var newLayersGroups = {};\n dataDiffer.add(bind(process, this, 'add')).update(bind(process, this, 'update')).remove(bind(process, this, 'remove')).execute();\n\n function process(status, idx, oldIdx) {\n var oldLayersGroups = this._layers;\n\n if (status === 'remove') {\n group.remove(oldLayersGroups[idx]);\n return;\n }\n\n var points0 = [];\n var points1 = [];\n var color;\n var indices = layerSeries[idx].indices;\n\n for (var j = 0; j < indices.length; j++) {\n var layout = data.getItemLayout(indices[j]);\n var x = layout.x;\n var y0 = layout.y0;\n var y = layout.y;\n points0.push([x, y0]);\n points1.push([x, y0 + y]);\n color = data.getItemVisual(indices[j], 'color');\n }\n\n var polygon;\n var text;\n var textLayout = data.getItemLayout(indices[0]);\n var itemModel = data.getItemModel(indices[j - 1]);\n var labelModel = itemModel.getModel('label');\n var margin = labelModel.get('margin');\n\n if (status === 'add') {\n var layerGroup = newLayersGroups[idx] = new graphic.Group();\n polygon = new Polygon({\n shape: {\n points: points0,\n stackedOnPoints: points1,\n smooth: 0.4,\n stackedOnSmooth: 0.4,\n smoothConstraint: false\n },\n z2: 0\n });\n text = new graphic.Text({\n style: {\n x: textLayout.x - margin,\n y: textLayout.y0 + textLayout.y / 2\n }\n });\n layerGroup.add(polygon);\n layerGroup.add(text);\n group.add(layerGroup);\n polygon.setClipPath(createGridClipShape(polygon.getBoundingRect(), seriesModel, function () {\n polygon.removeClipPath();\n }));\n } else {\n var layerGroup = oldLayersGroups[oldIdx];\n polygon = layerGroup.childAt(0);\n text = layerGroup.childAt(1);\n group.add(layerGroup);\n newLayersGroups[idx] = layerGroup;\n graphic.updateProps(polygon, {\n shape: {\n points: points0,\n stackedOnPoints: points1\n }\n }, seriesModel);\n graphic.updateProps(text, {\n style: {\n x: textLayout.x - margin,\n y: textLayout.y0 + textLayout.y / 2\n }\n }, seriesModel);\n }\n\n var hoverItemStyleModel = itemModel.getModel('emphasis.itemStyle');\n var itemStyleModel = itemModel.getModel('itemStyle');\n graphic.setTextStyle(text.style, labelModel, {\n text: labelModel.get('show') ? seriesModel.getFormattedLabel(indices[j - 1], 'normal') || data.getName(indices[j - 1]) : null,\n textVerticalAlign: 'middle'\n });\n polygon.setStyle(extend({\n fill: color\n }, itemStyleModel.getItemStyle(['color'])));\n graphic.setHoverStyle(polygon, hoverItemStyleModel.getItemStyle());\n }\n\n this._layersSeries = layerSeries;\n this._layers = newLayersGroups;\n },\n dispose: function () {}\n}); // add animation to the view\n\n\nfunction createGridClipShape(rect, seriesModel, cb) {\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x - 10,\n y: rect.y - 10,\n width: 0,\n height: rect.height + 20\n }\n });\n graphic.initProps(rectEl, {\n shape: {\n width: rect.width + 20,\n height: rect.height + 20\n }\n }, seriesModel, cb);\n return rectEl;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\nvar linearMap = _number.linearMap;\n\nvar layout = require(\"../../util/layout\");\n\nvar labelLayout = require(\"./labelLayout\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\n\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n\nfunction _default(seriesType, ecModel, api, payload) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var viewRect = getViewRect(seriesModel, api);\n var center = seriesModel.get('center');\n var radius = seriesModel.get('radius');\n\n if (!zrUtil.isArray(radius)) {\n radius = [0, radius];\n }\n\n if (!zrUtil.isArray(center)) {\n center = [center, center];\n }\n\n var width = parsePercent(viewRect.width, api.getWidth());\n var height = parsePercent(viewRect.height, api.getHeight());\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], width) + viewRect.x;\n var cy = parsePercent(center[1], height) + viewRect.y;\n var r0 = parsePercent(radius[0], size / 2);\n var r = parsePercent(radius[1], size / 2);\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n var validDataCount = 0;\n data.each(valueDim, function (value) {\n !isNaN(value) && validDataCount++;\n });\n var sum = data.getSum(valueDim); // Sum may be 0\n\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n var clockwise = seriesModel.get('clockwise');\n var roseType = seriesModel.get('roseType');\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // [0...max]\n\n var extent = data.getDataExtent(valueDim);\n extent[0] = 0; // In the case some sector angle is smaller than minAngle\n\n var restAngle = PI2;\n var valueSumLargerThanMinAngle = 0;\n var currentAngle = startAngle;\n var dir = clockwise ? 1 : -1;\n data.each(valueDim, function (value, idx) {\n var angle;\n\n if (isNaN(value)) {\n data.setItemLayout(idx, {\n angle: NaN,\n startAngle: NaN,\n endAngle: NaN,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? NaN : r,\n viewRect: viewRect\n });\n return;\n } // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样?\n\n\n if (roseType !== 'area') {\n angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian;\n } else {\n angle = PI2 / validDataCount;\n }\n\n if (angle < minAngle) {\n angle = minAngle;\n restAngle -= minAngle;\n } else {\n valueSumLargerThanMinAngle += value;\n }\n\n var endAngle = currentAngle + dir * angle;\n data.setItemLayout(idx, {\n angle: angle,\n startAngle: currentAngle,\n endAngle: endAngle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? linearMap(value, extent, [r0, r]) : r,\n viewRect: viewRect\n });\n currentAngle = endAngle;\n }); // Some sector is constrained by minAngle\n // Rest sectors needs recalculate angle\n\n if (restAngle < PI2 && validDataCount) {\n // Average the angle if rest angle is not enough after all angles is\n // Constrained by minAngle\n if (restAngle <= 1e-3) {\n var angle = PI2 / validDataCount;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout = data.getItemLayout(idx);\n layout.angle = angle;\n layout.startAngle = startAngle + dir * idx * angle;\n layout.endAngle = startAngle + dir * (idx + 1) * angle;\n }\n });\n } else {\n unitRadian = restAngle / valueSumLargerThanMinAngle;\n currentAngle = startAngle;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout = data.getItemLayout(idx);\n var angle = layout.angle === minAngle ? minAngle : value * unitRadian;\n layout.startAngle = currentAngle;\n layout.endAngle = currentAngle + dir * angle;\n currentAngle += dir * angle;\n }\n });\n }\n }\n\n labelLayout(seriesModel, r, viewRect.width, viewRect.height, viewRect.x, viewRect.y);\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n var paletteScope = {};\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var categoriesData = seriesModel.getCategoriesData();\n var data = seriesModel.getData();\n var categoryNameIdxMap = {};\n categoriesData.each(function (idx) {\n var name = categoriesData.getName(idx); // Add prefix to avoid conflict with Object.prototype.\n\n categoryNameIdxMap['ec-' + name] = idx;\n var itemModel = categoriesData.getItemModel(idx);\n var color = itemModel.get('itemStyle.color') || seriesModel.getColorFromPalette(name, paletteScope);\n categoriesData.setItemVisual(idx, 'color', color);\n var itemStyleList = ['opacity', 'symbol', 'symbolSize', 'symbolKeepAspect'];\n\n for (var i = 0; i < itemStyleList.length; i++) {\n var itemStyle = itemModel.getShallow(itemStyleList[i], true);\n\n if (itemStyle != null) {\n categoriesData.setItemVisual(idx, itemStyleList[i], itemStyle);\n }\n }\n }); // Assign category color to visual\n\n if (categoriesData.count()) {\n data.each(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\n\n if (category != null) {\n if (typeof category === 'string') {\n category = categoryNameIdxMap['ec-' + category];\n }\n\n var itemStyleList = ['color', 'opacity', 'symbol', 'symbolSize', 'symbolKeepAspect'];\n\n for (var i = 0; i < itemStyleList.length; i++) {\n if (data.getItemVisual(idx, itemStyleList[i], true) == null) {\n data.setItemVisual(idx, itemStyleList[i], categoriesData.getItemVisual(category, itemStyleList[i]));\n }\n }\n }\n });\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar preprocessor = require(\"./visualMap/preprocessor\");\n\nrequire(\"./visualMap/typeDefaulter\");\n\nrequire(\"./visualMap/visualEncoding\");\n\nrequire(\"./visualMap/PiecewiseModel\");\n\nrequire(\"./visualMap/PiecewiseView\");\n\nrequire(\"./visualMap/visualMapAction\");\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 * DataZoom component entry\n */\necharts.registerPreprocessor(preprocessor);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar VisualMapping = require(\"./VisualMapping\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @file Visual solution, for consistent option specification.\n */\nvar each = zrUtil.each;\n\nfunction hasKeys(obj) {\n if (obj) {\n for (var name in obj) {\n if (obj.hasOwnProperty(name)) {\n return true;\n }\n }\n }\n}\n/**\n * @param {Object} option\n * @param {Array.} stateList\n * @param {Function} [supplementVisualOption]\n * @return {Object} visualMappings >\n */\n\n\nfunction createVisualMappings(option, stateList, supplementVisualOption) {\n var visualMappings = {};\n each(stateList, function (state) {\n var mappings = visualMappings[state] = createMappings();\n each(option[state], function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n\n var mappingOption = {\n type: visualType,\n visual: visualData\n };\n supplementVisualOption && supplementVisualOption(mappingOption, state);\n mappings[visualType] = new VisualMapping(mappingOption); // Prepare a alpha for opacity, for some case that opacity\n // is not supported, such as rendering using gradient color.\n\n if (visualType === 'opacity') {\n mappingOption = zrUtil.clone(mappingOption);\n mappingOption.type = 'colorAlpha';\n mappings.__hidden.__alphaForOpacity = new VisualMapping(mappingOption);\n }\n });\n });\n return visualMappings;\n\n function createMappings() {\n var Creater = function () {}; // Make sure hidden fields will not be visited by\n // object iteration (with hasOwnProperty checking).\n\n\n Creater.prototype.__hidden = Creater.prototype;\n var obj = new Creater();\n return obj;\n }\n}\n/**\n * @param {Object} thisOption\n * @param {Object} newOption\n * @param {Array.} keys\n */\n\n\nfunction replaceVisualOption(thisOption, newOption, keys) {\n // Visual attributes merge is not supported, otherwise it\n // brings overcomplicated merge logic. See #2853. So if\n // newOption has anyone of these keys, all of these keys\n // will be reset. Otherwise, all keys remain.\n var has;\n zrUtil.each(keys, function (key) {\n if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) {\n has = true;\n }\n });\n has && zrUtil.each(keys, function (key) {\n if (newOption.hasOwnProperty(key) && hasKeys(newOption[key])) {\n thisOption[key] = zrUtil.clone(newOption[key]);\n } else {\n delete thisOption[key];\n }\n });\n}\n/**\n * @param {Array.} stateList\n * @param {Object} visualMappings >\n * @param {module:echarts/data/List} list\n * @param {Function} getValueState param: valueOrIndex, return: state.\n * @param {object} [scope] Scope for getValueState\n * @param {string} [dimension] Concrete dimension, if used.\n */\n// ???! handle brush?\n\n\nfunction applyVisual(stateList, visualMappings, data, getValueState, scope, dimension) {\n var visualTypesMap = {};\n zrUtil.each(stateList, function (state) {\n var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);\n visualTypesMap[state] = visualTypes;\n });\n var dataIndex;\n\n function getVisual(key) {\n return data.getItemVisual(dataIndex, key);\n }\n\n function setVisual(key, value) {\n data.setItemVisual(dataIndex, key, value);\n }\n\n if (dimension == null) {\n data.each(eachItem);\n } else {\n data.each([dimension], eachItem);\n }\n\n function eachItem(valueOrIndex, index) {\n dataIndex = dimension == null ? valueOrIndex : index;\n var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance\n\n if (rawDataItem && rawDataItem.visualMap === false) {\n return;\n }\n\n var valueState = getValueState.call(scope, valueOrIndex);\n var mappings = visualMappings[valueState];\n var visualTypes = visualTypesMap[valueState];\n\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n mappings[type] && mappings[type].applyVisual(valueOrIndex, getVisual, setVisual);\n }\n }\n}\n/**\n * @param {module:echarts/data/List} data\n * @param {Array.} stateList\n * @param {Object} visualMappings >\n * @param {Function} getValueState param: valueOrIndex, return: state.\n * @param {number} [dim] dimension or dimension index.\n */\n\n\nfunction incrementalApplyVisual(stateList, visualMappings, getValueState, dim) {\n var visualTypesMap = {};\n zrUtil.each(stateList, function (state) {\n var visualTypes = VisualMapping.prepareVisualTypes(visualMappings[state]);\n visualTypesMap[state] = visualTypes;\n });\n\n function progress(params, data) {\n if (dim != null) {\n dim = data.getDimension(dim);\n }\n\n function getVisual(key) {\n return data.getItemVisual(dataIndex, key);\n }\n\n function setVisual(key, value) {\n data.setItemVisual(dataIndex, key, value);\n }\n\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var rawDataItem = data.getRawDataItem(dataIndex); // Consider performance\n\n if (rawDataItem && rawDataItem.visualMap === false) {\n continue;\n }\n\n var value = dim != null ? data.get(dim, dataIndex, true) : dataIndex;\n var valueState = getValueState(value);\n var mappings = visualMappings[valueState];\n var visualTypes = visualTypesMap[valueState];\n\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n mappings[type] && mappings[type].applyVisual(value, getVisual, setVisual);\n }\n }\n }\n\n return {\n progress: progress\n };\n}\n\nexports.createVisualMappings = createVisualMappings;\nexports.replaceVisualOption = replaceVisualOption;\nexports.applyVisual = applyVisual;\nexports.incrementalApplyVisual = incrementalApplyVisual;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar createHashMap = _util.createHashMap;\nvar each = _util.each;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerProcessor({\n // `dataZoomProcessor` will only be performed in needed series. Consider if\n // there is a line series and a pie series, it is better not to update the\n // line series if only pie series is needed to be updated.\n getTargetSeries: function (ecModel) {\n var seriesModelMap = createHashMap();\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) {\n var axisProxy = dataZoomModel.getAxisProxy(dimNames.name, axisIndex);\n each(axisProxy.getTargetSeriesModels(), function (seriesModel) {\n seriesModelMap.set(seriesModel.uid, seriesModel);\n });\n });\n });\n return seriesModelMap;\n },\n modifyOutputEnd: true,\n // Consider appendData, where filter should be performed. Because data process is\n // in block mode currently, it is not need to worry about that the overallProgress\n // execute every frame.\n overallReset: function (ecModel, api) {\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n // We calculate window and reset axis here but not in model\n // init stage and not after action dispatch handler, because\n // reset should be called after seriesData.restoreData.\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) {\n dataZoomModel.getAxisProxy(dimNames.name, axisIndex).reset(dataZoomModel, api);\n }); // Caution: data zoom filtering is order sensitive when using\n // percent range and no min/max/scale set on axis.\n // For example, we have dataZoom definition:\n // [\n // {xAxisIndex: 0, start: 30, end: 70},\n // {yAxisIndex: 0, start: 20, end: 80}\n // ]\n // In this case, [20, 80] of y-dataZoom should be based on data\n // that have filtered by x-dataZoom using range of [30, 70],\n // but should not be based on full raw data. Thus sliding\n // x-dataZoom will change both ranges of xAxis and yAxis,\n // while sliding y-dataZoom will only change the range of yAxis.\n // So we should filter x-axis after reset x-axis immediately,\n // and then reset y-axis and filter y-axis.\n\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel) {\n dataZoomModel.getAxisProxy(dimNames.name, axisIndex).filterData(dataZoomModel, api);\n });\n });\n ecModel.eachComponent('dataZoom', function (dataZoomModel) {\n // Fullfill all of the range props so that user\n // is able to get them from chart.getOption().\n var axisProxy = dataZoomModel.findRepresentativeAxisProxy();\n var percentRange = axisProxy.getDataPercentWindow();\n var valueRange = axisProxy.getDataValueWindow();\n dataZoomModel.setCalculatedRange({\n start: percentRange[0],\n end: percentRange[1],\n startValue: valueRange[0],\n endValue: valueRange[1]\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\nvar echarts = require(\"../echarts\");\n\nrequire(\"../coord/single/singleCreator\");\n\nrequire(\"./axis/SingleAxisView\");\n\nrequire(\"../coord/single/AxisModel\");\n\nrequire(\"./axisPointer\");\n\nrequire(\"./axisPointer/SingleAxisPointer\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.extendComponentView({\n type: 'single'\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar preprocessor = require(\"./brush/preprocessor\");\n\nrequire(\"./brush/visualEncoding\");\n\nrequire(\"./brush/BrushModel\");\n\nrequire(\"./brush/BrushView\");\n\nrequire(\"./brush/brushAction\");\n\nrequire(\"./toolbox/feature/Brush\");\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 * Brush component entry\n */\necharts.registerPreprocessor(preprocessor);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar borderColorQuery = ['itemStyle', 'borderColor'];\n\nfunction _default(ecModel, api) {\n var globalColors = ecModel.get('color');\n ecModel.eachRawSeriesByType('boxplot', function (seriesModel) {\n var defaulColor = globalColors[seriesModel.seriesIndex % globalColors.length];\n var data = seriesModel.getData();\n data.setVisual({\n legendSymbol: 'roundRect',\n // Use name 'color' but not 'borderColor' for legend usage and\n // visual coding from other component like dataRange.\n color: seriesModel.get(borderColorQuery) || defaulColor\n }); // Only visible series has each data be visual encoded\n\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n data.each(function (idx) {\n var itemModel = data.getItemModel(idx);\n data.setItemVisual(idx, {\n color: itemModel.get(borderColorQuery, true)\n });\n });\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar createListFromArray = require(\"../helper/createListFromArray\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.__base_bar__',\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {\n useEncodeDefaulter: true\n });\n },\n getMarkerPosition: function (value) {\n var coordSys = this.coordinateSystem;\n\n if (coordSys) {\n // PENDING if clamp ?\n var pt = coordSys.dataToPoint(coordSys.clampData(value));\n var data = this.getData();\n var offset = data.getLayout('offset');\n var size = data.getLayout('size');\n var offsetIndex = coordSys.getBaseAxis().isHorizontal() ? 0 : 1;\n pt[offsetIndex] += offset + size / 2;\n return pt;\n }\n\n return [NaN, NaN];\n },\n defaultOption: {\n zlevel: 0,\n // 一级层叠\n z: 2,\n // 二级层叠\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n // stack: null\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // 最小高度改为0\n barMinHeight: 0,\n // 最小角度为0,仅对极坐标系下的柱状图有效\n barMinAngle: 0,\n // cursor: null,\n large: false,\n largeThreshold: 400,\n progressive: 3e3,\n progressiveChunkMode: 'mod',\n // barMaxWidth: null,\n // In cartesian, the default value is 1. Otherwise null.\n // barMinWidth: null,\n // 默认自适应\n // barWidth: null,\n // 柱间距离,默认为柱形宽度的30%,可设固定值\n // barGap: '30%',\n // 类目间柱形距离,默认为类目间距的20%,可设固定值\n // barCategoryGap: '20%',\n // label: {\n // show: false\n // },\n itemStyle: {},\n emphasis: {}\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar VisualMapModel = require(\"./VisualMapModel\");\n\nvar numberUtil = require(\"../../util/number\");\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// Constant\nvar DEFAULT_BAR_BOUND = [20, 140];\nvar ContinuousModel = VisualMapModel.extend({\n type: 'visualMap.continuous',\n\n /**\n * @protected\n */\n defaultOption: {\n align: 'auto',\n // 'auto', 'left', 'right', 'top', 'bottom'\n calculable: false,\n // This prop effect default component type determine,\n // See echarts/component/visualMap/typeDefaulter.\n range: null,\n // selected range. In default case `range` is [min, max]\n // and can auto change along with modification of min max,\n // util use specifid a range.\n realtime: true,\n // Whether realtime update.\n itemHeight: null,\n // The length of the range control edge.\n itemWidth: null,\n // The length of the other side.\n hoverLink: true,\n // Enable hover highlight.\n hoverLinkDataSize: null,\n // The size of hovered data.\n hoverLinkOnHandle: null // Whether trigger hoverLink when hover handle.\n // If not specified, follow the value of `realtime`.\n\n },\n\n /**\n * @override\n */\n optionUpdated: function (newOption, isInit) {\n ContinuousModel.superApply(this, 'optionUpdated', arguments);\n this.resetExtent();\n this.resetVisual(function (mappingOption) {\n mappingOption.mappingMethod = 'linear';\n mappingOption.dataExtent = this.getExtent();\n });\n\n this._resetRange();\n },\n\n /**\n * @protected\n * @override\n */\n resetItemSize: function () {\n ContinuousModel.superApply(this, 'resetItemSize', arguments);\n var itemSize = this.itemSize;\n this._orient === 'horizontal' && itemSize.reverse();\n (itemSize[0] == null || isNaN(itemSize[0])) && (itemSize[0] = DEFAULT_BAR_BOUND[0]);\n (itemSize[1] == null || isNaN(itemSize[1])) && (itemSize[1] = DEFAULT_BAR_BOUND[1]);\n },\n\n /**\n * @private\n */\n _resetRange: function () {\n var dataExtent = this.getExtent();\n var range = this.option.range;\n\n if (!range || range.auto) {\n // `range` should always be array (so we dont use other\n // value like 'auto') for user-friend. (consider getOption).\n dataExtent.auto = 1;\n this.option.range = dataExtent;\n } else if (zrUtil.isArray(range)) {\n if (range[0] > range[1]) {\n range.reverse();\n }\n\n range[0] = Math.max(range[0], dataExtent[0]);\n range[1] = Math.min(range[1], dataExtent[1]);\n }\n },\n\n /**\n * @protected\n * @override\n */\n completeVisualOption: function () {\n VisualMapModel.prototype.completeVisualOption.apply(this, arguments);\n zrUtil.each(this.stateList, function (state) {\n var symbolSize = this.option.controller[state].symbolSize;\n\n if (symbolSize && symbolSize[0] !== symbolSize[1]) {\n symbolSize[0] = 0; // For good looking.\n }\n }, this);\n },\n\n /**\n * @override\n */\n setSelected: function (selected) {\n this.option.range = selected.slice();\n\n this._resetRange();\n },\n\n /**\n * @public\n */\n getSelected: function () {\n var dataExtent = this.getExtent();\n var dataInterval = numberUtil.asc((this.get('range') || []).slice()); // Clamp\n\n dataInterval[0] > dataExtent[1] && (dataInterval[0] = dataExtent[1]);\n dataInterval[1] > dataExtent[1] && (dataInterval[1] = dataExtent[1]);\n dataInterval[0] < dataExtent[0] && (dataInterval[0] = dataExtent[0]);\n dataInterval[1] < dataExtent[0] && (dataInterval[1] = dataExtent[0]);\n return dataInterval;\n },\n\n /**\n * @override\n */\n getValueState: function (value) {\n var range = this.option.range;\n var dataExtent = this.getExtent(); // When range[0] === dataExtent[0], any value larger than dataExtent[0] maps to 'inRange'.\n // range[1] is processed likewise.\n\n return (range[0] <= dataExtent[0] || range[0] <= value) && (range[1] >= dataExtent[1] || value <= range[1]) ? 'inRange' : 'outOfRange';\n },\n\n /**\n * @params {Array.} range target value: range[0] <= value && value <= range[1]\n * @return {Array.} [{seriesId, dataIndices: >}, ...]\n */\n findTargetDataIndices: function (range) {\n var result = [];\n this.eachTargetSeries(function (seriesModel) {\n var dataIndices = [];\n var data = seriesModel.getData();\n data.each(this.getDataDimension(data), function (value, dataIndex) {\n range[0] <= value && value <= range[1] && dataIndices.push(dataIndex);\n }, this);\n result.push({\n seriesId: seriesModel.id,\n dataIndex: dataIndices\n });\n }, this);\n return result;\n },\n\n /**\n * @implement\n */\n getVisualMeta: function (getColorVisual) {\n var oVals = getColorStopValues(this, 'outOfRange', this.getExtent());\n var iVals = getColorStopValues(this, 'inRange', this.option.range.slice());\n var stops = [];\n\n function setStop(value, valueState) {\n stops.push({\n value: value,\n color: getColorVisual(value, valueState)\n });\n } // Format to: outOfRange -- inRange -- outOfRange.\n\n\n var iIdx = 0;\n var oIdx = 0;\n var iLen = iVals.length;\n var oLen = oVals.length;\n\n for (; oIdx < oLen && (!iVals.length || oVals[oIdx] <= iVals[0]); oIdx++) {\n // If oVal[oIdx] === iVals[iIdx], oVal[oIdx] should be ignored.\n if (oVals[oIdx] < iVals[iIdx]) {\n setStop(oVals[oIdx], 'outOfRange');\n }\n }\n\n for (var first = 1; iIdx < iLen; iIdx++, first = 0) {\n // If range is full, value beyond min, max will be clamped.\n // make a singularity\n first && stops.length && setStop(iVals[iIdx], 'outOfRange');\n setStop(iVals[iIdx], 'inRange');\n }\n\n for (var first = 1; oIdx < oLen; oIdx++) {\n if (!iVals.length || iVals[iVals.length - 1] < oVals[oIdx]) {\n // make a singularity\n if (first) {\n stops.length && setStop(stops[stops.length - 1].value, 'outOfRange');\n first = 0;\n }\n\n setStop(oVals[oIdx], 'outOfRange');\n }\n }\n\n var stopsLen = stops.length;\n return {\n stops: stops,\n outerColors: [stopsLen ? stops[0].color : 'transparent', stopsLen ? stops[stopsLen - 1].color : 'transparent']\n };\n }\n});\n\nfunction getColorStopValues(visualMapModel, valueState, dataExtent) {\n if (dataExtent[0] === dataExtent[1]) {\n return dataExtent.slice();\n } // When using colorHue mapping, it is not linear color any more.\n // Moreover, canvas gradient seems not to be accurate linear.\n // FIXME\n // Should be arbitrary value 100? or based on pixel size?\n\n\n var count = 200;\n var step = (dataExtent[1] - dataExtent[0]) / count;\n var value = dataExtent[0];\n var stopValues = [];\n\n for (var i = 0; i <= count && value < dataExtent[1]; i++) {\n stopValues.push(value);\n value += step;\n }\n\n stopValues.push(dataExtent[1]);\n return stopValues;\n}\n\nvar _default = ContinuousModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n var axis = this.getAxis();\n var val = dataItem instanceof Array ? dataItem[0] : dataItem;\n var halfSize = (dataSize instanceof Array ? dataSize[0] : dataSize) / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n}\n\nfunction _default(coordSys) {\n var rect = coordSys.getRect();\n return {\n coordSys: {\n type: 'singleAxis',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n api: {\n coord: function (val) {\n // do not provide \"out\" param\n return coordSys.dataToPoint(val);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar List = require(\"../../data/List\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar markerHelper = require(\"./markerHelper\");\n\nvar LineDraw = require(\"../../chart/helper/LineDraw\");\n\nvar MarkerView = require(\"./MarkerView\");\n\nvar _dataStackHelper = require(\"../../data/helper/dataStackHelper\");\n\nvar getStackedDimension = _dataStackHelper.getStackedDimension;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar markLineTransform = function (seriesModel, coordSys, mlModel, item) {\n var data = seriesModel.getData(); // Special type markLine like 'min', 'max', 'average', 'median'\n\n var mlType = item.type;\n\n if (!zrUtil.isArray(item) && (mlType === 'min' || mlType === 'max' || mlType === 'average' || mlType === 'median' // In case\n // data: [{\n // yAxis: 10\n // }]\n || item.xAxis != null || item.yAxis != null)) {\n var valueAxis;\n var value;\n\n if (item.yAxis != null || item.xAxis != null) {\n valueAxis = coordSys.getAxis(item.yAxis != null ? 'y' : 'x');\n value = zrUtil.retrieve(item.yAxis, item.xAxis);\n } else {\n var axisInfo = markerHelper.getAxisInfo(item, data, coordSys, seriesModel);\n valueAxis = axisInfo.valueAxis;\n var valueDataDim = getStackedDimension(data, axisInfo.valueDataDim);\n value = markerHelper.numCalculate(data, valueDataDim, mlType);\n }\n\n var valueIndex = valueAxis.dim === 'x' ? 0 : 1;\n var baseIndex = 1 - valueIndex;\n var mlFrom = zrUtil.clone(item);\n var mlTo = {};\n mlFrom.type = null;\n mlFrom.coord = [];\n mlTo.coord = [];\n mlFrom.coord[baseIndex] = -Infinity;\n mlTo.coord[baseIndex] = Infinity;\n var precision = mlModel.get('precision');\n\n if (precision >= 0 && typeof value === 'number') {\n value = +value.toFixed(Math.min(precision, 20));\n }\n\n mlFrom.coord[valueIndex] = mlTo.coord[valueIndex] = value;\n item = [mlFrom, mlTo, {\n // Extra option for tooltip and label\n type: mlType,\n valueIndex: item.valueIndex,\n // Force to use the value of calculated value.\n value: value\n }];\n }\n\n item = [markerHelper.dataTransform(seriesModel, item[0]), markerHelper.dataTransform(seriesModel, item[1]), zrUtil.extend({}, item[2])]; // Avoid line data type is extended by from(to) data type\n\n item[2].type = item[2].type || ''; // Merge from option and to option into line option\n\n zrUtil.merge(item[2], item[0]);\n zrUtil.merge(item[2], item[1]);\n return item;\n};\n\nfunction isInifinity(val) {\n return !isNaN(val) && !isFinite(val);\n} // If a markLine has one dim\n\n\nfunction ifMarkLineHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) {\n var otherDimIndex = 1 - dimIndex;\n var dimName = coordSys.dimensions[dimIndex];\n return isInifinity(fromCoord[otherDimIndex]) && isInifinity(toCoord[otherDimIndex]) && fromCoord[dimIndex] === toCoord[dimIndex] && coordSys.getAxis(dimName).containData(fromCoord[dimIndex]);\n}\n\nfunction markLineFilter(coordSys, item) {\n if (coordSys.type === 'cartesian2d') {\n var fromCoord = item[0].coord;\n var toCoord = item[1].coord; // In case\n // {\n // markLine: {\n // data: [{ yAxis: 2 }]\n // }\n // }\n\n if (fromCoord && toCoord && (ifMarkLineHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkLineHasOnlyDim(0, fromCoord, toCoord, coordSys))) {\n return true;\n }\n }\n\n return markerHelper.dataFilter(coordSys, item[0]) && markerHelper.dataFilter(coordSys, item[1]);\n}\n\nfunction updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var itemModel = data.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight());\n\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n } else {\n // Chart like bar may have there own marker positioning logic\n if (seriesModel.getMarkerPosition) {\n // Use the getMarkerPoisition\n point = seriesModel.getMarkerPosition(data.getValues(data.dimensions, idx));\n } else {\n var dims = coordSys.dimensions;\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n point = coordSys.dataToPoint([x, y]);\n } // Expand line to the edge of grid if value on one axis is Inifnity\n // In case\n // markLine: {\n // data: [{\n // yAxis: 2\n // // or\n // type: 'average'\n // }]\n // }\n\n\n if (coordSys.type === 'cartesian2d') {\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n var dims = coordSys.dimensions;\n\n if (isInifinity(data.get(dims[0], idx))) {\n point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[isFrom ? 0 : 1]);\n } else if (isInifinity(data.get(dims[1], idx))) {\n point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[isFrom ? 0 : 1]);\n }\n } // Use x, y if has any\n\n\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n }\n\n data.setItemLayout(idx, point);\n}\n\nvar _default = MarkerView.extend({\n type: 'markLine',\n // updateLayout: function (markLineModel, ecModel, api) {\n // ecModel.eachSeries(function (seriesModel) {\n // var mlModel = seriesModel.markLineModel;\n // if (mlModel) {\n // var mlData = mlModel.getData();\n // var fromData = mlModel.__from;\n // var toData = mlModel.__to;\n // // Update visual and layout of from symbol and to symbol\n // fromData.each(function (idx) {\n // updateSingleMarkerEndLayout(fromData, idx, true, seriesModel, api);\n // updateSingleMarkerEndLayout(toData, idx, false, seriesModel, api);\n // });\n // // Update layout of line\n // mlData.each(function (idx) {\n // mlData.setItemLayout(idx, [\n // fromData.getItemLayout(idx),\n // toData.getItemLayout(idx)\n // ]);\n // });\n // this.markerGroupMap.get(seriesModel.id).updateLayout();\n // }\n // }, this);\n // },\n updateTransform: function (markLineModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var mlModel = seriesModel.markLineModel;\n\n if (mlModel) {\n var mlData = mlModel.getData();\n var fromData = mlModel.__from;\n var toData = mlModel.__to; // Update visual and layout of from symbol and to symbol\n\n fromData.each(function (idx) {\n updateSingleMarkerEndLayout(fromData, idx, true, seriesModel, api);\n updateSingleMarkerEndLayout(toData, idx, false, seriesModel, api);\n }); // Update layout of line\n\n mlData.each(function (idx) {\n mlData.setItemLayout(idx, [fromData.getItemLayout(idx), toData.getItemLayout(idx)]);\n });\n this.markerGroupMap.get(seriesModel.id).updateLayout();\n }\n }, this);\n },\n renderSeries: function (seriesModel, mlModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var lineDrawMap = this.markerGroupMap;\n var lineDraw = lineDrawMap.get(seriesId) || lineDrawMap.set(seriesId, new LineDraw());\n this.group.add(lineDraw.group);\n var mlData = createList(coordSys, seriesModel, mlModel);\n var fromData = mlData.from;\n var toData = mlData.to;\n var lineData = mlData.line;\n mlModel.__from = fromData;\n mlModel.__to = toData; // Line data for tooltip and formatter\n\n mlModel.setData(lineData);\n var symbolType = mlModel.get('symbol');\n var symbolSize = mlModel.get('symbolSize');\n\n if (!zrUtil.isArray(symbolType)) {\n symbolType = [symbolType, symbolType];\n }\n\n if (typeof symbolSize === 'number') {\n symbolSize = [symbolSize, symbolSize];\n } // Update visual and layout of from symbol and to symbol\n\n\n mlData.from.each(function (idx) {\n updateDataVisualAndLayout(fromData, idx, true);\n updateDataVisualAndLayout(toData, idx, false);\n }); // Update visual and layout of line\n\n lineData.each(function (idx) {\n var lineColor = lineData.getItemModel(idx).get('lineStyle.color');\n lineData.setItemVisual(idx, {\n color: lineColor || fromData.getItemVisual(idx, 'color')\n });\n lineData.setItemLayout(idx, [fromData.getItemLayout(idx), toData.getItemLayout(idx)]);\n lineData.setItemVisual(idx, {\n 'fromSymbolRotate': fromData.getItemVisual(idx, 'symbolRotate'),\n 'fromSymbolSize': fromData.getItemVisual(idx, 'symbolSize'),\n 'fromSymbol': fromData.getItemVisual(idx, 'symbol'),\n 'toSymbolRotate': toData.getItemVisual(idx, 'symbolRotate'),\n 'toSymbolSize': toData.getItemVisual(idx, 'symbolSize'),\n 'toSymbol': toData.getItemVisual(idx, 'symbol')\n });\n });\n lineDraw.updateData(lineData); // Set host model for tooltip\n // FIXME\n\n mlData.line.eachItemGraphicEl(function (el, idx) {\n el.traverse(function (child) {\n child.dataModel = mlModel;\n });\n });\n\n function updateDataVisualAndLayout(data, idx, isFrom) {\n var itemModel = data.getItemModel(idx);\n updateSingleMarkerEndLayout(data, idx, isFrom, seriesModel, api);\n data.setItemVisual(idx, {\n symbolRotate: itemModel.get('symbolRotate'),\n symbolSize: itemModel.get('symbolSize') || symbolSize[isFrom ? 0 : 1],\n symbol: itemModel.get('symbol', true) || symbolType[isFrom ? 0 : 1],\n color: itemModel.get('itemStyle.color') || seriesData.getVisual('color')\n });\n }\n\n lineDraw.__keep = true;\n lineDraw.group.silent = mlModel.get('silent') || seriesModel.get('silent');\n }\n});\n/**\n * @inner\n * @param {module:echarts/coord/*} coordSys\n * @param {module:echarts/model/Series} seriesModel\n * @param {module:echarts/model/Model} mpModel\n */\n\n\nfunction createList(coordSys, seriesModel, mlModel) {\n var coordDimsInfos;\n\n if (coordSys) {\n coordDimsInfos = zrUtil.map(coordSys && coordSys.dimensions, function (coordDim) {\n var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n\n return zrUtil.defaults({\n name: coordDim\n }, info);\n });\n } else {\n coordDimsInfos = [{\n name: 'value',\n type: 'float'\n }];\n }\n\n var fromData = new List(coordDimsInfos, mlModel);\n var toData = new List(coordDimsInfos, mlModel); // No dimensions\n\n var lineData = new List([], mlModel);\n var optData = zrUtil.map(mlModel.get('data'), zrUtil.curry(markLineTransform, seriesModel, coordSys, mlModel));\n\n if (coordSys) {\n optData = zrUtil.filter(optData, zrUtil.curry(markLineFilter, coordSys));\n }\n\n var dimValueGetter = coordSys ? markerHelper.dimValueGetter : function (item) {\n return item.value;\n };\n fromData.initData(zrUtil.map(optData, function (item) {\n return item[0];\n }), null, dimValueGetter);\n toData.initData(zrUtil.map(optData, function (item) {\n return item[1];\n }), null, dimValueGetter);\n lineData.initData(zrUtil.map(optData, function (item) {\n return item[2];\n }));\n lineData.hasItemOption = true;\n return {\n from: fromData,\n to: toData,\n line: lineData\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./sankey/SankeySeries\");\n\nrequire(\"./sankey/SankeyView\");\n\nrequire(\"./sankey/sankeyAction\");\n\nvar sankeyLayout = require(\"./sankey/sankeyLayout\");\n\nvar sankeyVisual = require(\"./sankey/sankeyVisual\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerLayout(sankeyLayout);\necharts.registerVisual(sankeyVisual);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _echarts = require(\"./lib/echarts\");\n\n(function () {\n for (var key in _echarts) {\n if (_echarts == null || !_echarts.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;\n exports[key] = _echarts[key];\n }\n})();\n\nvar _export = require(\"./lib/export\");\n\n(function () {\n for (var key in _export) {\n if (_export == null || !_export.hasOwnProperty(key) || key === 'default' || key === '__esModule') return;\n exports[key] = _export[key];\n }\n})();\n\nrequire(\"./lib/component/dataset\");\n\nrequire(\"./lib/chart/line\");\n\nrequire(\"./lib/chart/bar\");\n\nrequire(\"./lib/chart/pie\");\n\nrequire(\"./lib/chart/scatter\");\n\nrequire(\"./lib/chart/radar\");\n\nrequire(\"./lib/chart/map\");\n\nrequire(\"./lib/chart/tree\");\n\nrequire(\"./lib/chart/treemap\");\n\nrequire(\"./lib/chart/graph\");\n\nrequire(\"./lib/chart/gauge\");\n\nrequire(\"./lib/chart/funnel\");\n\nrequire(\"./lib/chart/parallel\");\n\nrequire(\"./lib/chart/sankey\");\n\nrequire(\"./lib/chart/boxplot\");\n\nrequire(\"./lib/chart/candlestick\");\n\nrequire(\"./lib/chart/effectScatter\");\n\nrequire(\"./lib/chart/lines\");\n\nrequire(\"./lib/chart/heatmap\");\n\nrequire(\"./lib/chart/pictorialBar\");\n\nrequire(\"./lib/chart/themeRiver\");\n\nrequire(\"./lib/chart/sunburst\");\n\nrequire(\"./lib/chart/custom\");\n\nrequire(\"./lib/component/grid\");\n\nrequire(\"./lib/component/polar\");\n\nrequire(\"./lib/component/geo\");\n\nrequire(\"./lib/component/singleAxis\");\n\nrequire(\"./lib/component/parallel\");\n\nrequire(\"./lib/component/calendar\");\n\nrequire(\"./lib/component/graphic\");\n\nrequire(\"./lib/component/toolbox\");\n\nrequire(\"./lib/component/tooltip\");\n\nrequire(\"./lib/component/axisPointer\");\n\nrequire(\"./lib/component/brush\");\n\nrequire(\"./lib/component/title\");\n\nrequire(\"./lib/component/timeline\");\n\nrequire(\"./lib/component/markPoint\");\n\nrequire(\"./lib/component/markLine\");\n\nrequire(\"./lib/component/markArea\");\n\nrequire(\"./lib/component/legendScroll\");\n\nrequire(\"./lib/component/legend\");\n\nrequire(\"./lib/component/dataZoom\");\n\nrequire(\"./lib/component/dataZoomInside\");\n\nrequire(\"./lib/component/dataZoomSlider\");\n\nrequire(\"./lib/component/visualMap\");\n\nrequire(\"./lib/component/visualMapContinuous\");\n\nrequire(\"./lib/component/visualMapPiecewise\");\n\nrequire(\"zrender/lib/vml/vml\");\n\nrequire(\"zrender/lib/svg/svg\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Link lists and struct (graph or tree)\n */\nvar each = zrUtil.each;\nvar DATAS = '\\0__link_datas';\nvar MAIN_DATA = '\\0__link_mainData'; // Caution:\n// In most case, either list or its shallow clones (see list.cloneShallow)\n// is active in echarts process. So considering heap memory consumption,\n// we do not clone tree or graph, but share them among list and its shallow clones.\n// But in some rare case, we have to keep old list (like do animation in chart). So\n// please take care that both the old list and the new list share the same tree/graph.\n\n/**\n * @param {Object} opt\n * @param {module:echarts/data/List} opt.mainData\n * @param {Object} [opt.struct] For example, instance of Graph or Tree.\n * @param {string} [opt.structAttr] designation: list[structAttr] = struct;\n * @param {Object} [opt.datas] {dataType: data},\n * like: {node: nodeList, edge: edgeList}.\n * Should contain mainData.\n * @param {Object} [opt.datasAttr] {dataType: attr},\n * designation: struct[datasAttr[dataType]] = list;\n */\n\nfunction linkList(opt) {\n var mainData = opt.mainData;\n var datas = opt.datas;\n\n if (!datas) {\n datas = {\n main: mainData\n };\n opt.datasAttr = {\n main: 'data'\n };\n }\n\n opt.datas = opt.mainData = null;\n linkAll(mainData, datas, opt); // Porxy data original methods.\n\n each(datas, function (data) {\n each(mainData.TRANSFERABLE_METHODS, function (methodName) {\n data.wrapMethod(methodName, zrUtil.curry(transferInjection, opt));\n });\n }); // Beyond transfer, additional features should be added to `cloneShallow`.\n\n mainData.wrapMethod('cloneShallow', zrUtil.curry(cloneShallowInjection, opt)); // Only mainData trigger change, because struct.update may trigger\n // another changable methods, which may bring about dead lock.\n\n each(mainData.CHANGABLE_METHODS, function (methodName) {\n mainData.wrapMethod(methodName, zrUtil.curry(changeInjection, opt));\n }); // Make sure datas contains mainData.\n\n zrUtil.assert(datas[mainData.dataType] === mainData);\n}\n\nfunction transferInjection(opt, res) {\n if (isMainData(this)) {\n // Transfer datas to new main data.\n var datas = zrUtil.extend({}, this[DATAS]);\n datas[this.dataType] = res;\n linkAll(res, datas, opt);\n } else {\n // Modify the reference in main data to point newData.\n linkSingle(res, this.dataType, this[MAIN_DATA], opt);\n }\n\n return res;\n}\n\nfunction changeInjection(opt, res) {\n opt.struct && opt.struct.update(this);\n return res;\n}\n\nfunction cloneShallowInjection(opt, res) {\n // cloneShallow, which brings about some fragilities, may be inappropriate\n // to be exposed as an API. So for implementation simplicity we can make\n // the restriction that cloneShallow of not-mainData should not be invoked\n // outside, but only be invoked here.\n each(res[DATAS], function (data, dataType) {\n data !== res && linkSingle(data.cloneShallow(), dataType, res, opt);\n });\n return res;\n}\n/**\n * Supplement method to List.\n *\n * @public\n * @param {string} [dataType] If not specified, return mainData.\n * @return {module:echarts/data/List}\n */\n\n\nfunction getLinkedData(dataType) {\n var mainData = this[MAIN_DATA];\n return dataType == null || mainData == null ? mainData : mainData[DATAS][dataType];\n}\n\nfunction isMainData(data) {\n return data[MAIN_DATA] === data;\n}\n\nfunction linkAll(mainData, datas, opt) {\n mainData[DATAS] = {};\n each(datas, function (data, dataType) {\n linkSingle(data, dataType, mainData, opt);\n });\n}\n\nfunction linkSingle(data, dataType, mainData, opt) {\n mainData[DATAS][dataType] = data;\n data[MAIN_DATA] = mainData;\n data.dataType = dataType;\n\n if (opt.struct) {\n data[opt.structAttr] = opt.struct;\n opt.struct[opt.datasAttr[dataType]] = data;\n } // Supplement method.\n\n\n data.getLinkedData = getLinkedData;\n}\n\nvar _default = linkList;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Region = require(\"../Region\");\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// Fix for 南海诸岛\nvar geoCoord = [126, 25];\nvar points = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, 0.7], [52, 0.7], [56, 7.7], [59, 0.7], [64, 0.7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]];\n\nfor (var i = 0; i < points.length; i++) {\n for (var k = 0; k < points[i].length; k++) {\n points[i][k][0] /= 10.5;\n points[i][k][1] /= -10.5 / 0.75;\n points[i][k][0] += geoCoord[0];\n points[i][k][1] += geoCoord[1];\n }\n}\n\nfunction _default(mapType, regions) {\n if (mapType === 'china') {\n regions.push(new Region('南海诸岛', zrUtil.map(points, function (exterior) {\n return {\n type: 'polygon',\n exterior: exterior\n };\n }), geoCoord));\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar DataZoomView = require(\"./DataZoomView\");\n\nvar sliderMove = require(\"../helper/sliderMove\");\n\nvar roams = require(\"./roams\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar bind = zrUtil.bind;\nvar InsideZoomView = DataZoomView.extend({\n type: 'dataZoom.inside',\n\n /**\n * @override\n */\n init: function (ecModel, api) {\n /**\n * 'throttle' is used in this.dispatchAction, so we save range\n * to avoid missing some 'pan' info.\n * @private\n * @type {Array.}\n */\n this._range;\n },\n\n /**\n * @override\n */\n render: function (dataZoomModel, ecModel, api, payload) {\n InsideZoomView.superApply(this, 'render', arguments); // Hence the `throttle` util ensures to preserve command order,\n // here simply updating range all the time will not cause missing\n // any of the the roam change.\n\n this._range = dataZoomModel.getPercentRange(); // Reset controllers.\n\n zrUtil.each(this.getTargetCoordInfo(), function (coordInfoList, coordSysName) {\n var allCoordIds = zrUtil.map(coordInfoList, function (coordInfo) {\n return roams.generateCoordId(coordInfo.model);\n });\n zrUtil.each(coordInfoList, function (coordInfo) {\n var coordModel = coordInfo.model;\n var getRange = {};\n zrUtil.each(['pan', 'zoom', 'scrollMove'], function (eventName) {\n getRange[eventName] = bind(roamHandlers[eventName], this, coordInfo, coordSysName);\n }, this);\n roams.register(api, {\n coordId: roams.generateCoordId(coordModel),\n allCoordIds: allCoordIds,\n containsPoint: function (e, x, y) {\n return coordModel.coordinateSystem.containPoint([x, y]);\n },\n dataZoomId: dataZoomModel.id,\n dataZoomModel: dataZoomModel,\n getRange: getRange\n });\n }, this);\n }, this);\n },\n\n /**\n * @override\n */\n dispose: function () {\n roams.unregister(this.api, this.dataZoomModel.id);\n InsideZoomView.superApply(this, 'dispose', arguments);\n this._range = null;\n }\n});\nvar roamHandlers = {\n /**\n * @this {module:echarts/component/dataZoom/InsideZoomView}\n */\n zoom: function (coordInfo, coordSysName, controller, e) {\n var lastRange = this._range;\n var range = lastRange.slice(); // Calculate transform by the first axis.\n\n var axisModel = coordInfo.axisModels[0];\n\n if (!axisModel) {\n return;\n }\n\n var directionInfo = getDirectionInfo[coordSysName](null, [e.originX, e.originY], axisModel, controller, coordInfo);\n var percentPoint = (directionInfo.signal > 0 ? directionInfo.pixelStart + directionInfo.pixelLength - directionInfo.pixel : directionInfo.pixel - directionInfo.pixelStart) / directionInfo.pixelLength * (range[1] - range[0]) + range[0];\n var scale = Math.max(1 / e.scale, 0);\n range[0] = (range[0] - percentPoint) * scale + percentPoint;\n range[1] = (range[1] - percentPoint) * scale + percentPoint; // Restrict range.\n\n var minMaxSpan = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();\n sliderMove(0, range, [0, 100], 0, minMaxSpan.minSpan, minMaxSpan.maxSpan);\n this._range = range;\n\n if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) {\n return range;\n }\n },\n\n /**\n * @this {module:echarts/component/dataZoom/InsideZoomView}\n */\n pan: makeMover(function (range, axisModel, coordInfo, coordSysName, controller, e) {\n var directionInfo = getDirectionInfo[coordSysName]([e.oldX, e.oldY], [e.newX, e.newY], axisModel, controller, coordInfo);\n return directionInfo.signal * (range[1] - range[0]) * directionInfo.pixel / directionInfo.pixelLength;\n }),\n\n /**\n * @this {module:echarts/component/dataZoom/InsideZoomView}\n */\n scrollMove: makeMover(function (range, axisModel, coordInfo, coordSysName, controller, e) {\n var directionInfo = getDirectionInfo[coordSysName]([0, 0], [e.scrollDelta, e.scrollDelta], axisModel, controller, coordInfo);\n return directionInfo.signal * (range[1] - range[0]) * e.scrollDelta;\n })\n};\n\nfunction makeMover(getPercentDelta) {\n return function (coordInfo, coordSysName, controller, e) {\n var lastRange = this._range;\n var range = lastRange.slice(); // Calculate transform by the first axis.\n\n var axisModel = coordInfo.axisModels[0];\n\n if (!axisModel) {\n return;\n }\n\n var percentDelta = getPercentDelta(range, axisModel, coordInfo, coordSysName, controller, e);\n sliderMove(percentDelta, range, [0, 100], 'all');\n this._range = range;\n\n if (lastRange[0] !== range[0] || lastRange[1] !== range[1]) {\n return range;\n }\n };\n}\n\nvar getDirectionInfo = {\n grid: function (oldPoint, newPoint, axisModel, controller, coordInfo) {\n var axis = axisModel.axis;\n var ret = {};\n var rect = coordInfo.model.coordinateSystem.getRect();\n oldPoint = oldPoint || [0, 0];\n\n if (axis.dim === 'x') {\n ret.pixel = newPoint[0] - oldPoint[0];\n ret.pixelLength = rect.width;\n ret.pixelStart = rect.x;\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // axis.dim === 'y'\n ret.pixel = newPoint[1] - oldPoint[1];\n ret.pixelLength = rect.height;\n ret.pixelStart = rect.y;\n ret.signal = axis.inverse ? -1 : 1;\n }\n\n return ret;\n },\n polar: function (oldPoint, newPoint, axisModel, controller, coordInfo) {\n var axis = axisModel.axis;\n var ret = {};\n var polar = coordInfo.model.coordinateSystem;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var angleExtent = polar.getAngleAxis().getExtent();\n oldPoint = oldPoint ? polar.pointToCoord(oldPoint) : [0, 0];\n newPoint = polar.pointToCoord(newPoint);\n\n if (axisModel.mainType === 'radiusAxis') {\n ret.pixel = newPoint[0] - oldPoint[0]; // ret.pixelLength = Math.abs(radiusExtent[1] - radiusExtent[0]);\n // ret.pixelStart = Math.min(radiusExtent[0], radiusExtent[1]);\n\n ret.pixelLength = radiusExtent[1] - radiusExtent[0];\n ret.pixelStart = radiusExtent[0];\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // 'angleAxis'\n ret.pixel = newPoint[1] - oldPoint[1]; // ret.pixelLength = Math.abs(angleExtent[1] - angleExtent[0]);\n // ret.pixelStart = Math.min(angleExtent[0], angleExtent[1]);\n\n ret.pixelLength = angleExtent[1] - angleExtent[0];\n ret.pixelStart = angleExtent[0];\n ret.signal = axis.inverse ? -1 : 1;\n }\n\n return ret;\n },\n singleAxis: function (oldPoint, newPoint, axisModel, controller, coordInfo) {\n var axis = axisModel.axis;\n var rect = coordInfo.model.coordinateSystem.getRect();\n var ret = {};\n oldPoint = oldPoint || [0, 0];\n\n if (axis.orient === 'horizontal') {\n ret.pixel = newPoint[0] - oldPoint[0];\n ret.pixelLength = rect.width;\n ret.pixelStart = rect.x;\n ret.signal = axis.inverse ? 1 : -1;\n } else {\n // 'vertical'\n ret.pixel = newPoint[1] - oldPoint[1];\n ret.pixelLength = rect.height;\n ret.pixelStart = rect.y;\n ret.signal = axis.inverse ? -1 : 1;\n }\n\n return ret;\n }\n};\nvar _default = InsideZoomView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\nvar isNumeric = _number.isNumeric;\n\nvar _helper = require(\"./helper\");\n\nvar setLabel = _helper.setLabel;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar BAR_BORDER_WIDTH_QUERY = ['itemStyle', 'borderWidth']; // index: +isHorizontal\n\nvar LAYOUT_ATTRS = [{\n xy: 'x',\n wh: 'width',\n index: 0,\n posDesc: ['left', 'right']\n}, {\n xy: 'y',\n wh: 'height',\n index: 1,\n posDesc: ['top', 'bottom']\n}];\nvar pathForLineWidth = new graphic.Circle();\nvar BarView = echarts.extendChartView({\n type: 'pictorialBar',\n render: function (seriesModel, ecModel, api) {\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n var isHorizontal = !!baseAxis.isHorizontal();\n var coordSysRect = cartesian.grid.getRect();\n var opt = {\n ecSize: {\n width: api.getWidth(),\n height: api.getHeight()\n },\n seriesModel: seriesModel,\n coordSys: cartesian,\n coordSysExtent: [[coordSysRect.x, coordSysRect.x + coordSysRect.width], [coordSysRect.y, coordSysRect.y + coordSysRect.height]],\n isHorizontal: isHorizontal,\n valueDim: LAYOUT_ATTRS[+isHorizontal],\n categoryDim: LAYOUT_ATTRS[1 - isHorizontal]\n };\n data.diff(oldData).add(function (dataIndex) {\n if (!data.hasValue(dataIndex)) {\n return;\n }\n\n var itemModel = getItemModel(data, dataIndex);\n var symbolMeta = getSymbolMeta(data, dataIndex, itemModel, opt);\n var bar = createBar(data, opt, symbolMeta);\n data.setItemGraphicEl(dataIndex, bar);\n group.add(bar);\n updateCommon(bar, opt, symbolMeta);\n }).update(function (newIndex, oldIndex) {\n var bar = oldData.getItemGraphicEl(oldIndex);\n\n if (!data.hasValue(newIndex)) {\n group.remove(bar);\n return;\n }\n\n var itemModel = getItemModel(data, newIndex);\n var symbolMeta = getSymbolMeta(data, newIndex, itemModel, opt);\n var pictorialShapeStr = getShapeStr(data, symbolMeta);\n\n if (bar && pictorialShapeStr !== bar.__pictorialShapeStr) {\n group.remove(bar);\n data.setItemGraphicEl(newIndex, null);\n bar = null;\n }\n\n if (bar) {\n updateBar(bar, opt, symbolMeta);\n } else {\n bar = createBar(data, opt, symbolMeta, true);\n }\n\n data.setItemGraphicEl(newIndex, bar);\n bar.__pictorialSymbolMeta = symbolMeta; // Add back\n\n group.add(bar);\n updateCommon(bar, opt, symbolMeta);\n }).remove(function (dataIndex) {\n var bar = oldData.getItemGraphicEl(dataIndex);\n bar && removeBar(oldData, dataIndex, bar.__pictorialSymbolMeta.animationModel, bar);\n }).execute();\n this._data = data;\n return this.group;\n },\n dispose: zrUtil.noop,\n remove: function (ecModel, api) {\n var group = this.group;\n var data = this._data;\n\n if (ecModel.get('animation')) {\n if (data) {\n data.eachItemGraphicEl(function (bar) {\n removeBar(data, bar.dataIndex, ecModel, bar);\n });\n }\n } else {\n group.removeAll();\n }\n }\n}); // Set or calculate default value about symbol, and calculate layout info.\n\nfunction getSymbolMeta(data, dataIndex, itemModel, opt) {\n var layout = data.getItemLayout(dataIndex);\n var symbolRepeat = itemModel.get('symbolRepeat');\n var symbolClip = itemModel.get('symbolClip');\n var symbolPosition = itemModel.get('symbolPosition') || 'start';\n var symbolRotate = itemModel.get('symbolRotate');\n var rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n var symbolPatternSize = itemModel.get('symbolPatternSize') || 2;\n var isAnimationEnabled = itemModel.isAnimationEnabled();\n var symbolMeta = {\n dataIndex: dataIndex,\n layout: layout,\n itemModel: itemModel,\n symbolType: data.getItemVisual(dataIndex, 'symbol') || 'circle',\n color: data.getItemVisual(dataIndex, 'color'),\n symbolClip: symbolClip,\n symbolRepeat: symbolRepeat,\n symbolRepeatDirection: itemModel.get('symbolRepeatDirection'),\n symbolPatternSize: symbolPatternSize,\n rotation: rotation,\n animationModel: isAnimationEnabled ? itemModel : null,\n hoverAnimation: isAnimationEnabled && itemModel.get('hoverAnimation'),\n z2: itemModel.getShallow('z', true) || 0\n };\n prepareBarLength(itemModel, symbolRepeat, layout, opt, symbolMeta);\n prepareSymbolSize(data, dataIndex, layout, symbolRepeat, symbolClip, symbolMeta.boundingLength, symbolMeta.pxSign, symbolPatternSize, opt, symbolMeta);\n prepareLineWidth(itemModel, symbolMeta.symbolScale, rotation, opt, symbolMeta);\n var symbolSize = symbolMeta.symbolSize;\n var symbolOffset = itemModel.get('symbolOffset');\n\n if (zrUtil.isArray(symbolOffset)) {\n symbolOffset = [parsePercent(symbolOffset[0], symbolSize[0]), parsePercent(symbolOffset[1], symbolSize[1])];\n }\n\n prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, symbolMeta.valueLineWidth, symbolMeta.boundingLength, symbolMeta.repeatCutLength, opt, symbolMeta);\n return symbolMeta;\n} // bar length can be negative.\n\n\nfunction prepareBarLength(itemModel, symbolRepeat, layout, opt, output) {\n var valueDim = opt.valueDim;\n var symbolBoundingData = itemModel.get('symbolBoundingData');\n var valueAxis = opt.coordSys.getOtherAxis(opt.coordSys.getBaseAxis());\n var zeroPx = valueAxis.toGlobalCoord(valueAxis.dataToCoord(0));\n var pxSignIdx = 1 - +(layout[valueDim.wh] <= 0);\n var boundingLength;\n\n if (zrUtil.isArray(symbolBoundingData)) {\n var symbolBoundingExtent = [convertToCoordOnAxis(valueAxis, symbolBoundingData[0]) - zeroPx, convertToCoordOnAxis(valueAxis, symbolBoundingData[1]) - zeroPx];\n symbolBoundingExtent[1] < symbolBoundingExtent[0] && symbolBoundingExtent.reverse();\n boundingLength = symbolBoundingExtent[pxSignIdx];\n } else if (symbolBoundingData != null) {\n boundingLength = convertToCoordOnAxis(valueAxis, symbolBoundingData) - zeroPx;\n } else if (symbolRepeat) {\n boundingLength = opt.coordSysExtent[valueDim.index][pxSignIdx] - zeroPx;\n } else {\n boundingLength = layout[valueDim.wh];\n }\n\n output.boundingLength = boundingLength;\n\n if (symbolRepeat) {\n output.repeatCutLength = layout[valueDim.wh];\n }\n\n output.pxSign = boundingLength > 0 ? 1 : boundingLength < 0 ? -1 : 0;\n}\n\nfunction convertToCoordOnAxis(axis, value) {\n return axis.toGlobalCoord(axis.dataToCoord(axis.scale.parse(value)));\n} // Support ['100%', '100%']\n\n\nfunction prepareSymbolSize(data, dataIndex, layout, symbolRepeat, symbolClip, boundingLength, pxSign, symbolPatternSize, opt, output) {\n var valueDim = opt.valueDim;\n var categoryDim = opt.categoryDim;\n var categorySize = Math.abs(layout[categoryDim.wh]);\n var symbolSize = data.getItemVisual(dataIndex, 'symbolSize');\n\n if (zrUtil.isArray(symbolSize)) {\n symbolSize = symbolSize.slice();\n } else {\n if (symbolSize == null) {\n symbolSize = '100%';\n }\n\n symbolSize = [symbolSize, symbolSize];\n } // Note: percentage symbolSize (like '100%') do not consider lineWidth, because it is\n // to complicated to calculate real percent value if considering scaled lineWidth.\n // So the actual size will bigger than layout size if lineWidth is bigger than zero,\n // which can be tolerated in pictorial chart.\n\n\n symbolSize[categoryDim.index] = parsePercent(symbolSize[categoryDim.index], categorySize);\n symbolSize[valueDim.index] = parsePercent(symbolSize[valueDim.index], symbolRepeat ? categorySize : Math.abs(boundingLength));\n output.symbolSize = symbolSize; // If x or y is less than zero, show reversed shape.\n\n var symbolScale = output.symbolScale = [symbolSize[0] / symbolPatternSize, symbolSize[1] / symbolPatternSize]; // Follow convention, 'right' and 'top' is the normal scale.\n\n symbolScale[valueDim.index] *= (opt.isHorizontal ? -1 : 1) * pxSign;\n}\n\nfunction prepareLineWidth(itemModel, symbolScale, rotation, opt, output) {\n // In symbols are drawn with scale, so do not need to care about the case that width\n // or height are too small. But symbol use strokeNoScale, where acture lineWidth should\n // be calculated.\n var valueLineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0;\n\n if (valueLineWidth) {\n pathForLineWidth.attr({\n scale: symbolScale.slice(),\n rotation: rotation\n });\n pathForLineWidth.updateTransform();\n valueLineWidth /= pathForLineWidth.getLineScale();\n valueLineWidth *= symbolScale[opt.valueDim.index];\n }\n\n output.valueLineWidth = valueLineWidth;\n}\n\nfunction prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, valueLineWidth, boundingLength, repeatCutLength, opt, output) {\n var categoryDim = opt.categoryDim;\n var valueDim = opt.valueDim;\n var pxSign = output.pxSign;\n var unitLength = Math.max(symbolSize[valueDim.index] + valueLineWidth, 0);\n var pathLen = unitLength; // Note: rotation will not effect the layout of symbols, because user may\n // want symbols to rotate on its center, which should not be translated\n // when rotating.\n\n if (symbolRepeat) {\n var absBoundingLength = Math.abs(boundingLength);\n var symbolMargin = zrUtil.retrieve(itemModel.get('symbolMargin'), '15%') + '';\n var hasEndGap = false;\n\n if (symbolMargin.lastIndexOf('!') === symbolMargin.length - 1) {\n hasEndGap = true;\n symbolMargin = symbolMargin.slice(0, symbolMargin.length - 1);\n }\n\n symbolMargin = parsePercent(symbolMargin, symbolSize[valueDim.index]);\n var uLenWithMargin = Math.max(unitLength + symbolMargin * 2, 0); // When symbol margin is less than 0, margin at both ends will be subtracted\n // to ensure that all of the symbols will not be overflow the given area.\n\n var endFix = hasEndGap ? 0 : symbolMargin * 2; // Both final repeatTimes and final symbolMargin area calculated based on\n // boundingLength.\n\n var repeatSpecified = isNumeric(symbolRepeat);\n var repeatTimes = repeatSpecified ? symbolRepeat : toIntTimes((absBoundingLength + endFix) / uLenWithMargin); // Adjust calculate margin, to ensure each symbol is displayed\n // entirely in the given layout area.\n\n var mDiff = absBoundingLength - repeatTimes * unitLength;\n symbolMargin = mDiff / 2 / (hasEndGap ? repeatTimes : repeatTimes - 1);\n uLenWithMargin = unitLength + symbolMargin * 2;\n endFix = hasEndGap ? 0 : symbolMargin * 2; // Update repeatTimes when not all symbol will be shown.\n\n if (!repeatSpecified && symbolRepeat !== 'fixed') {\n repeatTimes = repeatCutLength ? toIntTimes((Math.abs(repeatCutLength) + endFix) / uLenWithMargin) : 0;\n }\n\n pathLen = repeatTimes * uLenWithMargin - endFix;\n output.repeatTimes = repeatTimes;\n output.symbolMargin = symbolMargin;\n }\n\n var sizeFix = pxSign * (pathLen / 2);\n var pathPosition = output.pathPosition = [];\n pathPosition[categoryDim.index] = layout[categoryDim.wh] / 2;\n pathPosition[valueDim.index] = symbolPosition === 'start' ? sizeFix : symbolPosition === 'end' ? boundingLength - sizeFix : boundingLength / 2; // 'center'\n\n if (symbolOffset) {\n pathPosition[0] += symbolOffset[0];\n pathPosition[1] += symbolOffset[1];\n }\n\n var bundlePosition = output.bundlePosition = [];\n bundlePosition[categoryDim.index] = layout[categoryDim.xy];\n bundlePosition[valueDim.index] = layout[valueDim.xy];\n var barRectShape = output.barRectShape = zrUtil.extend({}, layout);\n barRectShape[valueDim.wh] = pxSign * Math.max(Math.abs(layout[valueDim.wh]), Math.abs(pathPosition[valueDim.index] + sizeFix));\n barRectShape[categoryDim.wh] = layout[categoryDim.wh];\n var clipShape = output.clipShape = {}; // Consider that symbol may be overflow layout rect.\n\n clipShape[categoryDim.xy] = -layout[categoryDim.xy];\n clipShape[categoryDim.wh] = opt.ecSize[categoryDim.wh];\n clipShape[valueDim.xy] = 0;\n clipShape[valueDim.wh] = layout[valueDim.wh];\n}\n\nfunction createPath(symbolMeta) {\n var symbolPatternSize = symbolMeta.symbolPatternSize;\n var path = createSymbol( // Consider texture img, make a big size.\n symbolMeta.symbolType, -symbolPatternSize / 2, -symbolPatternSize / 2, symbolPatternSize, symbolPatternSize, symbolMeta.color);\n path.attr({\n culling: true\n });\n path.type !== 'image' && path.setStyle({\n strokeNoScale: true\n });\n return path;\n}\n\nfunction createOrUpdateRepeatSymbols(bar, opt, symbolMeta, isUpdate) {\n var bundle = bar.__pictorialBundle;\n var symbolSize = symbolMeta.symbolSize;\n var valueLineWidth = symbolMeta.valueLineWidth;\n var pathPosition = symbolMeta.pathPosition;\n var valueDim = opt.valueDim;\n var repeatTimes = symbolMeta.repeatTimes || 0;\n var index = 0;\n var unit = symbolSize[opt.valueDim.index] + valueLineWidth + symbolMeta.symbolMargin * 2;\n eachPath(bar, function (path) {\n path.__pictorialAnimationIndex = index;\n path.__pictorialRepeatTimes = repeatTimes;\n\n if (index < repeatTimes) {\n updateAttr(path, null, makeTarget(index), symbolMeta, isUpdate);\n } else {\n updateAttr(path, null, {\n scale: [0, 0]\n }, symbolMeta, isUpdate, function () {\n bundle.remove(path);\n });\n }\n\n updateHoverAnimation(path, symbolMeta);\n index++;\n });\n\n for (; index < repeatTimes; index++) {\n var path = createPath(symbolMeta);\n path.__pictorialAnimationIndex = index;\n path.__pictorialRepeatTimes = repeatTimes;\n bundle.add(path);\n var target = makeTarget(index);\n updateAttr(path, {\n position: target.position,\n scale: [0, 0]\n }, {\n scale: target.scale,\n rotation: target.rotation\n }, symbolMeta, isUpdate); // FIXME\n // If all emphasis/normal through action.\n\n path.on('mouseover', onMouseOver).on('mouseout', onMouseOut);\n updateHoverAnimation(path, symbolMeta);\n }\n\n function makeTarget(index) {\n var position = pathPosition.slice(); // (start && pxSign > 0) || (end && pxSign < 0): i = repeatTimes - index\n // Otherwise: i = index;\n\n var pxSign = symbolMeta.pxSign;\n var i = index;\n\n if (symbolMeta.symbolRepeatDirection === 'start' ? pxSign > 0 : pxSign < 0) {\n i = repeatTimes - 1 - index;\n }\n\n position[valueDim.index] = unit * (i - repeatTimes / 2 + 0.5) + pathPosition[valueDim.index];\n return {\n position: position,\n scale: symbolMeta.symbolScale.slice(),\n rotation: symbolMeta.rotation\n };\n }\n\n function onMouseOver() {\n eachPath(bar, function (path) {\n path.trigger('emphasis');\n });\n }\n\n function onMouseOut() {\n eachPath(bar, function (path) {\n path.trigger('normal');\n });\n }\n}\n\nfunction createOrUpdateSingleSymbol(bar, opt, symbolMeta, isUpdate) {\n var bundle = bar.__pictorialBundle;\n var mainPath = bar.__pictorialMainPath;\n\n if (!mainPath) {\n mainPath = bar.__pictorialMainPath = createPath(symbolMeta);\n bundle.add(mainPath);\n updateAttr(mainPath, {\n position: symbolMeta.pathPosition.slice(),\n scale: [0, 0],\n rotation: symbolMeta.rotation\n }, {\n scale: symbolMeta.symbolScale.slice()\n }, symbolMeta, isUpdate);\n mainPath.on('mouseover', onMouseOver).on('mouseout', onMouseOut);\n } else {\n updateAttr(mainPath, null, {\n position: symbolMeta.pathPosition.slice(),\n scale: symbolMeta.symbolScale.slice(),\n rotation: symbolMeta.rotation\n }, symbolMeta, isUpdate);\n }\n\n updateHoverAnimation(mainPath, symbolMeta);\n\n function onMouseOver() {\n this.trigger('emphasis');\n }\n\n function onMouseOut() {\n this.trigger('normal');\n }\n} // bar rect is used for label.\n\n\nfunction createOrUpdateBarRect(bar, symbolMeta, isUpdate) {\n var rectShape = zrUtil.extend({}, symbolMeta.barRectShape);\n var barRect = bar.__pictorialBarRect;\n\n if (!barRect) {\n barRect = bar.__pictorialBarRect = new graphic.Rect({\n z2: 2,\n shape: rectShape,\n silent: true,\n style: {\n stroke: 'transparent',\n fill: 'transparent',\n lineWidth: 0\n }\n });\n bar.add(barRect);\n } else {\n updateAttr(barRect, null, {\n shape: rectShape\n }, symbolMeta, isUpdate);\n }\n}\n\nfunction createOrUpdateClip(bar, opt, symbolMeta, isUpdate) {\n // If not clip, symbol will be remove and rebuilt.\n if (symbolMeta.symbolClip) {\n var clipPath = bar.__pictorialClipPath;\n var clipShape = zrUtil.extend({}, symbolMeta.clipShape);\n var valueDim = opt.valueDim;\n var animationModel = symbolMeta.animationModel;\n var dataIndex = symbolMeta.dataIndex;\n\n if (clipPath) {\n graphic.updateProps(clipPath, {\n shape: clipShape\n }, animationModel, dataIndex);\n } else {\n clipShape[valueDim.wh] = 0;\n clipPath = new graphic.Rect({\n shape: clipShape\n });\n\n bar.__pictorialBundle.setClipPath(clipPath);\n\n bar.__pictorialClipPath = clipPath;\n var target = {};\n target[valueDim.wh] = symbolMeta.clipShape[valueDim.wh];\n graphic[isUpdate ? 'updateProps' : 'initProps'](clipPath, {\n shape: target\n }, animationModel, dataIndex);\n }\n }\n}\n\nfunction getItemModel(data, dataIndex) {\n var itemModel = data.getItemModel(dataIndex);\n itemModel.getAnimationDelayParams = getAnimationDelayParams;\n itemModel.isAnimationEnabled = isAnimationEnabled;\n return itemModel;\n}\n\nfunction getAnimationDelayParams(path) {\n // The order is the same as the z-order, see `symbolRepeatDiretion`.\n return {\n index: path.__pictorialAnimationIndex,\n count: path.__pictorialRepeatTimes\n };\n}\n\nfunction isAnimationEnabled() {\n // `animation` prop can be set on itemModel in pictorial bar chart.\n return this.parentModel.isAnimationEnabled() && !!this.getShallow('animation');\n}\n\nfunction updateHoverAnimation(path, symbolMeta) {\n path.off('emphasis').off('normal');\n var scale = symbolMeta.symbolScale.slice();\n symbolMeta.hoverAnimation && path.on('emphasis', function () {\n this.animateTo({\n scale: [scale[0] * 1.1, scale[1] * 1.1]\n }, 400, 'elasticOut');\n }).on('normal', function () {\n this.animateTo({\n scale: scale.slice()\n }, 400, 'elasticOut');\n });\n}\n\nfunction createBar(data, opt, symbolMeta, isUpdate) {\n // bar is the main element for each data.\n var bar = new graphic.Group(); // bundle is used for location and clip.\n\n var bundle = new graphic.Group();\n bar.add(bundle);\n bar.__pictorialBundle = bundle;\n bundle.attr('position', symbolMeta.bundlePosition.slice());\n\n if (symbolMeta.symbolRepeat) {\n createOrUpdateRepeatSymbols(bar, opt, symbolMeta);\n } else {\n createOrUpdateSingleSymbol(bar, opt, symbolMeta);\n }\n\n createOrUpdateBarRect(bar, symbolMeta, isUpdate);\n createOrUpdateClip(bar, opt, symbolMeta, isUpdate);\n bar.__pictorialShapeStr = getShapeStr(data, symbolMeta);\n bar.__pictorialSymbolMeta = symbolMeta;\n return bar;\n}\n\nfunction updateBar(bar, opt, symbolMeta) {\n var animationModel = symbolMeta.animationModel;\n var dataIndex = symbolMeta.dataIndex;\n var bundle = bar.__pictorialBundle;\n graphic.updateProps(bundle, {\n position: symbolMeta.bundlePosition.slice()\n }, animationModel, dataIndex);\n\n if (symbolMeta.symbolRepeat) {\n createOrUpdateRepeatSymbols(bar, opt, symbolMeta, true);\n } else {\n createOrUpdateSingleSymbol(bar, opt, symbolMeta, true);\n }\n\n createOrUpdateBarRect(bar, symbolMeta, true);\n createOrUpdateClip(bar, opt, symbolMeta, true);\n}\n\nfunction removeBar(data, dataIndex, animationModel, bar) {\n // Not show text when animating\n var labelRect = bar.__pictorialBarRect;\n labelRect && (labelRect.style.text = null);\n var pathes = [];\n eachPath(bar, function (path) {\n pathes.push(path);\n });\n bar.__pictorialMainPath && pathes.push(bar.__pictorialMainPath); // I do not find proper remove animation for clip yet.\n\n bar.__pictorialClipPath && (animationModel = null);\n zrUtil.each(pathes, function (path) {\n graphic.updateProps(path, {\n scale: [0, 0]\n }, animationModel, dataIndex, function () {\n bar.parent && bar.parent.remove(bar);\n });\n });\n data.setItemGraphicEl(dataIndex, null);\n}\n\nfunction getShapeStr(data, symbolMeta) {\n return [data.getItemVisual(symbolMeta.dataIndex, 'symbol') || 'none', !!symbolMeta.symbolRepeat, !!symbolMeta.symbolClip].join(':');\n}\n\nfunction eachPath(bar, cb, context) {\n // Do not use Group#eachChild, because it do not support remove.\n zrUtil.each(bar.__pictorialBundle.children(), function (el) {\n el !== bar.__pictorialBarRect && cb.call(context, el);\n });\n}\n\nfunction updateAttr(el, immediateAttrs, animationAttrs, symbolMeta, isUpdate, cb) {\n immediateAttrs && el.attr(immediateAttrs); // when symbolCip used, only clip path has init animation, otherwise it would be weird effect.\n\n if (symbolMeta.symbolClip && !isUpdate) {\n animationAttrs && el.attr(animationAttrs);\n } else {\n animationAttrs && graphic[isUpdate ? 'updateProps' : 'initProps'](el, animationAttrs, symbolMeta.animationModel, symbolMeta.dataIndex, cb);\n }\n}\n\nfunction updateCommon(bar, opt, symbolMeta) {\n var color = symbolMeta.color;\n var dataIndex = symbolMeta.dataIndex;\n var itemModel = symbolMeta.itemModel; // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n\n var normalStyle = itemModel.getModel('itemStyle').getItemStyle(['color']);\n var hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n var cursorStyle = itemModel.getShallow('cursor');\n eachPath(bar, function (path) {\n // PENDING setColor should be before setStyle!!!\n path.setColor(color);\n path.setStyle(zrUtil.defaults({\n fill: color,\n opacity: symbolMeta.opacity\n }, normalStyle));\n graphic.setHoverStyle(path, hoverStyle);\n cursorStyle && (path.cursor = cursorStyle);\n path.z2 = symbolMeta.z2;\n });\n var barRectHoverStyle = {};\n var barPositionOutside = opt.valueDim.posDesc[+(symbolMeta.boundingLength > 0)];\n var barRect = bar.__pictorialBarRect;\n setLabel(barRect.style, barRectHoverStyle, itemModel, color, opt.seriesModel, dataIndex, barPositionOutside);\n graphic.setHoverStyle(barRect, barRectHoverStyle);\n}\n\nfunction toIntTimes(times) {\n var roundedTimes = Math.round(times); // Escapse accurate error\n\n return Math.abs(times - roundedTimes) < 1e-4 ? roundedTimes : Math.ceil(times);\n}\n\nvar _default = BarView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar ChartView = require(\"../../view/Chart\");\n\nvar SunburstPiece = require(\"./SunburstPiece\");\n\nvar DataDiffer = require(\"../../data/DataDiffer\");\n\nvar _format = require(\"../../util/format\");\n\nvar windowOpen = _format.windowOpen;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar ROOT_TO_NODE_ACTION = 'sunburstRootToNode';\nvar SunburstView = ChartView.extend({\n type: 'sunburst',\n init: function () {},\n render: function (seriesModel, ecModel, api, payload) {\n var that = this;\n this.seriesModel = seriesModel;\n this.api = api;\n this.ecModel = ecModel;\n var data = seriesModel.getData();\n var virtualRoot = data.tree.root;\n var newRoot = seriesModel.getViewRoot();\n var group = this.group;\n var renderLabelForZeroData = seriesModel.get('renderLabelForZeroData');\n var newChildren = [];\n newRoot.eachNode(function (node) {\n newChildren.push(node);\n });\n var oldChildren = this._oldChildren || [];\n dualTravel(newChildren, oldChildren);\n renderRollUp(virtualRoot, newRoot);\n\n if (payload && payload.highlight && payload.highlight.piece) {\n var highlightPolicy = seriesModel.getShallow('highlightPolicy');\n payload.highlight.piece.onEmphasis(highlightPolicy);\n } else if (payload && payload.unhighlight) {\n var piece = this.virtualPiece;\n\n if (!piece && virtualRoot.children.length) {\n piece = virtualRoot.children[0].piece;\n }\n\n if (piece) {\n piece.onNormal();\n }\n }\n\n this._initEvents();\n\n this._oldChildren = newChildren;\n\n function dualTravel(newChildren, oldChildren) {\n if (newChildren.length === 0 && oldChildren.length === 0) {\n return;\n }\n\n new DataDiffer(oldChildren, newChildren, getKey, getKey).add(processNode).update(processNode).remove(zrUtil.curry(processNode, null)).execute();\n\n function getKey(node) {\n return node.getId();\n }\n\n function processNode(newId, oldId) {\n var newNode = newId == null ? null : newChildren[newId];\n var oldNode = oldId == null ? null : oldChildren[oldId];\n doRenderNode(newNode, oldNode);\n }\n }\n\n function doRenderNode(newNode, oldNode) {\n if (!renderLabelForZeroData && newNode && !newNode.getValue()) {\n // Not render data with value 0\n newNode = null;\n }\n\n if (newNode !== virtualRoot && oldNode !== virtualRoot) {\n if (oldNode && oldNode.piece) {\n if (newNode) {\n // Update\n oldNode.piece.updateData(false, newNode, 'normal', seriesModel, ecModel); // For tooltip\n\n data.setItemGraphicEl(newNode.dataIndex, oldNode.piece);\n } else {\n // Remove\n removeNode(oldNode);\n }\n } else if (newNode) {\n // Add\n var piece = new SunburstPiece(newNode, seriesModel, ecModel);\n group.add(piece); // For tooltip\n\n data.setItemGraphicEl(newNode.dataIndex, piece);\n }\n }\n }\n\n function removeNode(node) {\n if (!node) {\n return;\n }\n\n if (node.piece) {\n group.remove(node.piece);\n node.piece = null;\n }\n }\n\n function renderRollUp(virtualRoot, viewRoot) {\n if (viewRoot.depth > 0) {\n // Render\n if (that.virtualPiece) {\n // Update\n that.virtualPiece.updateData(false, virtualRoot, 'normal', seriesModel, ecModel);\n } else {\n // Add\n that.virtualPiece = new SunburstPiece(virtualRoot, seriesModel, ecModel);\n group.add(that.virtualPiece);\n }\n\n if (viewRoot.piece._onclickEvent) {\n viewRoot.piece.off('click', viewRoot.piece._onclickEvent);\n }\n\n var event = function (e) {\n that._rootToNode(viewRoot.parentNode);\n };\n\n viewRoot.piece._onclickEvent = event;\n that.virtualPiece.on('click', event);\n } else if (that.virtualPiece) {\n // Remove\n group.remove(that.virtualPiece);\n that.virtualPiece = null;\n }\n }\n },\n dispose: function () {},\n\n /**\n * @private\n */\n _initEvents: function () {\n var that = this;\n\n var event = function (e) {\n var targetFound = false;\n var viewRoot = that.seriesModel.getViewRoot();\n viewRoot.eachNode(function (node) {\n if (!targetFound && node.piece && node.piece.childAt(0) === e.target) {\n var nodeClick = node.getModel().get('nodeClick');\n\n if (nodeClick === 'rootToNode') {\n that._rootToNode(node);\n } else if (nodeClick === 'link') {\n var itemModel = node.getModel();\n var link = itemModel.get('link');\n\n if (link) {\n var linkTarget = itemModel.get('target', true) || '_blank';\n windowOpen(link, linkTarget);\n }\n }\n\n targetFound = true;\n }\n });\n };\n\n if (this.group._onclickEvent) {\n this.group.off('click', this.group._onclickEvent);\n }\n\n this.group.on('click', event);\n this.group._onclickEvent = event;\n },\n\n /**\n * @private\n */\n _rootToNode: function (node) {\n if (node !== this.seriesModel.getViewRoot()) {\n this.api.dispatchAction({\n type: ROOT_TO_NODE_ACTION,\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: node\n });\n }\n },\n\n /**\n * @implement\n */\n containPoint: function (point, seriesModel) {\n var treeRoot = seriesModel.getData();\n var itemLayout = treeRoot.getItemLayout(0);\n\n if (itemLayout) {\n var dx = point[0] - itemLayout.cx;\n var dy = point[1] - itemLayout.cy;\n var radius = Math.sqrt(dx * dx + dy * dy);\n return radius <= itemLayout.r && radius >= itemLayout.r0;\n }\n }\n});\nvar _default = SunburstView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar layout = require(\"../../util/layout\");\n\nvar TimelineView = require(\"./TimelineView\");\n\nvar TimelineAxis = require(\"./TimelineAxis\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar axisHelper = require(\"../../coord/axisHelper\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar bind = zrUtil.bind;\nvar each = zrUtil.each;\nvar PI = Math.PI;\n\nvar _default = TimelineView.extend({\n type: 'timeline.slider',\n init: function (ecModel, api) {\n this.api = api;\n /**\n * @private\n * @type {module:echarts/component/timeline/TimelineAxis}\n */\n\n this._axis;\n /**\n * @private\n * @type {module:zrender/core/BoundingRect}\n */\n\n this._viewRect;\n /**\n * @type {number}\n */\n\n this._timer;\n /**\n * @type {module:zrender/Element}\n */\n\n this._currentPointer;\n /**\n * @type {module:zrender/container/Group}\n */\n\n this._mainGroup;\n /**\n * @type {module:zrender/container/Group}\n */\n\n this._labelGroup;\n },\n\n /**\n * @override\n */\n render: function (timelineModel, ecModel, api, payload) {\n this.model = timelineModel;\n this.api = api;\n this.ecModel = ecModel;\n this.group.removeAll();\n\n if (timelineModel.get('show', true)) {\n var layoutInfo = this._layout(timelineModel, api);\n\n var mainGroup = this._createGroup('mainGroup');\n\n var labelGroup = this._createGroup('labelGroup');\n /**\n * @private\n * @type {module:echarts/component/timeline/TimelineAxis}\n */\n\n\n var axis = this._axis = this._createAxis(layoutInfo, timelineModel);\n\n timelineModel.formatTooltip = function (dataIndex) {\n return encodeHTML(axis.scale.getLabel(dataIndex));\n };\n\n each(['AxisLine', 'AxisTick', 'Control', 'CurrentPointer'], function (name) {\n this['_render' + name](layoutInfo, mainGroup, axis, timelineModel);\n }, this);\n\n this._renderAxisLabel(layoutInfo, labelGroup, axis, timelineModel);\n\n this._position(layoutInfo, timelineModel);\n }\n\n this._doPlayStop();\n },\n\n /**\n * @override\n */\n remove: function () {\n this._clearTimer();\n\n this.group.removeAll();\n },\n\n /**\n * @override\n */\n dispose: function () {\n this._clearTimer();\n },\n _layout: function (timelineModel, api) {\n var labelPosOpt = timelineModel.get('label.position');\n var orient = timelineModel.get('orient');\n var viewRect = getViewRect(timelineModel, api); // Auto label offset.\n\n if (labelPosOpt == null || labelPosOpt === 'auto') {\n labelPosOpt = orient === 'horizontal' ? viewRect.y + viewRect.height / 2 < api.getHeight() / 2 ? '-' : '+' : viewRect.x + viewRect.width / 2 < api.getWidth() / 2 ? '+' : '-';\n } else if (isNaN(labelPosOpt)) {\n labelPosOpt = {\n horizontal: {\n top: '-',\n bottom: '+'\n },\n vertical: {\n left: '-',\n right: '+'\n }\n }[orient][labelPosOpt];\n }\n\n var labelAlignMap = {\n horizontal: 'center',\n vertical: labelPosOpt >= 0 || labelPosOpt === '+' ? 'left' : 'right'\n };\n var labelBaselineMap = {\n horizontal: labelPosOpt >= 0 || labelPosOpt === '+' ? 'top' : 'bottom',\n vertical: 'middle'\n };\n var rotationMap = {\n horizontal: 0,\n vertical: PI / 2\n }; // Position\n\n var mainLength = orient === 'vertical' ? viewRect.height : viewRect.width;\n var controlModel = timelineModel.getModel('controlStyle');\n var showControl = controlModel.get('show', true);\n var controlSize = showControl ? controlModel.get('itemSize') : 0;\n var controlGap = showControl ? controlModel.get('itemGap') : 0;\n var sizePlusGap = controlSize + controlGap; // Special label rotate.\n\n var labelRotation = timelineModel.get('label.rotate') || 0;\n labelRotation = labelRotation * PI / 180; // To radian.\n\n var playPosition;\n var prevBtnPosition;\n var nextBtnPosition;\n var axisExtent;\n var controlPosition = controlModel.get('position', true);\n var showPlayBtn = showControl && controlModel.get('showPlayBtn', true);\n var showPrevBtn = showControl && controlModel.get('showPrevBtn', true);\n var showNextBtn = showControl && controlModel.get('showNextBtn', true);\n var xLeft = 0;\n var xRight = mainLength; // position[0] means left, position[1] means middle.\n\n if (controlPosition === 'left' || controlPosition === 'bottom') {\n showPlayBtn && (playPosition = [0, 0], xLeft += sizePlusGap);\n showPrevBtn && (prevBtnPosition = [xLeft, 0], xLeft += sizePlusGap);\n showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n } else {\n // 'top' 'right'\n showPlayBtn && (playPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n showPrevBtn && (prevBtnPosition = [0, 0], xLeft += sizePlusGap);\n showNextBtn && (nextBtnPosition = [xRight - controlSize, 0], xRight -= sizePlusGap);\n }\n\n axisExtent = [xLeft, xRight];\n\n if (timelineModel.get('inverse')) {\n axisExtent.reverse();\n }\n\n return {\n viewRect: viewRect,\n mainLength: mainLength,\n orient: orient,\n rotation: rotationMap[orient],\n labelRotation: labelRotation,\n labelPosOpt: labelPosOpt,\n labelAlign: timelineModel.get('label.align') || labelAlignMap[orient],\n labelBaseline: timelineModel.get('label.verticalAlign') || timelineModel.get('label.baseline') || labelBaselineMap[orient],\n // Based on mainGroup.\n playPosition: playPosition,\n prevBtnPosition: prevBtnPosition,\n nextBtnPosition: nextBtnPosition,\n axisExtent: axisExtent,\n controlSize: controlSize,\n controlGap: controlGap\n };\n },\n _position: function (layoutInfo, timelineModel) {\n // Position is be called finally, because bounding rect is needed for\n // adapt content to fill viewRect (auto adapt offset).\n // Timeline may be not all in the viewRect when 'offset' is specified\n // as a number, because it is more appropriate that label aligns at\n // 'offset' but not the other edge defined by viewRect.\n var mainGroup = this._mainGroup;\n var labelGroup = this._labelGroup;\n var viewRect = layoutInfo.viewRect;\n\n if (layoutInfo.orient === 'vertical') {\n // transform to horizontal, inverse rotate by left-top point.\n var m = matrix.create();\n var rotateOriginX = viewRect.x;\n var rotateOriginY = viewRect.y + viewRect.height;\n matrix.translate(m, m, [-rotateOriginX, -rotateOriginY]);\n matrix.rotate(m, m, -PI / 2);\n matrix.translate(m, m, [rotateOriginX, rotateOriginY]);\n viewRect = viewRect.clone();\n viewRect.applyTransform(m);\n }\n\n var viewBound = getBound(viewRect);\n var mainBound = getBound(mainGroup.getBoundingRect());\n var labelBound = getBound(labelGroup.getBoundingRect());\n var mainPosition = mainGroup.position;\n var labelsPosition = labelGroup.position;\n labelsPosition[0] = mainPosition[0] = viewBound[0][0];\n var labelPosOpt = layoutInfo.labelPosOpt;\n\n if (isNaN(labelPosOpt)) {\n // '+' or '-'\n var mainBoundIdx = labelPosOpt === '+' ? 0 : 1;\n toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);\n toBound(labelsPosition, labelBound, viewBound, 1, 1 - mainBoundIdx);\n } else {\n var mainBoundIdx = labelPosOpt >= 0 ? 0 : 1;\n toBound(mainPosition, mainBound, viewBound, 1, mainBoundIdx);\n labelsPosition[1] = mainPosition[1] + labelPosOpt;\n }\n\n mainGroup.attr('position', mainPosition);\n labelGroup.attr('position', labelsPosition);\n mainGroup.rotation = labelGroup.rotation = layoutInfo.rotation;\n setOrigin(mainGroup);\n setOrigin(labelGroup);\n\n function setOrigin(targetGroup) {\n var pos = targetGroup.position;\n targetGroup.origin = [viewBound[0][0] - pos[0], viewBound[1][0] - pos[1]];\n }\n\n function getBound(rect) {\n // [[xmin, xmax], [ymin, ymax]]\n return [[rect.x, rect.x + rect.width], [rect.y, rect.y + rect.height]];\n }\n\n function toBound(fromPos, from, to, dimIdx, boundIdx) {\n fromPos[dimIdx] += to[dimIdx][boundIdx] - from[dimIdx][boundIdx];\n }\n },\n _createAxis: function (layoutInfo, timelineModel) {\n var data = timelineModel.getData();\n var axisType = timelineModel.get('axisType');\n var scale = axisHelper.createScaleByModel(timelineModel, axisType); // Customize scale. The `tickValue` is `dataIndex`.\n\n scale.getTicks = function () {\n return data.mapArray(['value'], function (value) {\n return value;\n });\n };\n\n var dataExtent = data.getDataExtent('value');\n scale.setExtent(dataExtent[0], dataExtent[1]);\n scale.niceTicks();\n var axis = new TimelineAxis('value', scale, layoutInfo.axisExtent, axisType);\n axis.model = timelineModel;\n return axis;\n },\n _createGroup: function (name) {\n var newGroup = this['_' + name] = new graphic.Group();\n this.group.add(newGroup);\n return newGroup;\n },\n _renderAxisLine: function (layoutInfo, group, axis, timelineModel) {\n var axisExtent = axis.getExtent();\n\n if (!timelineModel.get('lineStyle.show')) {\n return;\n }\n\n group.add(new graphic.Line({\n shape: {\n x1: axisExtent[0],\n y1: 0,\n x2: axisExtent[1],\n y2: 0\n },\n style: zrUtil.extend({\n lineCap: 'round'\n }, timelineModel.getModel('lineStyle').getLineStyle()),\n silent: true,\n z2: 1\n }));\n },\n\n /**\n * @private\n */\n _renderAxisTick: function (layoutInfo, group, axis, timelineModel) {\n var data = timelineModel.getData(); // Show all ticks, despite ignoring strategy.\n\n var ticks = axis.scale.getTicks(); // The value is dataIndex, see the costomized scale.\n\n each(ticks, function (value) {\n var tickCoord = axis.dataToCoord(value);\n var itemModel = data.getItemModel(value);\n var itemStyleModel = itemModel.getModel('itemStyle');\n var hoverStyleModel = itemModel.getModel('emphasis.itemStyle');\n var symbolOpt = {\n position: [tickCoord, 0],\n onclick: bind(this._changeTimeline, this, value)\n };\n var el = giveSymbol(itemModel, itemStyleModel, group, symbolOpt);\n graphic.setHoverStyle(el, hoverStyleModel.getItemStyle());\n\n if (itemModel.get('tooltip')) {\n el.dataIndex = value;\n el.dataModel = timelineModel;\n } else {\n el.dataIndex = el.dataModel = null;\n }\n }, this);\n },\n\n /**\n * @private\n */\n _renderAxisLabel: function (layoutInfo, group, axis, timelineModel) {\n var labelModel = axis.getLabelModel();\n\n if (!labelModel.get('show')) {\n return;\n }\n\n var data = timelineModel.getData();\n var labels = axis.getViewLabels();\n each(labels, function (labelItem) {\n // The tickValue is dataIndex, see the costomized scale.\n var dataIndex = labelItem.tickValue;\n var itemModel = data.getItemModel(dataIndex);\n var normalLabelModel = itemModel.getModel('label');\n var hoverLabelModel = itemModel.getModel('emphasis.label');\n var tickCoord = axis.dataToCoord(labelItem.tickValue);\n var textEl = new graphic.Text({\n position: [tickCoord, 0],\n rotation: layoutInfo.labelRotation - layoutInfo.rotation,\n onclick: bind(this._changeTimeline, this, dataIndex),\n silent: false\n });\n graphic.setTextStyle(textEl.style, normalLabelModel, {\n text: labelItem.formattedLabel,\n textAlign: layoutInfo.labelAlign,\n textVerticalAlign: layoutInfo.labelBaseline\n });\n group.add(textEl);\n graphic.setHoverStyle(textEl, graphic.setTextStyle({}, hoverLabelModel));\n }, this);\n },\n\n /**\n * @private\n */\n _renderControl: function (layoutInfo, group, axis, timelineModel) {\n var controlSize = layoutInfo.controlSize;\n var rotation = layoutInfo.rotation;\n var itemStyle = timelineModel.getModel('controlStyle').getItemStyle();\n var hoverStyle = timelineModel.getModel('emphasis.controlStyle').getItemStyle();\n var rect = [0, -controlSize / 2, controlSize, controlSize];\n var playState = timelineModel.getPlayState();\n var inverse = timelineModel.get('inverse', true);\n makeBtn(layoutInfo.nextBtnPosition, 'controlStyle.nextIcon', bind(this._changeTimeline, this, inverse ? '-' : '+'));\n makeBtn(layoutInfo.prevBtnPosition, 'controlStyle.prevIcon', bind(this._changeTimeline, this, inverse ? '+' : '-'));\n makeBtn(layoutInfo.playPosition, 'controlStyle.' + (playState ? 'stopIcon' : 'playIcon'), bind(this._handlePlayClick, this, !playState), true);\n\n function makeBtn(position, iconPath, onclick, willRotate) {\n if (!position) {\n return;\n }\n\n var opt = {\n position: position,\n origin: [controlSize / 2, 0],\n rotation: willRotate ? -rotation : 0,\n rectHover: true,\n style: itemStyle,\n onclick: onclick\n };\n var btn = makeIcon(timelineModel, iconPath, rect, opt);\n group.add(btn);\n graphic.setHoverStyle(btn, hoverStyle);\n }\n },\n _renderCurrentPointer: function (layoutInfo, group, axis, timelineModel) {\n var data = timelineModel.getData();\n var currentIndex = timelineModel.getCurrentIndex();\n var pointerModel = data.getItemModel(currentIndex).getModel('checkpointStyle');\n var me = this;\n var callback = {\n onCreate: function (pointer) {\n pointer.draggable = true;\n pointer.drift = bind(me._handlePointerDrag, me);\n pointer.ondragend = bind(me._handlePointerDragend, me);\n pointerMoveTo(pointer, currentIndex, axis, timelineModel, true);\n },\n onUpdate: function (pointer) {\n pointerMoveTo(pointer, currentIndex, axis, timelineModel);\n }\n }; // Reuse when exists, for animation and drag.\n\n this._currentPointer = giveSymbol(pointerModel, pointerModel, this._mainGroup, {}, this._currentPointer, callback);\n },\n _handlePlayClick: function (nextState) {\n this._clearTimer();\n\n this.api.dispatchAction({\n type: 'timelinePlayChange',\n playState: nextState,\n from: this.uid\n });\n },\n _handlePointerDrag: function (dx, dy, e) {\n this._clearTimer();\n\n this._pointerChangeTimeline([e.offsetX, e.offsetY]);\n },\n _handlePointerDragend: function (e) {\n this._pointerChangeTimeline([e.offsetX, e.offsetY], true);\n },\n _pointerChangeTimeline: function (mousePos, trigger) {\n var toCoord = this._toAxisCoord(mousePos)[0];\n\n var axis = this._axis;\n var axisExtent = numberUtil.asc(axis.getExtent().slice());\n toCoord > axisExtent[1] && (toCoord = axisExtent[1]);\n toCoord < axisExtent[0] && (toCoord = axisExtent[0]);\n this._currentPointer.position[0] = toCoord;\n\n this._currentPointer.dirty();\n\n var targetDataIndex = this._findNearestTick(toCoord);\n\n var timelineModel = this.model;\n\n if (trigger || targetDataIndex !== timelineModel.getCurrentIndex() && timelineModel.get('realtime')) {\n this._changeTimeline(targetDataIndex);\n }\n },\n _doPlayStop: function () {\n this._clearTimer();\n\n if (this.model.getPlayState()) {\n this._timer = setTimeout(bind(handleFrame, this), this.model.get('playInterval'));\n }\n\n function handleFrame() {\n // Do not cache\n var timelineModel = this.model;\n\n this._changeTimeline(timelineModel.getCurrentIndex() + (timelineModel.get('rewind', true) ? -1 : 1));\n }\n },\n _toAxisCoord: function (vertex) {\n var trans = this._mainGroup.getLocalTransform();\n\n return graphic.applyTransform(vertex, trans, true);\n },\n _findNearestTick: function (axisCoord) {\n var data = this.model.getData();\n var dist = Infinity;\n var targetDataIndex;\n var axis = this._axis;\n data.each(['value'], function (value, dataIndex) {\n var coord = axis.dataToCoord(value);\n var d = Math.abs(coord - axisCoord);\n\n if (d < dist) {\n dist = d;\n targetDataIndex = dataIndex;\n }\n });\n return targetDataIndex;\n },\n _clearTimer: function () {\n if (this._timer) {\n clearTimeout(this._timer);\n this._timer = null;\n }\n },\n _changeTimeline: function (nextIndex) {\n var currentIndex = this.model.getCurrentIndex();\n\n if (nextIndex === '+') {\n nextIndex = currentIndex + 1;\n } else if (nextIndex === '-') {\n nextIndex = currentIndex - 1;\n }\n\n this.api.dispatchAction({\n type: 'timelineChange',\n currentIndex: nextIndex,\n from: this.uid\n });\n }\n});\n\nfunction getViewRect(model, api) {\n return layout.getLayoutRect(model.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n }, model.get('padding'));\n}\n\nfunction makeIcon(timelineModel, objPath, rect, opts) {\n var style = opts.style;\n var icon = graphic.createIcon(timelineModel.get(objPath), opts || {}, new BoundingRect(rect[0], rect[1], rect[2], rect[3])); // TODO createIcon won't use style in opt.\n\n if (style) {\n icon.setStyle(style);\n }\n\n return icon;\n}\n/**\n * Create symbol or update symbol\n * opt: basic position and event handlers\n */\n\n\nfunction giveSymbol(hostModel, itemStyleModel, group, opt, symbol, callback) {\n var color = itemStyleModel.get('color');\n\n if (!symbol) {\n var symbolType = hostModel.get('symbol');\n symbol = createSymbol(symbolType, -1, -1, 2, 2, color);\n symbol.setStyle('strokeNoScale', true);\n group.add(symbol);\n callback && callback.onCreate(symbol);\n } else {\n symbol.setColor(color);\n group.add(symbol); // Group may be new, also need to add.\n\n callback && callback.onUpdate(symbol);\n } // Style\n\n\n var itemStyle = itemStyleModel.getItemStyle(['color', 'symbol', 'symbolSize']);\n symbol.setStyle(itemStyle); // Transform and events.\n\n opt = zrUtil.merge({\n rectHover: true,\n z2: 100\n }, opt, true);\n var symbolSize = hostModel.get('symbolSize');\n symbolSize = symbolSize instanceof Array ? symbolSize.slice() : [+symbolSize, +symbolSize];\n symbolSize[0] /= 2;\n symbolSize[1] /= 2;\n opt.scale = symbolSize;\n var symbolOffset = hostModel.get('symbolOffset');\n\n if (symbolOffset) {\n var pos = opt.position = opt.position || [0, 0];\n pos[0] += numberUtil.parsePercent(symbolOffset[0], symbolSize[0]);\n pos[1] += numberUtil.parsePercent(symbolOffset[1], symbolSize[1]);\n }\n\n var symbolRotate = hostModel.get('symbolRotate');\n opt.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n symbol.attr(opt); // FIXME\n // (1) When symbol.style.strokeNoScale is true and updateTransform is not performed,\n // getBoundingRect will return wrong result.\n // (This is supposed to be resolved in zrender, but it is a little difficult to\n // leverage performance and auto updateTransform)\n // (2) All of ancesters of symbol do not scale, so we can just updateTransform symbol.\n\n symbol.updateTransform();\n return symbol;\n}\n\nfunction pointerMoveTo(pointer, dataIndex, axis, timelineModel, noAnimation) {\n if (pointer.dragging) {\n return;\n }\n\n var pointerModel = timelineModel.getModel('checkpointStyle');\n var toCoord = axis.dataToCoord(timelineModel.getData().get(['value'], dataIndex));\n\n if (noAnimation || !pointerModel.get('animation', true)) {\n pointer.attr({\n position: [toCoord, 0]\n });\n } else {\n pointer.stopAnimation(true);\n pointer.animateTo({\n position: [toCoord, 0]\n }, pointerModel.get('animationDuration', true), pointerModel.get('animationEasing', true));\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar DataZoomModel = require(\"./DataZoomModel\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar SliderZoomModel = DataZoomModel.extend({\n type: 'dataZoom.slider',\n layoutMode: 'box',\n\n /**\n * @protected\n */\n defaultOption: {\n show: true,\n // ph => placeholder. Using placehoder here because\n // deault value can only be drived in view stage.\n right: 'ph',\n // Default align to grid rect.\n top: 'ph',\n // Default align to grid rect.\n width: 'ph',\n // Default align to grid rect.\n height: 'ph',\n // Default align to grid rect.\n left: null,\n // Default align to grid rect.\n bottom: null,\n // Default align to grid rect.\n backgroundColor: 'rgba(47,69,84,0)',\n // Background of slider zoom component.\n // dataBackgroundColor: '#ddd', // Background coor of data shadow and border of box,\n // highest priority, remain for compatibility of\n // previous version, but not recommended any more.\n dataBackground: {\n lineStyle: {\n color: '#2f4554',\n width: 0.5,\n opacity: 0.3\n },\n areaStyle: {\n color: 'rgba(47,69,84,0.3)',\n opacity: 0.3\n }\n },\n borderColor: '#ddd',\n // border color of the box. For compatibility,\n // if dataBackgroundColor is set, borderColor\n // is ignored.\n fillerColor: 'rgba(167,183,204,0.4)',\n // Color of selected area.\n // handleColor: 'rgba(89,170,216,0.95)', // Color of handle.\n // handleIcon: 'path://M4.9,17.8c0-1.4,4.5-10.5,5.5-12.4c0-0.1,0.6-1.1,0.9-1.1c0.4,0,0.9,1,0.9,1.1c1.1,2.2,5.4,11,5.4,12.4v17.8c0,1.5-0.6,2.1-1.3,2.1H6.1c-0.7,0-1.3-0.6-1.3-2.1V17.8z',\n\n /* eslint-disable */\n handleIcon: 'M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z',\n\n /* eslint-enable */\n // Percent of the slider height\n handleSize: '100%',\n handleStyle: {\n color: '#a7b7cc'\n },\n labelPrecision: null,\n labelFormatter: null,\n showDetail: true,\n showDataShadow: 'auto',\n // Default auto decision.\n realtime: true,\n zoomLock: false,\n // Whether disable zoom.\n textStyle: {\n color: '#333'\n }\n }\n});\nvar _default = SliderZoomModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerAction({\n type: 'timelineChange',\n event: 'timelineChanged',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n var timelineModel = ecModel.getComponent('timeline');\n\n if (timelineModel && payload.currentIndex != null) {\n timelineModel.setCurrentIndex(payload.currentIndex);\n\n if (!timelineModel.get('loop', true) && timelineModel.isIndexMax()) {\n timelineModel.setPlayState(false);\n }\n } // Set normalized currentIndex to payload.\n\n\n ecModel.resetOption('timeline');\n return zrUtil.defaults({\n currentIndex: timelineModel.option.currentIndex\n }, payload);\n});\necharts.registerAction({\n type: 'timelinePlayChange',\n event: 'timelinePlayChanged',\n update: 'update'\n}, function (payload, ecModel) {\n var timelineModel = ecModel.getComponent('timeline');\n\n if (timelineModel && payload.playState != null) {\n timelineModel.setPlayState(payload.playState);\n }\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar createListFromArray = require(\"../helper/createListFromArray\");\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.heatmap',\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {\n generateCoord: 'value'\n });\n },\n preventIncremental: function () {\n var coordSysCreator = CoordinateSystem.get(this.get('coordinateSystem'));\n\n if (coordSysCreator && coordSysCreator.dimensions) {\n return coordSysCreator.dimensions[0] === 'lng' && coordSysCreator.dimensions[1] === 'lat';\n }\n },\n defaultOption: {\n // Cartesian2D or geo\n coordinateSystem: 'cartesian2d',\n zlevel: 0,\n z: 2,\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Geo coordinate system\n geoIndex: 0,\n blurSize: 30,\n pointSize: 20,\n maxOpacity: 1,\n minOpacity: 0\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar modelUtil = require(\"../../util/model\");\n\nvar helper = require(\"./helper\");\n\nvar AxisProxy = require(\"./AxisProxy\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar each = zrUtil.each;\nvar eachAxisDim = helper.eachAxisDim;\nvar DataZoomModel = echarts.extendComponentModel({\n type: 'dataZoom',\n dependencies: ['xAxis', 'yAxis', 'zAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'series'],\n\n /**\n * @protected\n */\n defaultOption: {\n zlevel: 0,\n z: 4,\n // Higher than normal component (z: 2).\n orient: null,\n // Default auto by axisIndex. Possible value: 'horizontal', 'vertical'.\n xAxisIndex: null,\n // Default the first horizontal category axis.\n yAxisIndex: null,\n // Default the first vertical category axis.\n filterMode: 'filter',\n // Possible values: 'filter' or 'empty' or 'weakFilter'.\n // 'filter': data items which are out of window will be removed. This option is\n // applicable when filtering outliers. For each data item, it will be\n // filtered if one of the relevant dimensions is out of the window.\n // 'weakFilter': data items which are out of window will be removed. This option\n // is applicable when filtering outliers. For each data item, it will be\n // filtered only if all of the relevant dimensions are out of the same\n // side of the window.\n // 'empty': data items which are out of window will be set to empty.\n // This option is applicable when user should not neglect\n // that there are some data items out of window.\n // 'none': Do not filter.\n // Taking line chart as an example, line will be broken in\n // the filtered points when filterModel is set to 'empty', but\n // be connected when set to 'filter'.\n throttle: null,\n // Dispatch action by the fixed rate, avoid frequency.\n // default 100. Do not throttle when use null/undefined.\n // If animation === true and animationDurationUpdate > 0,\n // default value is 100, otherwise 20.\n start: 0,\n // Start percent. 0 ~ 100\n end: 100,\n // End percent. 0 ~ 100\n startValue: null,\n // Start value. If startValue specified, start is ignored.\n endValue: null,\n // End value. If endValue specified, end is ignored.\n minSpan: null,\n // 0 ~ 100\n maxSpan: null,\n // 0 ~ 100\n minValueSpan: null,\n // The range of dataZoom can not be smaller than that.\n maxValueSpan: null,\n // The range of dataZoom can not be larger than that.\n rangeMode: null // Array, can be 'value' or 'percent'.\n\n },\n\n /**\n * @override\n */\n init: function (option, parentModel, ecModel) {\n /**\n * key like x_0, y_1\n * @private\n * @type {Object}\n */\n this._dataIntervalByAxis = {};\n /**\n * @private\n */\n\n this._dataInfo = {};\n /**\n * key like x_0, y_1\n * @private\n */\n\n this._axisProxies = {};\n /**\n * @readOnly\n */\n\n this.textStyleModel;\n /**\n * @private\n */\n\n this._autoThrottle = true;\n /**\n * It is `[rangeModeForMin, rangeModeForMax]`.\n * The optional values for `rangeMode`:\n * + `'value'` mode: the axis extent will always be determined by\n * `dataZoom.startValue` and `dataZoom.endValue`, despite\n * how data like and how `axis.min` and `axis.max` are.\n * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`,\n * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`,\n * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`.\n * Axis extent will be determined by the result of the percent of `[dMin, dMax]`.\n *\n * For example, when users are using dynamic data (update data periodically via `setOption`),\n * if in `'value`' mode, the window will be kept in a fixed value range despite how\n * data are appended, while if in `'percent'` mode, whe window range will be changed alone with\n * the appended data (suppose `axis.min` and `axis.max` are not specified).\n *\n * @private\n */\n\n this._rangePropMode = ['percent', 'percent'];\n var inputRawOption = retrieveRawOption(option);\n /**\n * Suppose a \"main process\" start at the point that model prepared (that is,\n * model initialized or merged or method called in `action`).\n * We should keep the `main process` idempotent, that is, given a set of values\n * on `option`, we get the same result.\n *\n * But sometimes, values on `option` will be updated for providing users\n * a \"final calculated value\" (`dataZoomProcessor` will do that). Those value\n * should not be the base/input of the `main process`.\n *\n * So in that case we should save and keep the input of the `main process`\n * separately, called `settledOption`.\n *\n * For example, consider the case:\n * (Step_1) brush zoom the grid by `toolbox.dataZoom`,\n * where the original input `option.startValue`, `option.endValue` are earsed by\n * calculated value.\n * (Step)2) click the legend to hide and show a series,\n * where the new range is calculated by the earsed `startValue` and `endValue`,\n * which brings incorrect result.\n *\n * @readOnly\n */\n\n this.settledOption = inputRawOption;\n this.mergeDefaultAndTheme(option, ecModel);\n this.doInit(inputRawOption);\n },\n\n /**\n * @override\n */\n mergeOption: function (newOption) {\n var inputRawOption = retrieveRawOption(newOption); //FIX #2591\n\n zrUtil.merge(this.option, newOption, true);\n zrUtil.merge(this.settledOption, inputRawOption, true);\n this.doInit(inputRawOption);\n },\n\n /**\n * @protected\n */\n doInit: function (inputRawOption) {\n var thisOption = this.option; // Disable realtime view update if canvas is not supported.\n\n if (!env.canvasSupported) {\n thisOption.realtime = false;\n }\n\n this._setDefaultThrottle(inputRawOption);\n\n updateRangeUse(this, inputRawOption);\n var settledOption = this.settledOption;\n each([['start', 'startValue'], ['end', 'endValue']], function (names, index) {\n // start/end has higher priority over startValue/endValue if they\n // both set, but we should make chart.setOption({endValue: 1000})\n // effective, rather than chart.setOption({endValue: 1000, end: null}).\n if (this._rangePropMode[index] === 'value') {\n thisOption[names[0]] = settledOption[names[0]] = null;\n } // Otherwise do nothing and use the merge result.\n\n }, this);\n this.textStyleModel = this.getModel('textStyle');\n\n this._resetTarget();\n\n this._giveAxisProxies();\n },\n\n /**\n * @private\n */\n _giveAxisProxies: function () {\n var axisProxies = this._axisProxies;\n this.eachTargetAxis(function (dimNames, axisIndex, dataZoomModel, ecModel) {\n var axisModel = this.dependentModels[dimNames.axis][axisIndex]; // If exists, share axisProxy with other dataZoomModels.\n\n var axisProxy = axisModel.__dzAxisProxy || ( // Use the first dataZoomModel as the main model of axisProxy.\n axisModel.__dzAxisProxy = new AxisProxy(dimNames.name, axisIndex, this, ecModel)); // FIXME\n // dispose __dzAxisProxy\n\n axisProxies[dimNames.name + '_' + axisIndex] = axisProxy;\n }, this);\n },\n\n /**\n * @private\n */\n _resetTarget: function () {\n var thisOption = this.option;\n\n var autoMode = this._judgeAutoMode();\n\n eachAxisDim(function (dimNames) {\n var axisIndexName = dimNames.axisIndex;\n thisOption[axisIndexName] = modelUtil.normalizeToArray(thisOption[axisIndexName]);\n }, this);\n\n if (autoMode === 'axisIndex') {\n this._autoSetAxisIndex();\n } else if (autoMode === 'orient') {\n this._autoSetOrient();\n }\n },\n\n /**\n * @private\n */\n _judgeAutoMode: function () {\n // Auto set only works for setOption at the first time.\n // The following is user's reponsibility. So using merged\n // option is OK.\n var thisOption = this.option;\n var hasIndexSpecified = false;\n eachAxisDim(function (dimNames) {\n // When user set axisIndex as a empty array, we think that user specify axisIndex\n // but do not want use auto mode. Because empty array may be encountered when\n // some error occured.\n if (thisOption[dimNames.axisIndex] != null) {\n hasIndexSpecified = true;\n }\n }, this);\n var orient = thisOption.orient;\n\n if (orient == null && hasIndexSpecified) {\n return 'orient';\n } else if (!hasIndexSpecified) {\n if (orient == null) {\n thisOption.orient = 'horizontal';\n }\n\n return 'axisIndex';\n }\n },\n\n /**\n * @private\n */\n _autoSetAxisIndex: function () {\n var autoAxisIndex = true;\n var orient = this.get('orient', true);\n var thisOption = this.option;\n var dependentModels = this.dependentModels;\n\n if (autoAxisIndex) {\n // Find axis that parallel to dataZoom as default.\n var dimName = orient === 'vertical' ? 'y' : 'x';\n\n if (dependentModels[dimName + 'Axis'].length) {\n thisOption[dimName + 'AxisIndex'] = [0];\n autoAxisIndex = false;\n } else {\n each(dependentModels.singleAxis, function (singleAxisModel) {\n if (autoAxisIndex && singleAxisModel.get('orient', true) === orient) {\n thisOption.singleAxisIndex = [singleAxisModel.componentIndex];\n autoAxisIndex = false;\n }\n });\n }\n }\n\n if (autoAxisIndex) {\n // Find the first category axis as default. (consider polar)\n eachAxisDim(function (dimNames) {\n if (!autoAxisIndex) {\n return;\n }\n\n var axisIndices = [];\n var axisModels = this.dependentModels[dimNames.axis];\n\n if (axisModels.length && !axisIndices.length) {\n for (var i = 0, len = axisModels.length; i < len; i++) {\n if (axisModels[i].get('type') === 'category') {\n axisIndices.push(i);\n }\n }\n }\n\n thisOption[dimNames.axisIndex] = axisIndices;\n\n if (axisIndices.length) {\n autoAxisIndex = false;\n }\n }, this);\n }\n\n if (autoAxisIndex) {\n // FIXME\n // 这里是兼容ec2的写法(没指定xAxisIndex和yAxisIndex时把scatter和双数值轴折柱纳入dataZoom控制),\n // 但是实际是否需要Grid.js#getScaleByOption来判断(考虑time,log等axis type)?\n // If both dataZoom.xAxisIndex and dataZoom.yAxisIndex is not specified,\n // dataZoom component auto adopts series that reference to\n // both xAxis and yAxis which type is 'value'.\n this.ecModel.eachSeries(function (seriesModel) {\n if (this._isSeriesHasAllAxesTypeOf(seriesModel, 'value')) {\n eachAxisDim(function (dimNames) {\n var axisIndices = thisOption[dimNames.axisIndex];\n var axisIndex = seriesModel.get(dimNames.axisIndex);\n var axisId = seriesModel.get(dimNames.axisId);\n var axisModel = seriesModel.ecModel.queryComponents({\n mainType: dimNames.axis,\n index: axisIndex,\n id: axisId\n })[0];\n axisIndex = axisModel.componentIndex;\n\n if (zrUtil.indexOf(axisIndices, axisIndex) < 0) {\n axisIndices.push(axisIndex);\n }\n });\n }\n }, this);\n }\n },\n\n /**\n * @private\n */\n _autoSetOrient: function () {\n var dim; // Find the first axis\n\n this.eachTargetAxis(function (dimNames) {\n !dim && (dim = dimNames.name);\n }, this);\n this.option.orient = dim === 'y' ? 'vertical' : 'horizontal';\n },\n\n /**\n * @private\n */\n _isSeriesHasAllAxesTypeOf: function (seriesModel, axisType) {\n // FIXME\n // 需要series的xAxisIndex和yAxisIndex都首先自动设置上。\n // 例如series.type === scatter时。\n var is = true;\n eachAxisDim(function (dimNames) {\n var seriesAxisIndex = seriesModel.get(dimNames.axisIndex);\n var axisModel = this.dependentModels[dimNames.axis][seriesAxisIndex];\n\n if (!axisModel || axisModel.get('type') !== axisType) {\n is = false;\n }\n }, this);\n return is;\n },\n\n /**\n * @private\n */\n _setDefaultThrottle: function (inputRawOption) {\n // When first time user set throttle, auto throttle ends.\n if (inputRawOption.hasOwnProperty('throttle')) {\n this._autoThrottle = false;\n }\n\n if (this._autoThrottle) {\n var globalOption = this.ecModel.option;\n this.option.throttle = globalOption.animation && globalOption.animationDurationUpdate > 0 ? 100 : 20;\n }\n },\n\n /**\n * @public\n */\n getFirstTargetAxisModel: function () {\n var firstAxisModel;\n eachAxisDim(function (dimNames) {\n if (firstAxisModel == null) {\n var indices = this.get(dimNames.axisIndex);\n\n if (indices.length) {\n firstAxisModel = this.dependentModels[dimNames.axis][indices[0]];\n }\n }\n }, this);\n return firstAxisModel;\n },\n\n /**\n * @public\n * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel\n */\n eachTargetAxis: function (callback, context) {\n var ecModel = this.ecModel;\n eachAxisDim(function (dimNames) {\n each(this.get(dimNames.axisIndex), function (axisIndex) {\n callback.call(context, dimNames, axisIndex, this, ecModel);\n }, this);\n }, this);\n },\n\n /**\n * @param {string} dimName\n * @param {number} axisIndex\n * @return {module:echarts/component/dataZoom/AxisProxy} If not found, return null/undefined.\n */\n getAxisProxy: function (dimName, axisIndex) {\n return this._axisProxies[dimName + '_' + axisIndex];\n },\n\n /**\n * @param {string} dimName\n * @param {number} axisIndex\n * @return {module:echarts/model/Model} If not found, return null/undefined.\n */\n getAxisModel: function (dimName, axisIndex) {\n var axisProxy = this.getAxisProxy(dimName, axisIndex);\n return axisProxy && axisProxy.getAxisModel();\n },\n\n /**\n * If not specified, set to undefined.\n *\n * @public\n * @param {Object} opt\n * @param {number} [opt.start]\n * @param {number} [opt.end]\n * @param {number} [opt.startValue]\n * @param {number} [opt.endValue]\n */\n setRawRange: function (opt) {\n var thisOption = this.option;\n var settledOption = this.settledOption;\n each([['start', 'startValue'], ['end', 'endValue']], function (names) {\n // Consider the pair :\n // If one has value and the other one is `null/undefined`, we both set them\n // to `settledOption`. This strategy enables the feature to clear the original\n // value in `settledOption` to `null/undefined`.\n // But if both of them are `null/undefined`, we do not set them to `settledOption`\n // and keep `settledOption` with the original value. This strategy enables users to\n // only set but not set when calling\n // `dispatchAction`.\n // The pair is treated in the same way.\n if (opt[names[0]] != null || opt[names[1]] != null) {\n thisOption[names[0]] = settledOption[names[0]] = opt[names[0]];\n thisOption[names[1]] = settledOption[names[1]] = opt[names[1]];\n }\n }, this);\n updateRangeUse(this, opt);\n },\n\n /**\n * @public\n * @param {Object} opt\n * @param {number} [opt.start]\n * @param {number} [opt.end]\n * @param {number} [opt.startValue]\n * @param {number} [opt.endValue]\n */\n setCalculatedRange: function (opt) {\n var option = this.option;\n each(['start', 'startValue', 'end', 'endValue'], function (name) {\n option[name] = opt[name];\n });\n },\n\n /**\n * @public\n * @return {Array.} [startPercent, endPercent]\n */\n getPercentRange: function () {\n var axisProxy = this.findRepresentativeAxisProxy();\n\n if (axisProxy) {\n return axisProxy.getDataPercentWindow();\n }\n },\n\n /**\n * @public\n * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0);\n *\n * @param {string} [axisDimName]\n * @param {number} [axisIndex]\n * @return {Array.} [startValue, endValue] value can only be '-' or finite number.\n */\n getValueRange: function (axisDimName, axisIndex) {\n if (axisDimName == null && axisIndex == null) {\n var axisProxy = this.findRepresentativeAxisProxy();\n\n if (axisProxy) {\n return axisProxy.getDataValueWindow();\n }\n } else {\n return this.getAxisProxy(axisDimName, axisIndex).getDataValueWindow();\n }\n },\n\n /**\n * @public\n * @param {module:echarts/model/Model} [axisModel] If axisModel given, find axisProxy\n * corresponding to the axisModel\n * @return {module:echarts/component/dataZoom/AxisProxy}\n */\n findRepresentativeAxisProxy: function (axisModel) {\n if (axisModel) {\n return axisModel.__dzAxisProxy;\n } // Find the first hosted axisProxy\n\n\n var axisProxies = this._axisProxies;\n\n for (var key in axisProxies) {\n if (axisProxies.hasOwnProperty(key) && axisProxies[key].hostedBy(this)) {\n return axisProxies[key];\n }\n } // If no hosted axis find not hosted axisProxy.\n // Consider this case: dataZoomModel1 and dataZoomModel2 control the same axis,\n // and the option.start or option.end settings are different. The percentRange\n // should follow axisProxy.\n // (We encounter this problem in toolbox data zoom.)\n\n\n for (var key in axisProxies) {\n if (axisProxies.hasOwnProperty(key) && !axisProxies[key].hostedBy(this)) {\n return axisProxies[key];\n }\n }\n },\n\n /**\n * @return {Array.}\n */\n getRangePropMode: function () {\n return this._rangePropMode.slice();\n }\n});\n/**\n * Retrieve the those raw params from option, which will be cached separately.\n * becasue they will be overwritten by normalized/calculated values in the main\n * process.\n */\n\nfunction retrieveRawOption(option) {\n var ret = {};\n each(['start', 'end', 'startValue', 'endValue', 'throttle'], function (name) {\n option.hasOwnProperty(name) && (ret[name] = option[name]);\n });\n return ret;\n}\n\nfunction updateRangeUse(dataZoomModel, inputRawOption) {\n var rangePropMode = dataZoomModel._rangePropMode;\n var rangeModeInOption = dataZoomModel.get('rangeMode');\n each([['start', 'startValue'], ['end', 'endValue']], function (names, index) {\n var percentSpecified = inputRawOption[names[0]] != null;\n var valueSpecified = inputRawOption[names[1]] != null;\n\n if (percentSpecified && !valueSpecified) {\n rangePropMode[index] = 'percent';\n } else if (!percentSpecified && valueSpecified) {\n rangePropMode[index] = 'value';\n } else if (rangeModeInOption) {\n rangePropMode[index] = rangeModeInOption[index];\n } else if (percentSpecified) {\n // percentSpecified && valueSpecified\n rangePropMode[index] = 'percent';\n } // else remain its original setting.\n\n });\n}\n\nvar _default = DataZoomModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar LinearGradient = require(\"zrender/lib/graphic/LinearGradient\");\n\nvar eventTool = require(\"zrender/lib/core/event\");\n\nvar VisualMapView = require(\"./VisualMapView\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar sliderMove = require(\"../helper/sliderMove\");\n\nvar helper = require(\"./helper\");\n\nvar modelUtil = require(\"../../util/model\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar linearMap = numberUtil.linearMap;\nvar each = zrUtil.each;\nvar mathMin = Math.min;\nvar mathMax = Math.max; // Arbitrary value\n\nvar HOVER_LINK_SIZE = 12;\nvar HOVER_LINK_OUT = 6; // Notice:\n// Any \"interval\" should be by the order of [low, high].\n// \"handle0\" (handleIndex === 0) maps to\n// low data value: this._dataInterval[0] and has low coord.\n// \"handle1\" (handleIndex === 1) maps to\n// high data value: this._dataInterval[1] and has high coord.\n// The logic of transform is implemented in this._createBarGroup.\n\nvar ContinuousView = VisualMapView.extend({\n type: 'visualMap.continuous',\n\n /**\n * @override\n */\n init: function () {\n ContinuousView.superApply(this, 'init', arguments);\n /**\n * @private\n */\n\n this._shapes = {};\n /**\n * @private\n */\n\n this._dataInterval = [];\n /**\n * @private\n */\n\n this._handleEnds = [];\n /**\n * @private\n */\n\n this._orient;\n /**\n * @private\n */\n\n this._useHandle;\n /**\n * @private\n */\n\n this._hoverLinkDataIndices = [];\n /**\n * @private\n */\n\n this._dragging;\n /**\n * @private\n */\n\n this._hovering;\n },\n\n /**\n * @protected\n * @override\n */\n doRender: function (visualMapModel, ecModel, api, payload) {\n if (!payload || payload.type !== 'selectDataRange' || payload.from !== this.uid) {\n this._buildView();\n }\n },\n\n /**\n * @private\n */\n _buildView: function () {\n this.group.removeAll();\n var visualMapModel = this.visualMapModel;\n var thisGroup = this.group;\n this._orient = visualMapModel.get('orient');\n this._useHandle = visualMapModel.get('calculable');\n\n this._resetInterval();\n\n this._renderBar(thisGroup);\n\n var dataRangeText = visualMapModel.get('text');\n\n this._renderEndsText(thisGroup, dataRangeText, 0);\n\n this._renderEndsText(thisGroup, dataRangeText, 1); // Do this for background size calculation.\n\n\n this._updateView(true); // After updating view, inner shapes is built completely,\n // and then background can be rendered.\n\n\n this.renderBackground(thisGroup); // Real update view\n\n this._updateView();\n\n this._enableHoverLinkToSeries();\n\n this._enableHoverLinkFromSeries();\n\n this.positionGroup(thisGroup);\n },\n\n /**\n * @private\n */\n _renderEndsText: function (group, dataRangeText, endsIndex) {\n if (!dataRangeText) {\n return;\n } // Compatible with ec2, text[0] map to high value, text[1] map low value.\n\n\n var text = dataRangeText[1 - endsIndex];\n text = text != null ? text + '' : '';\n var visualMapModel = this.visualMapModel;\n var textGap = visualMapModel.get('textGap');\n var itemSize = visualMapModel.itemSize;\n var barGroup = this._shapes.barGroup;\n\n var position = this._applyTransform([itemSize[0] / 2, endsIndex === 0 ? -textGap : itemSize[1] + textGap], barGroup);\n\n var align = this._applyTransform(endsIndex === 0 ? 'bottom' : 'top', barGroup);\n\n var orient = this._orient;\n var textStyleModel = this.visualMapModel.textStyleModel;\n this.group.add(new graphic.Text({\n style: {\n x: position[0],\n y: position[1],\n textVerticalAlign: orient === 'horizontal' ? 'middle' : align,\n textAlign: orient === 'horizontal' ? align : 'center',\n text: text,\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n }));\n },\n\n /**\n * @private\n */\n _renderBar: function (targetGroup) {\n var visualMapModel = this.visualMapModel;\n var shapes = this._shapes;\n var itemSize = visualMapModel.itemSize;\n var orient = this._orient;\n var useHandle = this._useHandle;\n var itemAlign = helper.getItemAlign(visualMapModel, this.api, itemSize);\n\n var barGroup = shapes.barGroup = this._createBarGroup(itemAlign); // Bar\n\n\n barGroup.add(shapes.outOfRange = createPolygon());\n barGroup.add(shapes.inRange = createPolygon(null, useHandle ? getCursor(this._orient) : null, zrUtil.bind(this._dragHandle, this, 'all', false), zrUtil.bind(this._dragHandle, this, 'all', true)));\n var textRect = visualMapModel.textStyleModel.getTextRect('国');\n var textSize = mathMax(textRect.width, textRect.height); // Handle\n\n if (useHandle) {\n shapes.handleThumbs = [];\n shapes.handleLabels = [];\n shapes.handleLabelPoints = [];\n\n this._createHandle(barGroup, 0, itemSize, textSize, orient, itemAlign);\n\n this._createHandle(barGroup, 1, itemSize, textSize, orient, itemAlign);\n }\n\n this._createIndicator(barGroup, itemSize, textSize, orient);\n\n targetGroup.add(barGroup);\n },\n\n /**\n * @private\n */\n _createHandle: function (barGroup, handleIndex, itemSize, textSize, orient) {\n var onDrift = zrUtil.bind(this._dragHandle, this, handleIndex, false);\n var onDragEnd = zrUtil.bind(this._dragHandle, this, handleIndex, true);\n var handleThumb = createPolygon(createHandlePoints(handleIndex, textSize), getCursor(this._orient), onDrift, onDragEnd);\n handleThumb.position[0] = itemSize[0];\n barGroup.add(handleThumb); // Text is always horizontal layout but should not be effected by\n // transform (orient/inverse). So label is built separately but not\n // use zrender/graphic/helper/RectText, and is located based on view\n // group (according to handleLabelPoint) but not barGroup.\n\n var textStyleModel = this.visualMapModel.textStyleModel;\n var handleLabel = new graphic.Text({\n draggable: true,\n drift: onDrift,\n onmousemove: function (e) {\n // Fot mobile devicem, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n ondragend: onDragEnd,\n style: {\n x: 0,\n y: 0,\n text: '',\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n });\n this.group.add(handleLabel);\n var handleLabelPoint = [orient === 'horizontal' ? textSize / 2 : textSize * 1.5, orient === 'horizontal' ? handleIndex === 0 ? -(textSize * 1.5) : textSize * 1.5 : handleIndex === 0 ? -textSize / 2 : textSize / 2];\n var shapes = this._shapes;\n shapes.handleThumbs[handleIndex] = handleThumb;\n shapes.handleLabelPoints[handleIndex] = handleLabelPoint;\n shapes.handleLabels[handleIndex] = handleLabel;\n },\n\n /**\n * @private\n */\n _createIndicator: function (barGroup, itemSize, textSize, orient) {\n var indicator = createPolygon([[0, 0]], 'move');\n indicator.position[0] = itemSize[0];\n indicator.attr({\n invisible: true,\n silent: true\n });\n barGroup.add(indicator);\n var textStyleModel = this.visualMapModel.textStyleModel;\n var indicatorLabel = new graphic.Text({\n silent: true,\n invisible: true,\n style: {\n x: 0,\n y: 0,\n text: '',\n textFont: textStyleModel.getFont(),\n textFill: textStyleModel.getTextColor()\n }\n });\n this.group.add(indicatorLabel);\n var indicatorLabelPoint = [orient === 'horizontal' ? textSize / 2 : HOVER_LINK_OUT + 3, 0];\n var shapes = this._shapes;\n shapes.indicator = indicator;\n shapes.indicatorLabel = indicatorLabel;\n shapes.indicatorLabelPoint = indicatorLabelPoint;\n },\n\n /**\n * @private\n */\n _dragHandle: function (handleIndex, isEnd, dx, dy) {\n if (!this._useHandle) {\n return;\n }\n\n this._dragging = !isEnd;\n\n if (!isEnd) {\n // Transform dx, dy to bar coordination.\n var vertex = this._applyTransform([dx, dy], this._shapes.barGroup, true);\n\n this._updateInterval(handleIndex, vertex[1]); // Considering realtime, update view should be executed\n // before dispatch action.\n\n\n this._updateView();\n } // dragEnd do not dispatch action when realtime.\n\n\n if (isEnd === !this.visualMapModel.get('realtime')) {\n // jshint ignore:line\n this.api.dispatchAction({\n type: 'selectDataRange',\n from: this.uid,\n visualMapId: this.visualMapModel.id,\n selected: this._dataInterval.slice()\n });\n }\n\n if (isEnd) {\n !this._hovering && this._clearHoverLinkToSeries();\n } else if (useHoverLinkOnHandle(this.visualMapModel)) {\n this._doHoverLinkToSeries(this._handleEnds[handleIndex], false);\n }\n },\n\n /**\n * @private\n */\n _resetInterval: function () {\n var visualMapModel = this.visualMapModel;\n var dataInterval = this._dataInterval = visualMapModel.getSelected();\n var dataExtent = visualMapModel.getExtent();\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n this._handleEnds = [linearMap(dataInterval[0], dataExtent, sizeExtent, true), linearMap(dataInterval[1], dataExtent, sizeExtent, true)];\n },\n\n /**\n * @private\n * @param {(number|string)} handleIndex 0 or 1 or 'all'\n * @param {number} dx\n * @param {number} dy\n */\n _updateInterval: function (handleIndex, delta) {\n delta = delta || 0;\n var visualMapModel = this.visualMapModel;\n var handleEnds = this._handleEnds;\n var sizeExtent = [0, visualMapModel.itemSize[1]];\n sliderMove(delta, handleEnds, sizeExtent, handleIndex, // cross is forbiden\n 0);\n var dataExtent = visualMapModel.getExtent(); // Update data interval.\n\n this._dataInterval = [linearMap(handleEnds[0], sizeExtent, dataExtent, true), linearMap(handleEnds[1], sizeExtent, dataExtent, true)];\n },\n\n /**\n * @private\n */\n _updateView: function (forSketch) {\n var visualMapModel = this.visualMapModel;\n var dataExtent = visualMapModel.getExtent();\n var shapes = this._shapes;\n var outOfRangeHandleEnds = [0, visualMapModel.itemSize[1]];\n var inRangeHandleEnds = forSketch ? outOfRangeHandleEnds : this._handleEnds;\n\n var visualInRange = this._createBarVisual(this._dataInterval, dataExtent, inRangeHandleEnds, 'inRange');\n\n var visualOutOfRange = this._createBarVisual(dataExtent, dataExtent, outOfRangeHandleEnds, 'outOfRange');\n\n shapes.inRange.setStyle({\n fill: visualInRange.barColor,\n opacity: visualInRange.opacity\n }).setShape('points', visualInRange.barPoints);\n shapes.outOfRange.setStyle({\n fill: visualOutOfRange.barColor,\n opacity: visualOutOfRange.opacity\n }).setShape('points', visualOutOfRange.barPoints);\n\n this._updateHandle(inRangeHandleEnds, visualInRange);\n },\n\n /**\n * @private\n */\n _createBarVisual: function (dataInterval, dataExtent, handleEnds, forceState) {\n var opts = {\n forceState: forceState,\n convertOpacityToAlpha: true\n };\n\n var colorStops = this._makeColorGradient(dataInterval, opts);\n\n var symbolSizes = [this.getControllerVisual(dataInterval[0], 'symbolSize', opts), this.getControllerVisual(dataInterval[1], 'symbolSize', opts)];\n\n var barPoints = this._createBarPoints(handleEnds, symbolSizes);\n\n return {\n barColor: new LinearGradient(0, 0, 0, 1, colorStops),\n barPoints: barPoints,\n handlesColor: [colorStops[0].color, colorStops[colorStops.length - 1].color]\n };\n },\n\n /**\n * @private\n */\n _makeColorGradient: function (dataInterval, opts) {\n // Considering colorHue, which is not linear, so we have to sample\n // to calculate gradient color stops, but not only caculate head\n // and tail.\n var sampleNumber = 100; // Arbitrary value.\n\n var colorStops = [];\n var step = (dataInterval[1] - dataInterval[0]) / sampleNumber;\n colorStops.push({\n color: this.getControllerVisual(dataInterval[0], 'color', opts),\n offset: 0\n });\n\n for (var i = 1; i < sampleNumber; i++) {\n var currValue = dataInterval[0] + step * i;\n\n if (currValue > dataInterval[1]) {\n break;\n }\n\n colorStops.push({\n color: this.getControllerVisual(currValue, 'color', opts),\n offset: i / sampleNumber\n });\n }\n\n colorStops.push({\n color: this.getControllerVisual(dataInterval[1], 'color', opts),\n offset: 1\n });\n return colorStops;\n },\n\n /**\n * @private\n */\n _createBarPoints: function (handleEnds, symbolSizes) {\n var itemSize = this.visualMapModel.itemSize;\n return [[itemSize[0] - symbolSizes[0], handleEnds[0]], [itemSize[0], handleEnds[0]], [itemSize[0], handleEnds[1]], [itemSize[0] - symbolSizes[1], handleEnds[1]]];\n },\n\n /**\n * @private\n */\n _createBarGroup: function (itemAlign) {\n var orient = this._orient;\n var inverse = this.visualMapModel.get('inverse');\n return new graphic.Group(orient === 'horizontal' && !inverse ? {\n scale: itemAlign === 'bottom' ? [1, 1] : [-1, 1],\n rotation: Math.PI / 2\n } : orient === 'horizontal' && inverse ? {\n scale: itemAlign === 'bottom' ? [-1, 1] : [1, 1],\n rotation: -Math.PI / 2\n } : orient === 'vertical' && !inverse ? {\n scale: itemAlign === 'left' ? [1, -1] : [-1, -1]\n } : {\n scale: itemAlign === 'left' ? [1, 1] : [-1, 1]\n });\n },\n\n /**\n * @private\n */\n _updateHandle: function (handleEnds, visualInRange) {\n if (!this._useHandle) {\n return;\n }\n\n var shapes = this._shapes;\n var visualMapModel = this.visualMapModel;\n var handleThumbs = shapes.handleThumbs;\n var handleLabels = shapes.handleLabels;\n each([0, 1], function (handleIndex) {\n var handleThumb = handleThumbs[handleIndex];\n handleThumb.setStyle('fill', visualInRange.handlesColor[handleIndex]);\n handleThumb.position[1] = handleEnds[handleIndex]; // Update handle label position.\n\n var textPoint = graphic.applyTransform(shapes.handleLabelPoints[handleIndex], graphic.getTransform(handleThumb, this.group));\n handleLabels[handleIndex].setStyle({\n x: textPoint[0],\n y: textPoint[1],\n text: visualMapModel.formatValueText(this._dataInterval[handleIndex]),\n textVerticalAlign: 'middle',\n textAlign: this._applyTransform(this._orient === 'horizontal' ? handleIndex === 0 ? 'bottom' : 'top' : 'left', shapes.barGroup)\n });\n }, this);\n },\n\n /**\n * @private\n * @param {number} cursorValue\n * @param {number} textValue\n * @param {string} [rangeSymbol]\n * @param {number} [halfHoverLinkSize]\n */\n _showIndicator: function (cursorValue, textValue, rangeSymbol, halfHoverLinkSize) {\n var visualMapModel = this.visualMapModel;\n var dataExtent = visualMapModel.getExtent();\n var itemSize = visualMapModel.itemSize;\n var sizeExtent = [0, itemSize[1]];\n var pos = linearMap(cursorValue, dataExtent, sizeExtent, true);\n var shapes = this._shapes;\n var indicator = shapes.indicator;\n\n if (!indicator) {\n return;\n }\n\n indicator.position[1] = pos;\n indicator.attr('invisible', false);\n indicator.setShape('points', createIndicatorPoints(!!rangeSymbol, halfHoverLinkSize, pos, itemSize[1]));\n var opts = {\n convertOpacityToAlpha: true\n };\n var color = this.getControllerVisual(cursorValue, 'color', opts);\n indicator.setStyle('fill', color); // Update handle label position.\n\n var textPoint = graphic.applyTransform(shapes.indicatorLabelPoint, graphic.getTransform(indicator, this.group));\n var indicatorLabel = shapes.indicatorLabel;\n indicatorLabel.attr('invisible', false);\n\n var align = this._applyTransform('left', shapes.barGroup);\n\n var orient = this._orient;\n indicatorLabel.setStyle({\n text: (rangeSymbol ? rangeSymbol : '') + visualMapModel.formatValueText(textValue),\n textVerticalAlign: orient === 'horizontal' ? align : 'middle',\n textAlign: orient === 'horizontal' ? 'center' : align,\n x: textPoint[0],\n y: textPoint[1]\n });\n },\n\n /**\n * @private\n */\n _enableHoverLinkToSeries: function () {\n var self = this;\n\n this._shapes.barGroup.on('mousemove', function (e) {\n self._hovering = true;\n\n if (!self._dragging) {\n var itemSize = self.visualMapModel.itemSize;\n\n var pos = self._applyTransform([e.offsetX, e.offsetY], self._shapes.barGroup, true, true); // For hover link show when hover handle, which might be\n // below or upper than sizeExtent.\n\n\n pos[1] = mathMin(mathMax(0, pos[1]), itemSize[1]);\n\n self._doHoverLinkToSeries(pos[1], 0 <= pos[0] && pos[0] <= itemSize[0]);\n }\n }).on('mouseout', function () {\n // When mouse is out of handle, hoverLink still need\n // to be displayed when realtime is set as false.\n self._hovering = false;\n !self._dragging && self._clearHoverLinkToSeries();\n });\n },\n\n /**\n * @private\n */\n _enableHoverLinkFromSeries: function () {\n var zr = this.api.getZr();\n\n if (this.visualMapModel.option.hoverLink) {\n zr.on('mouseover', this._hoverLinkFromSeriesMouseOver, this);\n zr.on('mouseout', this._hideIndicator, this);\n } else {\n this._clearHoverLinkFromSeries();\n }\n },\n\n /**\n * @private\n */\n _doHoverLinkToSeries: function (cursorPos, hoverOnBar) {\n var visualMapModel = this.visualMapModel;\n var itemSize = visualMapModel.itemSize;\n\n if (!visualMapModel.option.hoverLink) {\n return;\n }\n\n var sizeExtent = [0, itemSize[1]];\n var dataExtent = visualMapModel.getExtent(); // For hover link show when hover handle, which might be below or upper than sizeExtent.\n\n cursorPos = mathMin(mathMax(sizeExtent[0], cursorPos), sizeExtent[1]);\n var halfHoverLinkSize = getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent);\n var hoverRange = [cursorPos - halfHoverLinkSize, cursorPos + halfHoverLinkSize];\n var cursorValue = linearMap(cursorPos, sizeExtent, dataExtent, true);\n var valueRange = [linearMap(hoverRange[0], sizeExtent, dataExtent, true), linearMap(hoverRange[1], sizeExtent, dataExtent, true)]; // Consider data range is out of visualMap range, see test/visualMap-continuous.html,\n // where china and india has very large population.\n\n hoverRange[0] < sizeExtent[0] && (valueRange[0] = -Infinity);\n hoverRange[1] > sizeExtent[1] && (valueRange[1] = Infinity); // Do not show indicator when mouse is over handle,\n // otherwise labels overlap, especially when dragging.\n\n if (hoverOnBar) {\n if (valueRange[0] === -Infinity) {\n this._showIndicator(cursorValue, valueRange[1], '< ', halfHoverLinkSize);\n } else if (valueRange[1] === Infinity) {\n this._showIndicator(cursorValue, valueRange[0], '> ', halfHoverLinkSize);\n } else {\n this._showIndicator(cursorValue, cursorValue, '≈ ', halfHoverLinkSize);\n }\n } // When realtime is set as false, handles, which are in barGroup,\n // also trigger hoverLink, which help user to realize where they\n // focus on when dragging. (see test/heatmap-large.html)\n // When realtime is set as true, highlight will not show when hover\n // handle, because the label on handle, which displays a exact value\n // but not range, might mislead users.\n\n\n var oldBatch = this._hoverLinkDataIndices;\n var newBatch = [];\n\n if (hoverOnBar || useHoverLinkOnHandle(visualMapModel)) {\n newBatch = this._hoverLinkDataIndices = visualMapModel.findTargetDataIndices(valueRange);\n }\n\n var resultBatches = modelUtil.compressBatches(oldBatch, newBatch);\n\n this._dispatchHighDown('downplay', helper.makeHighDownBatch(resultBatches[0], visualMapModel));\n\n this._dispatchHighDown('highlight', helper.makeHighDownBatch(resultBatches[1], visualMapModel));\n },\n\n /**\n * @private\n */\n _hoverLinkFromSeriesMouseOver: function (e) {\n var el = e.target;\n var visualMapModel = this.visualMapModel;\n\n if (!el || el.dataIndex == null) {\n return;\n }\n\n var dataModel = this.ecModel.getSeriesByIndex(el.seriesIndex);\n\n if (!visualMapModel.isTargetSeries(dataModel)) {\n return;\n }\n\n var data = dataModel.getData(el.dataType);\n var value = data.get(visualMapModel.getDataDimension(data), el.dataIndex, true);\n\n if (!isNaN(value)) {\n this._showIndicator(value, value);\n }\n },\n\n /**\n * @private\n */\n _hideIndicator: function () {\n var shapes = this._shapes;\n shapes.indicator && shapes.indicator.attr('invisible', true);\n shapes.indicatorLabel && shapes.indicatorLabel.attr('invisible', true);\n },\n\n /**\n * @private\n */\n _clearHoverLinkToSeries: function () {\n this._hideIndicator();\n\n var indices = this._hoverLinkDataIndices;\n\n this._dispatchHighDown('downplay', helper.makeHighDownBatch(indices, this.visualMapModel));\n\n indices.length = 0;\n },\n\n /**\n * @private\n */\n _clearHoverLinkFromSeries: function () {\n this._hideIndicator();\n\n var zr = this.api.getZr();\n zr.off('mouseover', this._hoverLinkFromSeriesMouseOver);\n zr.off('mouseout', this._hideIndicator);\n },\n\n /**\n * @private\n */\n _applyTransform: function (vertex, element, inverse, global) {\n var transform = graphic.getTransform(element, global ? null : this.group);\n return graphic[zrUtil.isArray(vertex) ? 'applyTransform' : 'transformDirection'](vertex, transform, inverse);\n },\n\n /**\n * @private\n */\n _dispatchHighDown: function (type, batch) {\n batch && batch.length && this.api.dispatchAction({\n type: type,\n batch: batch\n });\n },\n\n /**\n * @override\n */\n dispose: function () {\n this._clearHoverLinkFromSeries();\n\n this._clearHoverLinkToSeries();\n },\n\n /**\n * @override\n */\n remove: function () {\n this._clearHoverLinkFromSeries();\n\n this._clearHoverLinkToSeries();\n }\n});\n\nfunction createPolygon(points, cursor, onDrift, onDragEnd) {\n return new graphic.Polygon({\n shape: {\n points: points\n },\n draggable: !!onDrift,\n cursor: cursor,\n drift: onDrift,\n onmousemove: function (e) {\n // Fot mobile devicem, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n ondragend: onDragEnd\n });\n}\n\nfunction createHandlePoints(handleIndex, textSize) {\n return handleIndex === 0 ? [[0, 0], [textSize, 0], [textSize, -textSize]] : [[0, 0], [textSize, 0], [textSize, textSize]];\n}\n\nfunction createIndicatorPoints(isRange, halfHoverLinkSize, pos, extentMax) {\n return isRange ? [// indicate range\n [0, -mathMin(halfHoverLinkSize, mathMax(pos, 0))], [HOVER_LINK_OUT, 0], [0, mathMin(halfHoverLinkSize, mathMax(extentMax - pos, 0))]] : [// indicate single value\n [0, 0], [5, -5], [5, 5]];\n}\n\nfunction getHalfHoverLinkSize(visualMapModel, dataExtent, sizeExtent) {\n var halfHoverLinkSize = HOVER_LINK_SIZE / 2;\n var hoverLinkDataSize = visualMapModel.get('hoverLinkDataSize');\n\n if (hoverLinkDataSize) {\n halfHoverLinkSize = linearMap(hoverLinkDataSize, dataExtent, sizeExtent, true) / 2;\n }\n\n return halfHoverLinkSize;\n}\n\nfunction useHoverLinkOnHandle(visualMapModel) {\n var hoverLinkOnHandle = visualMapModel.get('hoverLinkOnHandle');\n return !!(hoverLinkOnHandle == null ? visualMapModel.get('realtime') : hoverLinkOnHandle);\n}\n\nfunction getCursor(orient) {\n return orient === 'vertical' ? 'ns-resize' : 'ew-resize';\n}\n\nvar _default = ContinuousView;\nmodule.exports = _default;","var _core = require(\"./core\");\n\nvar createElement = _core.createElement;\n\nvar PathProxy = require(\"../core/PathProxy\");\n\nvar BoundingRect = require(\"../core/BoundingRect\");\n\nvar matrix = require(\"../core/matrix\");\n\nvar textContain = require(\"../contain/text\");\n\nvar textHelper = require(\"../graphic/helper/text\");\n\nvar Text = require(\"../graphic/Text\");\n\n// TODO\n// 1. shadow\n// 2. Image: sx, sy, sw, sh\nvar CMD = PathProxy.CMD;\nvar arrayJoin = Array.prototype.join;\nvar NONE = 'none';\nvar mathRound = Math.round;\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar PI = Math.PI;\nvar PI2 = Math.PI * 2;\nvar degree = 180 / PI;\nvar EPSILON = 1e-4;\n\nfunction round4(val) {\n return mathRound(val * 1e4) / 1e4;\n}\n\nfunction isAroundZero(val) {\n return val < EPSILON && val > -EPSILON;\n}\n\nfunction pathHasFill(style, isText) {\n var fill = isText ? style.textFill : style.fill;\n return fill != null && fill !== NONE;\n}\n\nfunction pathHasStroke(style, isText) {\n var stroke = isText ? style.textStroke : style.stroke;\n return stroke != null && stroke !== NONE;\n}\n\nfunction setTransform(svgEl, m) {\n if (m) {\n attr(svgEl, 'transform', 'matrix(' + arrayJoin.call(m, ',') + ')');\n }\n}\n\nfunction attr(el, key, val) {\n if (!val || val.type !== 'linear' && val.type !== 'radial') {\n // Don't set attribute for gradient, since it need new dom nodes\n el.setAttribute(key, val);\n }\n}\n\nfunction attrXLink(el, key, val) {\n el.setAttributeNS('http://www.w3.org/1999/xlink', key, val);\n}\n\nfunction bindStyle(svgEl, style, isText, el) {\n if (pathHasFill(style, isText)) {\n var fill = isText ? style.textFill : style.fill;\n fill = fill === 'transparent' ? NONE : fill;\n attr(svgEl, 'fill', fill);\n attr(svgEl, 'fill-opacity', style.fillOpacity != null ? style.fillOpacity * style.opacity : style.opacity);\n } else {\n attr(svgEl, 'fill', NONE);\n }\n\n if (pathHasStroke(style, isText)) {\n var stroke = isText ? style.textStroke : style.stroke;\n stroke = stroke === 'transparent' ? NONE : stroke;\n attr(svgEl, 'stroke', stroke);\n var strokeWidth = isText ? style.textStrokeWidth : style.lineWidth;\n var strokeScale = !isText && style.strokeNoScale ? el.getLineScale() : 1;\n attr(svgEl, 'stroke-width', strokeWidth / strokeScale); // stroke then fill for text; fill then stroke for others\n\n attr(svgEl, 'paint-order', isText ? 'stroke' : 'fill');\n attr(svgEl, 'stroke-opacity', style.strokeOpacity != null ? style.strokeOpacity : style.opacity);\n var lineDash = style.lineDash;\n\n if (lineDash) {\n attr(svgEl, 'stroke-dasharray', style.lineDash.join(','));\n attr(svgEl, 'stroke-dashoffset', mathRound(style.lineDashOffset || 0));\n } else {\n attr(svgEl, 'stroke-dasharray', '');\n } // PENDING\n\n\n style.lineCap && attr(svgEl, 'stroke-linecap', style.lineCap);\n style.lineJoin && attr(svgEl, 'stroke-linejoin', style.lineJoin);\n style.miterLimit && attr(svgEl, 'stroke-miterlimit', style.miterLimit);\n } else {\n attr(svgEl, 'stroke', NONE);\n }\n}\n/***************************************************\n * PATH\n **************************************************/\n\n\nfunction pathDataToString(path) {\n var str = [];\n var data = path.data;\n var dataLength = path.len();\n\n for (var i = 0; i < dataLength;) {\n var cmd = data[i++];\n var cmdStr = '';\n var nData = 0;\n\n switch (cmd) {\n case CMD.M:\n cmdStr = 'M';\n nData = 2;\n break;\n\n case CMD.L:\n cmdStr = 'L';\n nData = 2;\n break;\n\n case CMD.Q:\n cmdStr = 'Q';\n nData = 4;\n break;\n\n case CMD.C:\n cmdStr = 'C';\n nData = 6;\n break;\n\n case CMD.A:\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var theta = data[i++];\n var dTheta = data[i++];\n var psi = data[i++];\n var clockwise = data[i++];\n var dThetaPositive = Math.abs(dTheta);\n var isCircle = isAroundZero(dThetaPositive - PI2) || (clockwise ? dTheta >= PI2 : -dTheta >= PI2); // Mapping to 0~2PI\n\n var unifiedTheta = dTheta > 0 ? dTheta % PI2 : dTheta % PI2 + PI2;\n var large = false;\n\n if (isCircle) {\n large = true;\n } else if (isAroundZero(dThetaPositive)) {\n large = false;\n } else {\n large = unifiedTheta >= PI === !!clockwise;\n }\n\n var x0 = round4(cx + rx * mathCos(theta));\n var y0 = round4(cy + ry * mathSin(theta)); // It will not draw if start point and end point are exactly the same\n // We need to shift the end point with a small value\n // FIXME A better way to draw circle ?\n\n if (isCircle) {\n if (clockwise) {\n dTheta = PI2 - 1e-4;\n } else {\n dTheta = -PI2 + 1e-4;\n }\n\n large = true;\n\n if (i === 9) {\n // Move to (x0, y0) only when CMD.A comes at the\n // first position of a shape.\n // For instance, when drawing a ring, CMD.A comes\n // after CMD.M, so it's unnecessary to move to\n // (x0, y0).\n str.push('M', x0, y0);\n }\n }\n\n var x = round4(cx + rx * mathCos(theta + dTheta));\n var y = round4(cy + ry * mathSin(theta + dTheta)); // FIXME Ellipse\n\n str.push('A', round4(rx), round4(ry), mathRound(psi * degree), +large, +clockwise, x, y);\n break;\n\n case CMD.Z:\n cmdStr = 'Z';\n break;\n\n case CMD.R:\n var x = round4(data[i++]);\n var y = round4(data[i++]);\n var w = round4(data[i++]);\n var h = round4(data[i++]);\n str.push('M', x, y, 'L', x + w, y, 'L', x + w, y + h, 'L', x, y + h, 'L', x, y);\n break;\n }\n\n cmdStr && str.push(cmdStr);\n\n for (var j = 0; j < nData; j++) {\n // PENDING With scale\n str.push(round4(data[i++]));\n }\n }\n\n return str.join(' ');\n}\n\nvar svgPath = {};\n\nsvgPath.brush = function (el) {\n var style = el.style;\n var svgEl = el.__svgEl;\n\n if (!svgEl) {\n svgEl = createElement('path');\n el.__svgEl = svgEl;\n }\n\n if (!el.path) {\n el.createPathProxy();\n }\n\n var path = el.path;\n\n if (el.__dirtyPath) {\n path.beginPath();\n path.subPixelOptimize = false;\n el.buildPath(path, el.shape);\n el.__dirtyPath = false;\n var pathStr = pathDataToString(path);\n\n if (pathStr.indexOf('NaN') < 0) {\n // Ignore illegal path, which may happen such in out-of-range\n // data in Calendar series.\n attr(svgEl, 'd', pathStr);\n }\n }\n\n bindStyle(svgEl, style, false, el);\n setTransform(svgEl, el.transform);\n\n if (style.text != null) {\n svgTextDrawRectText(el, el.getBoundingRect());\n } else {\n removeOldTextNode(el);\n }\n};\n/***************************************************\n * IMAGE\n **************************************************/\n\n\nvar svgImage = {};\n\nsvgImage.brush = function (el) {\n var style = el.style;\n var image = style.image;\n\n if (image instanceof HTMLImageElement) {\n var src = image.src;\n image = src;\n }\n\n if (!image) {\n return;\n }\n\n var x = style.x || 0;\n var y = style.y || 0;\n var dw = style.width;\n var dh = style.height;\n var svgEl = el.__svgEl;\n\n if (!svgEl) {\n svgEl = createElement('image');\n el.__svgEl = svgEl;\n }\n\n if (image !== el.__imageSrc) {\n attrXLink(svgEl, 'href', image); // Caching image src\n\n el.__imageSrc = image;\n }\n\n attr(svgEl, 'width', dw);\n attr(svgEl, 'height', dh);\n attr(svgEl, 'x', x);\n attr(svgEl, 'y', y);\n setTransform(svgEl, el.transform);\n\n if (style.text != null) {\n svgTextDrawRectText(el, el.getBoundingRect());\n } else {\n removeOldTextNode(el);\n }\n};\n/***************************************************\n * TEXT\n **************************************************/\n\n\nvar svgText = {};\n\nvar _tmpTextHostRect = new BoundingRect();\n\nvar _tmpTextBoxPos = {};\nvar _tmpTextTransform = [];\nvar TEXT_ALIGN_TO_ANCHRO = {\n left: 'start',\n right: 'end',\n center: 'middle',\n middle: 'middle'\n};\n/**\n * @param {module:zrender/Element} el\n * @param {Object|boolean} [hostRect] {x, y, width, height}\n * If set false, rect text is not used.\n */\n\nvar svgTextDrawRectText = function (el, hostRect) {\n var style = el.style;\n var elTransform = el.transform;\n var needTransformTextByHostEl = el instanceof Text || style.transformText;\n el.__dirty && textHelper.normalizeTextStyle(style, true);\n var text = style.text; // Convert to string\n\n text != null && (text += '');\n\n if (!textHelper.needDrawText(text, style)) {\n return;\n } // render empty text for svg if no text but need draw text.\n\n\n text == null && (text = ''); // Follow the setting in the canvas renderer, if not transform the\n // text, transform the hostRect, by which the text is located.\n\n if (!needTransformTextByHostEl && elTransform) {\n _tmpTextHostRect.copy(hostRect);\n\n _tmpTextHostRect.applyTransform(elTransform);\n\n hostRect = _tmpTextHostRect;\n }\n\n var textSvgEl = el.__textSvgEl;\n\n if (!textSvgEl) {\n textSvgEl = createElement('text');\n el.__textSvgEl = textSvgEl;\n } // style.font has been normalized by `normalizeTextStyle`.\n\n\n var textSvgElStyle = textSvgEl.style;\n var font = style.font || textContain.DEFAULT_FONT;\n var computedFont = textSvgEl.__computedFont;\n\n if (font !== textSvgEl.__styleFont) {\n textSvgElStyle.font = textSvgEl.__styleFont = font; // The computedFont might not be the orginal font if it is illegal font.\n\n computedFont = textSvgEl.__computedFont = textSvgElStyle.font;\n }\n\n var textPadding = style.textPadding;\n var textLineHeight = style.textLineHeight;\n var contentBlock = el.__textCotentBlock;\n\n if (!contentBlock || el.__dirtyText) {\n contentBlock = el.__textCotentBlock = textContain.parsePlainText(text, computedFont, textPadding, textLineHeight, style.truncate);\n }\n\n var outerHeight = contentBlock.outerHeight;\n var lineHeight = contentBlock.lineHeight;\n textHelper.getBoxPosition(_tmpTextBoxPos, el, style, hostRect);\n var baseX = _tmpTextBoxPos.baseX;\n var baseY = _tmpTextBoxPos.baseY;\n var textAlign = _tmpTextBoxPos.textAlign || 'left';\n var textVerticalAlign = _tmpTextBoxPos.textVerticalAlign;\n setTextTransform(textSvgEl, needTransformTextByHostEl, elTransform, style, hostRect, baseX, baseY);\n var boxY = textContain.adjustTextY(baseY, outerHeight, textVerticalAlign);\n var textX = baseX;\n var textY = boxY; // TODO needDrawBg\n\n if (textPadding) {\n textX = getTextXForPadding(baseX, textAlign, textPadding);\n textY += textPadding[0];\n } // `textBaseline` is set as 'middle'.\n\n\n textY += lineHeight / 2;\n bindStyle(textSvgEl, style, true, el); // FIXME\n // Add a ","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./chart.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./chart.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./chart.vue?vue&type=template&id=15bc620c&\"\nimport script from \"./chart.vue?vue&type=script&lang=js&\"\nexport * from \"./chart.vue?vue&type=script&lang=js&\"\nimport style0 from \"./chart.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar DataZoomView = require(\"./DataZoomView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = DataZoomView.extend({\n type: 'dataZoom.select'\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar SingleAxis = require(\"./SingleAxis\");\n\nvar axisHelper = require(\"../axisHelper\");\n\nvar _layout = require(\"../../util/layout\");\n\nvar getLayoutRect = _layout.getLayoutRect;\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar each = _util.each;\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 * Single coordinates system.\n */\n\n/**\n * Create a single coordinates system.\n *\n * @param {module:echarts/coord/single/AxisModel} axisModel\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n */\nfunction Single(axisModel, ecModel, api) {\n /**\n * @type {string}\n * @readOnly\n */\n this.dimension = 'single';\n /**\n * Add it just for draw tooltip.\n *\n * @type {Array.}\n * @readOnly\n */\n\n this.dimensions = ['single'];\n /**\n * @private\n * @type {module:echarts/coord/single/SingleAxis}.\n */\n\n this._axis = null;\n /**\n * @private\n * @type {module:zrender/core/BoundingRect}\n */\n\n this._rect;\n\n this._init(axisModel, ecModel, api);\n /**\n * @type {module:echarts/coord/single/AxisModel}\n */\n\n\n this.model = axisModel;\n}\n\nSingle.prototype = {\n type: 'singleAxis',\n axisPointerEnabled: true,\n constructor: Single,\n\n /**\n * Initialize single coordinate system.\n *\n * @param {module:echarts/coord/single/AxisModel} axisModel\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n * @private\n */\n _init: function (axisModel, ecModel, api) {\n var dim = this.dimension;\n var axis = new SingleAxis(dim, axisHelper.createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisModel.get('position'));\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse');\n axis.orient = axisModel.get('orient');\n axisModel.axis = axis;\n axis.model = axisModel;\n axis.coordinateSystem = this;\n this._axis = axis;\n },\n\n /**\n * Update axis scale after data processed\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n */\n update: function (ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === this) {\n var data = seriesModel.getData();\n each(data.mapDimension(this.dimension, true), function (dim) {\n this._axis.scale.unionExtentFromData(data, dim);\n }, this);\n axisHelper.niceScaleExtent(this._axis.scale, this._axis.model);\n }\n }, this);\n },\n\n /**\n * Resize the single coordinate system.\n *\n * @param {module:echarts/coord/single/AxisModel} axisModel\n * @param {module:echarts/ExtensionAPI} api\n */\n resize: function (axisModel, api) {\n this._rect = getLayoutRect({\n left: axisModel.get('left'),\n top: axisModel.get('top'),\n right: axisModel.get('right'),\n bottom: axisModel.get('bottom'),\n width: axisModel.get('width'),\n height: axisModel.get('height')\n }, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n\n this._adjustAxis();\n },\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n getRect: function () {\n return this._rect;\n },\n\n /**\n * @private\n */\n _adjustAxis: function () {\n var rect = this._rect;\n var axis = this._axis;\n var isHorizontal = axis.isHorizontal();\n var extent = isHorizontal ? [0, rect.width] : [0, rect.height];\n var idx = axis.reverse ? 1 : 0;\n axis.setExtent(extent[idx], extent[1 - idx]);\n\n this._updateAxisTransform(axis, isHorizontal ? rect.x : rect.y);\n },\n\n /**\n * @param {module:echarts/coord/single/SingleAxis} axis\n * @param {number} coordBase\n */\n _updateAxisTransform: function (axis, coordBase) {\n var axisExtent = axis.getExtent();\n var extentSum = axisExtent[0] + axisExtent[1];\n var isHorizontal = axis.isHorizontal();\n axis.toGlobalCoord = isHorizontal ? function (coord) {\n return coord + coordBase;\n } : function (coord) {\n return extentSum - coord + coordBase;\n };\n axis.toLocalCoord = isHorizontal ? function (coord) {\n return coord - coordBase;\n } : function (coord) {\n return extentSum - coord + coordBase;\n };\n },\n\n /**\n * Get axis.\n *\n * @return {module:echarts/coord/single/SingleAxis}\n */\n getAxis: function () {\n return this._axis;\n },\n\n /**\n * Get axis, add it just for draw tooltip.\n *\n * @return {[type]} [description]\n */\n getBaseAxis: function () {\n return this._axis;\n },\n\n /**\n * @return {Array.}\n */\n getAxes: function () {\n return [this._axis];\n },\n\n /**\n * @return {Object} {baseAxes: [], otherAxes: []}\n */\n getTooltipAxes: function () {\n return {\n baseAxes: [this.getAxis()]\n };\n },\n\n /**\n * If contain point.\n *\n * @param {Array.} point\n * @return {boolean}\n */\n containPoint: function (point) {\n var rect = this.getRect();\n var axis = this.getAxis();\n var orient = axis.orient;\n\n if (orient === 'horizontal') {\n return axis.contain(axis.toLocalCoord(point[0])) && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n } else {\n return axis.contain(axis.toLocalCoord(point[1])) && point[0] >= rect.y && point[0] <= rect.y + rect.height;\n }\n },\n\n /**\n * @param {Array.} point\n * @return {Array.}\n */\n pointToData: function (point) {\n var axis = this.getAxis();\n return [axis.coordToData(axis.toLocalCoord(point[axis.orient === 'horizontal' ? 0 : 1]))];\n },\n\n /**\n * Convert the series data to concrete point.\n *\n * @param {number|Array.} val\n * @return {Array.}\n */\n dataToPoint: function (val) {\n var axis = this.getAxis();\n var rect = this.getRect();\n var pt = [];\n var idx = axis.orient === 'horizontal' ? 0 : 1;\n\n if (val instanceof Array) {\n val = val[0];\n }\n\n pt[idx] = axis.toGlobalCoord(axis.dataToCoord(+val));\n pt[1 - idx] = idx === 0 ? rect.y + rect.height / 2 : rect.x + rect.width / 2;\n return pt;\n }\n};\nvar _default = Single;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar each = _util.each;\n\nvar parseGeoJson = require(\"./parseGeoJson\");\n\nvar _model = require(\"../../util/model\");\n\nvar makeInner = _model.makeInner;\n\nvar fixNanhai = require(\"./fix/nanhai\");\n\nvar fixTextCoord = require(\"./fix/textCoord\");\n\nvar fixGeoCoord = require(\"./fix/geoCoord\");\n\nvar fixDiaoyuIsland = require(\"./fix/diaoyuIsland\");\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// Built-in GEO fixer.\nvar inner = makeInner();\nvar _default = {\n /**\n * @param {string} mapName\n * @param {Object} mapRecord {specialAreas, geoJSON}\n * @param {string} nameProperty\n * @return {Object} {regions, boundingRect}\n */\n load: function (mapName, mapRecord, nameProperty) {\n var parsed = inner(mapRecord).parsed;\n\n if (parsed) {\n return parsed;\n }\n\n var specialAreas = mapRecord.specialAreas || {};\n var geoJSON = mapRecord.geoJSON;\n var regions; // https://jsperf.com/try-catch-performance-overhead\n\n try {\n regions = geoJSON ? parseGeoJson(geoJSON, nameProperty) : [];\n } catch (e) {\n throw new Error('Invalid geoJson format\\n' + e.message);\n }\n\n fixNanhai(mapName, regions);\n each(regions, function (region) {\n var regionName = region.name;\n fixTextCoord(mapName, region);\n fixGeoCoord(mapName, region);\n fixDiaoyuIsland(mapName, region); // Some area like Alaska in USA map needs to be tansformed\n // to look better\n\n var specialArea = specialAreas[regionName];\n\n if (specialArea) {\n region.transformTo(specialArea.left, specialArea.top, specialArea.width, specialArea.height);\n }\n });\n return inner(mapRecord).parsed = {\n regions: regions,\n boundingRect: getBoundingRect(regions)\n };\n }\n};\n\nfunction getBoundingRect(regions) {\n var rect;\n\n for (var i = 0; i < regions.length; i++) {\n var regionRect = regions[i].getBoundingRect();\n rect = rect || regionRect.clone();\n rect.union(regionRect);\n }\n\n return rect;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar createRenderPlanner = require(\"../helper/createRenderPlanner\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar positiveBorderColorQuery = ['itemStyle', 'borderColor'];\nvar negativeBorderColorQuery = ['itemStyle', 'borderColor0'];\nvar positiveColorQuery = ['itemStyle', 'color'];\nvar negativeColorQuery = ['itemStyle', 'color0'];\nvar _default = {\n seriesType: 'candlestick',\n plan: createRenderPlanner(),\n // For legend.\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n data.setVisual({\n legendSymbol: 'roundRect',\n colorP: getColor(1, seriesModel),\n colorN: getColor(-1, seriesModel),\n borderColorP: getBorderColor(1, seriesModel),\n borderColorN: getBorderColor(-1, seriesModel)\n }); // Only visible series has each data be visual encoded\n\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n\n var isLargeRender = seriesModel.pipelineContext.large;\n return !isLargeRender && {\n progress: progress\n };\n\n function progress(params, data) {\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var itemModel = data.getItemModel(dataIndex);\n var sign = data.getItemLayout(dataIndex).sign;\n data.setItemVisual(dataIndex, {\n color: getColor(sign, itemModel),\n borderColor: getBorderColor(sign, itemModel)\n });\n }\n }\n\n function getColor(sign, model) {\n return model.get(sign > 0 ? positiveColorQuery : negativeColorQuery);\n }\n\n function getBorderColor(sign, model) {\n return model.get(sign > 0 ? positiveBorderColorQuery : negativeBorderColorQuery);\n }\n }\n};\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar ChartView = require(\"../../view/Chart\");\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 * Piece of pie including Sector, Label, LabelLine\n * @constructor\n * @extends {module:zrender/graphic/Group}\n */\nfunction FunnelPiece(data, idx) {\n graphic.Group.call(this);\n var polygon = new graphic.Polygon();\n var labelLine = new graphic.Polyline();\n var text = new graphic.Text();\n this.add(polygon);\n this.add(labelLine);\n this.add(text);\n\n this.highDownOnUpdate = function (fromState, toState) {\n if (toState === 'emphasis') {\n labelLine.ignore = labelLine.hoverIgnore;\n text.ignore = text.hoverIgnore;\n } else {\n labelLine.ignore = labelLine.normalIgnore;\n text.ignore = text.normalIgnore;\n }\n };\n\n this.updateData(data, idx, true);\n}\n\nvar funnelPieceProto = FunnelPiece.prototype;\nvar opacityAccessPath = ['itemStyle', 'opacity'];\n\nfunnelPieceProto.updateData = function (data, idx, firstCreate) {\n var polygon = this.childAt(0);\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var layout = data.getItemLayout(idx);\n var opacity = data.getItemModel(idx).get(opacityAccessPath);\n opacity = opacity == null ? 1 : opacity; // Reset style\n\n polygon.useStyle({});\n\n if (firstCreate) {\n polygon.setShape({\n points: layout.points\n });\n polygon.setStyle({\n opacity: 0\n });\n graphic.initProps(polygon, {\n style: {\n opacity: opacity\n }\n }, seriesModel, idx);\n } else {\n graphic.updateProps(polygon, {\n style: {\n opacity: opacity\n },\n shape: {\n points: layout.points\n }\n }, seriesModel, idx);\n } // Update common style\n\n\n var itemStyleModel = itemModel.getModel('itemStyle');\n var visualColor = data.getItemVisual(idx, 'color');\n polygon.setStyle(zrUtil.defaults({\n lineJoin: 'round',\n fill: visualColor\n }, itemStyleModel.getItemStyle(['opacity'])));\n polygon.hoverStyle = itemStyleModel.getModel('emphasis').getItemStyle();\n\n this._updateLabel(data, idx);\n\n graphic.setHoverStyle(this);\n};\n\nfunnelPieceProto._updateLabel = function (data, idx) {\n var labelLine = this.childAt(1);\n var labelText = this.childAt(2);\n var seriesModel = data.hostModel;\n var itemModel = data.getItemModel(idx);\n var layout = data.getItemLayout(idx);\n var labelLayout = layout.label;\n var visualColor = data.getItemVisual(idx, 'color');\n graphic.updateProps(labelLine, {\n shape: {\n points: labelLayout.linePoints || labelLayout.linePoints\n }\n }, seriesModel, idx);\n graphic.updateProps(labelText, {\n style: {\n x: labelLayout.x,\n y: labelLayout.y\n }\n }, seriesModel, idx);\n labelText.attr({\n rotation: labelLayout.rotation,\n origin: [labelLayout.x, labelLayout.y],\n z2: 10\n });\n var labelModel = itemModel.getModel('label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n var labelLineModel = itemModel.getModel('labelLine');\n var labelLineHoverModel = itemModel.getModel('emphasis.labelLine');\n var visualColor = data.getItemVisual(idx, 'color');\n graphic.setLabelStyle(labelText.style, labelText.hoverStyle = {}, labelModel, labelHoverModel, {\n labelFetcher: data.hostModel,\n labelDataIndex: idx,\n defaultText: data.getName(idx),\n autoColor: visualColor,\n useInsideStyle: !!labelLayout.inside\n }, {\n textAlign: labelLayout.textAlign,\n textVerticalAlign: labelLayout.verticalAlign\n });\n labelText.ignore = labelText.normalIgnore = !labelModel.get('show');\n labelText.hoverIgnore = !labelHoverModel.get('show');\n labelLine.ignore = labelLine.normalIgnore = !labelLineModel.get('show');\n labelLine.hoverIgnore = !labelLineHoverModel.get('show'); // Default use item visual color\n\n labelLine.setStyle({\n stroke: visualColor\n });\n labelLine.setStyle(labelLineModel.getModel('lineStyle').getLineStyle());\n labelLine.hoverStyle = labelLineHoverModel.getModel('lineStyle').getLineStyle();\n};\n\nzrUtil.inherits(FunnelPiece, graphic.Group);\nvar FunnelView = ChartView.extend({\n type: 'funnel',\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n data.diff(oldData).add(function (idx) {\n var funnelPiece = new FunnelPiece(data, idx);\n data.setItemGraphicEl(idx, funnelPiece);\n group.add(funnelPiece);\n }).update(function (newIdx, oldIdx) {\n var piePiece = oldData.getItemGraphicEl(oldIdx);\n piePiece.updateData(data, newIdx);\n group.add(piePiece);\n data.setItemGraphicEl(newIdx, piePiece);\n }).remove(function (idx) {\n var piePiece = oldData.getItemGraphicEl(idx);\n group.remove(piePiece);\n }).execute();\n this._data = data;\n },\n remove: function () {\n this.group.removeAll();\n this._data = null;\n },\n dispose: function () {}\n});\nvar _default = FunnelView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar createListSimply = require(\"../helper/createListSimply\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar GaugeSeries = SeriesModel.extend({\n type: 'series.gauge',\n getInitialData: function (option, ecModel) {\n return createListSimply(this, ['value']);\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n // 默认全局居中\n center: ['50%', '50%'],\n legendHoverLink: true,\n radius: '75%',\n startAngle: 225,\n endAngle: -45,\n clockwise: true,\n // 最小值\n min: 0,\n // 最大值\n max: 100,\n // 分割段数,默认为10\n splitNumber: 10,\n // 坐标轴线\n axisLine: {\n // 默认显示,属性show控制显示与否\n show: true,\n lineStyle: {\n // 属性lineStyle控制线条样式\n color: [[0.2, '#91c7ae'], [0.8, '#63869e'], [1, '#c23531']],\n width: 30\n }\n },\n // 分隔线\n splitLine: {\n // 默认显示,属性show控制显示与否\n show: true,\n // 属性length控制线长\n length: 30,\n // 属性lineStyle(详见lineStyle)控制线条样式\n lineStyle: {\n color: '#eee',\n width: 2,\n type: 'solid'\n }\n },\n // 坐标轴小标记\n axisTick: {\n // 属性show控制显示与否,默认不显示\n show: true,\n // 每份split细分多少段\n splitNumber: 5,\n // 属性length控制线长\n length: 8,\n // 属性lineStyle控制线条样式\n lineStyle: {\n color: '#eee',\n width: 1,\n type: 'solid'\n }\n },\n axisLabel: {\n show: true,\n distance: 5,\n // formatter: null,\n color: 'auto'\n },\n pointer: {\n show: true,\n length: '80%',\n width: 8\n },\n itemStyle: {\n color: 'auto'\n },\n title: {\n show: true,\n // x, y,单位px\n offsetCenter: [0, '-40%'],\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#333',\n fontSize: 15\n },\n detail: {\n show: true,\n backgroundColor: 'rgba(0,0,0,0)',\n borderWidth: 0,\n borderColor: '#ccc',\n width: 100,\n height: null,\n // self-adaption\n padding: [5, 10],\n // x, y,单位px\n offsetCenter: [0, '40%'],\n // formatter: null,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: 'auto',\n fontSize: 30\n }\n }\n});\nvar _default = GaugeSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar createListSimply = require(\"../helper/createListSimply\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\nvar addCommas = _format.addCommas;\n\nvar dataSelectableMixin = require(\"../../component/helper/selectableMixin\");\n\nvar _dataProvider = require(\"../../data/helper/dataProvider\");\n\nvar retrieveRawAttr = _dataProvider.retrieveRawAttr;\n\nvar geoSourceManager = require(\"../../coord/geo/geoSourceManager\");\n\nvar _sourceHelper = require(\"../../data/helper/sourceHelper\");\n\nvar makeSeriesEncodeForNameBased = _sourceHelper.makeSeriesEncodeForNameBased;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar MapSeries = SeriesModel.extend({\n type: 'series.map',\n dependencies: ['geo'],\n layoutMode: 'box',\n\n /**\n * Only first map series of same mapType will drawMap\n * @type {boolean}\n */\n needsDrawMap: false,\n\n /**\n * Group of all map series with same mapType\n * @type {boolean}\n */\n seriesGroup: [],\n getInitialData: function (option) {\n var data = createListSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n var valueDim = data.mapDimension('value');\n var dataNameMap = zrUtil.createHashMap();\n var selectTargetList = [];\n var toAppendNames = [];\n\n for (var i = 0, len = data.count(); i < len; i++) {\n var name = data.getName(i);\n dataNameMap.set(name, true);\n selectTargetList.push({\n name: name,\n value: data.get(valueDim, i),\n selected: retrieveRawAttr(data, i, 'selected')\n });\n }\n\n var geoSource = geoSourceManager.load(this.getMapType(), this.option.nameMap, this.option.nameProperty);\n zrUtil.each(geoSource.regions, function (region) {\n var name = region.name;\n\n if (!dataNameMap.get(name)) {\n selectTargetList.push({\n name: name\n });\n toAppendNames.push(name);\n }\n });\n this.updateSelectedMap(selectTargetList); // Complete data with missing regions. The consequent processes (like visual\n // map and render) can not be performed without a \"full data\". For example,\n // find `dataIndex` by name.\n\n data.appendValues([], toAppendNames);\n return data;\n },\n\n /**\n * If no host geo model, return null, which means using a\n * inner exclusive geo model.\n */\n getHostGeoModel: function () {\n var geoIndex = this.option.geoIndex;\n return geoIndex != null ? this.dependentModels.geo[geoIndex] : null;\n },\n getMapType: function () {\n return (this.getHostGeoModel() || this).option.map;\n },\n // _fillOption: function (option, mapName) {\n // Shallow clone\n // option = zrUtil.extend({}, option);\n // option.data = geoCreator.getFilledRegions(option.data, mapName, option.nameMap);\n // return option;\n // },\n getRawValue: function (dataIndex) {\n // Use value stored in data instead because it is calculated from multiple series\n // FIXME Provide all value of multiple series ?\n var data = this.getData();\n return data.get(data.mapDimension('value'), dataIndex);\n },\n\n /**\n * Get model of region\n * @param {string} name\n * @return {module:echarts/model/Model}\n */\n getRegionModel: function (regionName) {\n var data = this.getData();\n return data.getItemModel(data.indexOfName(regionName));\n },\n\n /**\n * Map tooltip formatter\n *\n * @param {number} dataIndex\n */\n formatTooltip: function (dataIndex, multipleSeries, dataType, renderMode) {\n // FIXME orignalData and data is a bit confusing\n var data = this.getData();\n var formattedValue = addCommas(this.getRawValue(dataIndex));\n var name = data.getName(dataIndex);\n var seriesGroup = this.seriesGroup;\n var seriesNames = [];\n\n for (var i = 0; i < seriesGroup.length; i++) {\n var otherIndex = seriesGroup[i].originalData.indexOfName(name);\n var valueDim = data.mapDimension('value');\n\n if (!isNaN(seriesGroup[i].originalData.get(valueDim, otherIndex))) {\n seriesNames.push(encodeHTML(seriesGroup[i].name));\n }\n }\n\n var newLine = renderMode === 'html' ? '
' : '\\n';\n return seriesNames.join(', ') + newLine + encodeHTML(name + ' : ' + formattedValue);\n },\n\n /**\n * @implement\n */\n getTooltipPosition: function (dataIndex) {\n if (dataIndex != null) {\n var name = this.getData().getName(dataIndex);\n var geo = this.coordinateSystem;\n var region = geo.getRegion(name);\n return region && geo.dataToPoint(region.center);\n }\n },\n setZoom: function (zoom) {\n this.option.zoom = zoom;\n },\n setCenter: function (center) {\n this.option.center = center;\n },\n defaultOption: {\n // 一级层叠\n zlevel: 0,\n // 二级层叠\n z: 2,\n coordinateSystem: 'geo',\n // map should be explicitly specified since ec3.\n map: '',\n // If `geoIndex` is not specified, a exclusive geo will be\n // created. Otherwise use the specified geo component, and\n // `map` and `mapType` are ignored.\n // geoIndex: 0,\n // 'center' | 'left' | 'right' | 'x%' | {number}\n left: 'center',\n // 'center' | 'top' | 'bottom' | 'x%' | {number}\n top: 'center',\n // right\n // bottom\n // width:\n // height\n // Aspect is width / height. Inited to be geoJson bbox aspect\n // This parameter is used for scale this aspect\n aspectScale: 0.75,\n ///// Layout with center and size\n // If you wan't to put map in a fixed size box with right aspect ratio\n // This two properties may more conveninet\n // layoutCenter: [50%, 50%]\n // layoutSize: 100\n // 数值合并方式,默认加和,可选为:\n // 'sum' | 'average' | 'max' | 'min'\n // mapValueCalculation: 'sum',\n // 地图数值计算结果小数精度\n // mapValuePrecision: 0,\n // 显示图例颜色标识(系列标识的小圆点),图例开启时有效\n showLegendSymbol: true,\n // 选择模式,默认关闭,可选single,multiple\n // selectedMode: false,\n dataRangeHoverLink: true,\n // 是否开启缩放及漫游模式\n // roam: false,\n // Define left-top, right-bottom coords to control view\n // For example, [ [180, 90], [-180, -90] ],\n // higher priority than center and zoom\n boundingCoords: null,\n // Default on center of map\n center: null,\n zoom: 1,\n scaleLimit: null,\n label: {\n show: false,\n color: '#000'\n },\n // scaleLimit: null,\n itemStyle: {\n borderWidth: 0.5,\n borderColor: '#444',\n areaColor: '#eee'\n },\n emphasis: {\n label: {\n show: true,\n color: 'rgb(100,0,0)'\n },\n itemStyle: {\n areaColor: 'rgba(255,215,0,0.8)'\n }\n },\n nameProperty: 'name'\n }\n});\nzrUtil.mixin(MapSeries, dataSelectableMixin);\nvar _default = MapSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar NodeHighlightPolicy = {\n NONE: 'none',\n // not downplay others\n DESCENDANT: 'descendant',\n ANCESTOR: 'ancestor',\n SELF: 'self'\n};\nvar DEFAULT_SECTOR_Z = 2;\nvar DEFAULT_TEXT_Z = 4;\n/**\n * Sunburstce of Sunburst including Sector, Label, LabelLine\n * @constructor\n * @extends {module:zrender/graphic/Group}\n */\n\nfunction SunburstPiece(node, seriesModel, ecModel) {\n graphic.Group.call(this);\n var sector = new graphic.Sector({\n z2: DEFAULT_SECTOR_Z\n });\n sector.seriesIndex = seriesModel.seriesIndex;\n var text = new graphic.Text({\n z2: DEFAULT_TEXT_Z,\n silent: node.getModel('label').get('silent')\n });\n this.add(sector);\n this.add(text);\n this.updateData(true, node, 'normal', seriesModel, ecModel); // Hover to change label and labelLine\n\n function onEmphasis() {\n text.ignore = text.hoverIgnore;\n }\n\n function onNormal() {\n text.ignore = text.normalIgnore;\n }\n\n this.on('emphasis', onEmphasis).on('normal', onNormal).on('mouseover', onEmphasis).on('mouseout', onNormal);\n}\n\nvar SunburstPieceProto = SunburstPiece.prototype;\n\nSunburstPieceProto.updateData = function (firstCreate, node, state, seriesModel, ecModel) {\n this.node = node;\n node.piece = this;\n seriesModel = seriesModel || this._seriesModel;\n ecModel = ecModel || this._ecModel;\n var sector = this.childAt(0);\n sector.dataIndex = node.dataIndex;\n var itemModel = node.getModel();\n var layout = node.getLayout(); // if (!layout) {\n // console.log(node.getLayout());\n // }\n\n var sectorShape = zrUtil.extend({}, layout);\n sectorShape.label = null;\n var visualColor = getNodeColor(node, seriesModel, ecModel);\n fillDefaultColor(node, seriesModel, visualColor);\n var normalStyle = itemModel.getModel('itemStyle').getItemStyle();\n var style;\n\n if (state === 'normal') {\n style = normalStyle;\n } else {\n var stateStyle = itemModel.getModel(state + '.itemStyle').getItemStyle();\n style = zrUtil.merge(stateStyle, normalStyle);\n }\n\n style = zrUtil.defaults({\n lineJoin: 'bevel',\n fill: style.fill || visualColor\n }, style);\n\n if (firstCreate) {\n sector.setShape(sectorShape);\n sector.shape.r = layout.r0;\n graphic.updateProps(sector, {\n shape: {\n r: layout.r\n }\n }, seriesModel, node.dataIndex);\n sector.useStyle(style);\n } else if (typeof style.fill === 'object' && style.fill.type || typeof sector.style.fill === 'object' && sector.style.fill.type) {\n // Disable animation for gradient since no interpolation method\n // is supported for gradient\n graphic.updateProps(sector, {\n shape: sectorShape\n }, seriesModel);\n sector.useStyle(style);\n } else {\n graphic.updateProps(sector, {\n shape: sectorShape,\n style: style\n }, seriesModel);\n }\n\n this._updateLabel(seriesModel, visualColor, state);\n\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && sector.attr('cursor', cursorStyle);\n\n if (firstCreate) {\n var highlightPolicy = seriesModel.getShallow('highlightPolicy');\n\n this._initEvents(sector, node, seriesModel, highlightPolicy);\n }\n\n this._seriesModel = seriesModel || this._seriesModel;\n this._ecModel = ecModel || this._ecModel;\n graphic.setHoverStyle(this);\n};\n\nSunburstPieceProto.onEmphasis = function (highlightPolicy) {\n var that = this;\n this.node.hostTree.root.eachNode(function (n) {\n if (n.piece) {\n if (that.node === n) {\n n.piece.updateData(false, n, 'emphasis');\n } else if (isNodeHighlighted(n, that.node, highlightPolicy)) {\n n.piece.childAt(0).trigger('highlight');\n } else if (highlightPolicy !== NodeHighlightPolicy.NONE) {\n n.piece.childAt(0).trigger('downplay');\n }\n }\n });\n};\n\nSunburstPieceProto.onNormal = function () {\n this.node.hostTree.root.eachNode(function (n) {\n if (n.piece) {\n n.piece.updateData(false, n, 'normal');\n }\n });\n};\n\nSunburstPieceProto.onHighlight = function () {\n this.updateData(false, this.node, 'highlight');\n};\n\nSunburstPieceProto.onDownplay = function () {\n this.updateData(false, this.node, 'downplay');\n};\n\nSunburstPieceProto._updateLabel = function (seriesModel, visualColor, state) {\n var itemModel = this.node.getModel();\n var normalModel = itemModel.getModel('label');\n var labelModel = state === 'normal' || state === 'emphasis' ? normalModel : itemModel.getModel(state + '.label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n var labelFormatter = labelModel.get('formatter'); // Use normal formatter if no state formatter is defined\n\n var labelState = labelFormatter ? state : 'normal';\n var text = zrUtil.retrieve(seriesModel.getFormattedLabel(this.node.dataIndex, labelState, null, null, 'label'), this.node.name);\n\n if (getLabelAttr('show') === false) {\n text = '';\n }\n\n var layout = this.node.getLayout();\n var labelMinAngle = labelModel.get('minAngle');\n\n if (labelMinAngle == null) {\n labelMinAngle = normalModel.get('minAngle');\n }\n\n labelMinAngle = labelMinAngle / 180 * Math.PI;\n var angle = layout.endAngle - layout.startAngle;\n\n if (labelMinAngle != null && Math.abs(angle) < labelMinAngle) {\n // Not displaying text when angle is too small\n text = '';\n }\n\n var label = this.childAt(1);\n graphic.setLabelStyle(label.style, label.hoverStyle || {}, normalModel, labelHoverModel, {\n defaultText: labelModel.getShallow('show') ? text : null,\n autoColor: visualColor,\n useInsideStyle: true\n });\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n var dx = Math.cos(midAngle);\n var dy = Math.sin(midAngle);\n var r;\n var labelPosition = getLabelAttr('position');\n var labelPadding = getLabelAttr('distance') || 0;\n var textAlign = getLabelAttr('align');\n\n if (labelPosition === 'outside') {\n r = layout.r + labelPadding;\n textAlign = midAngle > Math.PI / 2 ? 'right' : 'left';\n } else {\n if (!textAlign || textAlign === 'center') {\n r = (layout.r + layout.r0) / 2;\n textAlign = 'center';\n } else if (textAlign === 'left') {\n r = layout.r0 + labelPadding;\n\n if (midAngle > Math.PI / 2) {\n textAlign = 'right';\n }\n } else if (textAlign === 'right') {\n r = layout.r - labelPadding;\n\n if (midAngle > Math.PI / 2) {\n textAlign = 'left';\n }\n }\n }\n\n label.attr('style', {\n text: text,\n textAlign: textAlign,\n textVerticalAlign: getLabelAttr('verticalAlign') || 'middle',\n opacity: getLabelAttr('opacity')\n });\n var textX = r * dx + layout.cx;\n var textY = r * dy + layout.cy;\n label.attr('position', [textX, textY]);\n var rotateType = getLabelAttr('rotate');\n var rotate = 0;\n\n if (rotateType === 'radial') {\n rotate = -midAngle;\n\n if (rotate < -Math.PI / 2) {\n rotate += Math.PI;\n }\n } else if (rotateType === 'tangential') {\n rotate = Math.PI / 2 - midAngle;\n\n if (rotate > Math.PI / 2) {\n rotate -= Math.PI;\n } else if (rotate < -Math.PI / 2) {\n rotate += Math.PI;\n }\n } else if (typeof rotateType === 'number') {\n rotate = rotateType * Math.PI / 180;\n }\n\n label.attr('rotation', rotate);\n\n function getLabelAttr(name) {\n var stateAttr = labelModel.get(name);\n\n if (stateAttr == null) {\n return normalModel.get(name);\n } else {\n return stateAttr;\n }\n }\n};\n\nSunburstPieceProto._initEvents = function (sector, node, seriesModel, highlightPolicy) {\n sector.off('mouseover').off('mouseout').off('emphasis').off('normal');\n var that = this;\n\n var onEmphasis = function () {\n that.onEmphasis(highlightPolicy);\n };\n\n var onNormal = function () {\n that.onNormal();\n };\n\n var onDownplay = function () {\n that.onDownplay();\n };\n\n var onHighlight = function () {\n that.onHighlight();\n };\n\n if (seriesModel.isAnimationEnabled()) {\n sector.on('mouseover', onEmphasis).on('mouseout', onNormal).on('emphasis', onEmphasis).on('normal', onNormal).on('downplay', onDownplay).on('highlight', onHighlight);\n }\n};\n\nzrUtil.inherits(SunburstPiece, graphic.Group);\nvar _default = SunburstPiece;\n/**\n * Get node color\n *\n * @param {TreeNode} node the node to get color\n * @param {module:echarts/model/Series} seriesModel series\n * @param {module:echarts/model/Global} ecModel echarts defaults\n */\n\nfunction getNodeColor(node, seriesModel, ecModel) {\n // Color from visualMap\n var visualColor = node.getVisual('color');\n var visualMetaList = node.getVisual('visualMeta');\n\n if (!visualMetaList || visualMetaList.length === 0) {\n // Use first-generation color if has no visualMap\n visualColor = null;\n } // Self color or level color\n\n\n var color = node.getModel('itemStyle').get('color');\n\n if (color) {\n return color;\n } else if (visualColor) {\n // Color mapping\n return visualColor;\n } else if (node.depth === 0) {\n // Virtual root node\n return ecModel.option.color[0];\n } else {\n // First-generation color\n var length = ecModel.option.color.length;\n color = ecModel.option.color[getRootId(node) % length];\n }\n\n return color;\n}\n/**\n * Get index of root in sorted order\n *\n * @param {TreeNode} node current node\n * @return {number} index in root\n */\n\n\nfunction getRootId(node) {\n var ancestor = node;\n\n while (ancestor.depth > 1) {\n ancestor = ancestor.parentNode;\n }\n\n var virtualRoot = node.getAncestors()[0];\n return zrUtil.indexOf(virtualRoot.children, ancestor);\n}\n\nfunction isNodeHighlighted(node, activeNode, policy) {\n if (policy === NodeHighlightPolicy.NONE) {\n return false;\n } else if (policy === NodeHighlightPolicy.SELF) {\n return node === activeNode;\n } else if (policy === NodeHighlightPolicy.ANCESTOR) {\n return node === activeNode || node.isAncestorOf(activeNode);\n } else {\n return node === activeNode || node.isDescendantOf(activeNode);\n }\n} // Fix tooltip callback function params.color incorrect when pick a default color\n\n\nfunction fillDefaultColor(node, seriesModel, color) {\n var data = seriesModel.getData();\n data.setItemVisual(node.dataIndex, 'color', color);\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar lang = require(\"../../../lang\");\n\nvar featureManager = require(\"../featureManager\");\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/* global Uint8Array */\nvar saveAsImageLang = lang.toolbox.saveAsImage;\n\nfunction SaveAsImage(model) {\n this.model = model;\n}\n\nSaveAsImage.defaultOption = {\n show: true,\n icon: 'M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0',\n title: saveAsImageLang.title,\n type: 'png',\n // Default use option.backgroundColor\n // backgroundColor: '#fff',\n connectedBackgroundColor: '#fff',\n name: '',\n excludeComponents: ['toolbox'],\n pixelRatio: 1,\n lang: saveAsImageLang.lang.slice()\n};\nSaveAsImage.prototype.unusable = !env.canvasSupported;\nvar proto = SaveAsImage.prototype;\n\nproto.onclick = function (ecModel, api) {\n var model = this.model;\n var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';\n var isSvg = api.getZr().painter.getType() === 'svg';\n var type = isSvg ? 'svg' : model.get('type', true) || 'png';\n var url = api.getConnectedDataURL({\n type: type,\n backgroundColor: model.get('backgroundColor', true) || ecModel.get('backgroundColor') || '#fff',\n connectedBackgroundColor: model.get('connectedBackgroundColor'),\n excludeComponents: model.get('excludeComponents'),\n pixelRatio: model.get('pixelRatio')\n }); // Chrome and Firefox\n\n if (typeof MouseEvent === 'function' && !env.browser.ie && !env.browser.edge) {\n var $a = document.createElement('a');\n $a.download = title + '.' + type;\n $a.target = '_blank';\n $a.href = url;\n var evt = new MouseEvent('click', {\n // some micro front-end framework, window maybe is a Proxy\n view: document.defaultView,\n bubbles: true,\n cancelable: false\n });\n $a.dispatchEvent(evt);\n } // IE\n else {\n if (window.navigator.msSaveOrOpenBlob) {\n var bstr = atob(url.split(',')[1]);\n var n = bstr.length;\n var u8arr = new Uint8Array(n);\n\n while (n--) {\n u8arr[n] = bstr.charCodeAt(n);\n }\n\n var blob = new Blob([u8arr]);\n window.navigator.msSaveOrOpenBlob(blob, title + '.' + type);\n } else {\n var lang = model.get('lang');\n var html = '' + '' + '' + '';\n var tab = window.open();\n tab.document.write(html);\n }\n }\n};\n\nfeatureManager.register('saveAsImage', SaveAsImage);\nvar _default = SaveAsImage;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar formatUtil = require(\"../../util/format\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar AXIS_DIMS = ['x', 'y', 'z', 'radius', 'angle', 'single']; // Supported coords.\n\nvar COORDS = ['cartesian2d', 'polar', 'singleAxis'];\n/**\n * @param {string} coordType\n * @return {boolean}\n */\n\nfunction isCoordSupported(coordType) {\n return zrUtil.indexOf(COORDS, coordType) >= 0;\n}\n/**\n * Create \"each\" method to iterate names.\n *\n * @pubilc\n * @param {Array.} names\n * @param {Array.=} attrs\n * @return {Function}\n */\n\n\nfunction createNameEach(names, attrs) {\n names = names.slice();\n var capitalNames = zrUtil.map(names, formatUtil.capitalFirst);\n attrs = (attrs || []).slice();\n var capitalAttrs = zrUtil.map(attrs, formatUtil.capitalFirst);\n return function (callback, context) {\n zrUtil.each(names, function (name, index) {\n var nameObj = {\n name: name,\n capital: capitalNames[index]\n };\n\n for (var j = 0; j < attrs.length; j++) {\n nameObj[attrs[j]] = name + capitalAttrs[j];\n }\n\n callback.call(context, nameObj);\n });\n };\n}\n/**\n * Iterate each dimension name.\n *\n * @public\n * @param {Function} callback The parameter is like:\n * {\n * name: 'angle',\n * capital: 'Angle',\n * axis: 'angleAxis',\n * axisIndex: 'angleAixs',\n * index: 'angleIndex'\n * }\n * @param {Object} context\n */\n\n\nvar eachAxisDim = createNameEach(AXIS_DIMS, ['axisIndex', 'axis', 'index', 'id']);\n/**\n * If tow dataZoomModels has the same axis controlled, we say that they are 'linked'.\n * dataZoomModels and 'links' make up one or more graphics.\n * This function finds the graphic where the source dataZoomModel is in.\n *\n * @public\n * @param {Function} forEachNode Node iterator.\n * @param {Function} forEachEdgeType edgeType iterator\n * @param {Function} edgeIdGetter Giving node and edgeType, return an array of edge id.\n * @return {Function} Input: sourceNode, Output: Like {nodes: [], dims: {}}\n */\n\nfunction createLinkedNodesFinder(forEachNode, forEachEdgeType, edgeIdGetter) {\n return function (sourceNode) {\n var result = {\n nodes: [],\n records: {} // key: edgeType.name, value: Object (key: edge id, value: boolean).\n\n };\n forEachEdgeType(function (edgeType) {\n result.records[edgeType.name] = {};\n });\n\n if (!sourceNode) {\n return result;\n }\n\n absorb(sourceNode, result);\n var existsLink;\n\n do {\n existsLink = false;\n forEachNode(processSingleNode);\n } while (existsLink);\n\n function processSingleNode(node) {\n if (!isNodeAbsorded(node, result) && isLinked(node, result)) {\n absorb(node, result);\n existsLink = true;\n }\n }\n\n return result;\n };\n\n function isNodeAbsorded(node, result) {\n return zrUtil.indexOf(result.nodes, node) >= 0;\n }\n\n function isLinked(node, result) {\n var hasLink = false;\n forEachEdgeType(function (edgeType) {\n zrUtil.each(edgeIdGetter(node, edgeType) || [], function (edgeId) {\n result.records[edgeType.name][edgeId] && (hasLink = true);\n });\n });\n return hasLink;\n }\n\n function absorb(node, result) {\n result.nodes.push(node);\n forEachEdgeType(function (edgeType) {\n zrUtil.each(edgeIdGetter(node, edgeType) || [], function (edgeId) {\n result.records[edgeType.name][edgeId] = true;\n });\n });\n }\n}\n\nexports.isCoordSupported = isCoordSupported;\nexports.createNameEach = createNameEach;\nexports.eachAxisDim = eachAxisDim;\nexports.createLinkedNodesFinder = createLinkedNodesFinder;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar numberUtil = require(\"../../util/number\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel, api) {\n ecModel.eachSeriesByType('themeRiver', function (seriesModel) {\n var data = seriesModel.getData();\n var single = seriesModel.coordinateSystem;\n var layoutInfo = {}; // use the axis boundingRect for view\n\n var rect = single.getRect();\n layoutInfo.rect = rect;\n var boundaryGap = seriesModel.get('boundaryGap');\n var axis = single.getAxis();\n layoutInfo.boundaryGap = boundaryGap;\n\n if (axis.orient === 'horizontal') {\n boundaryGap[0] = numberUtil.parsePercent(boundaryGap[0], rect.height);\n boundaryGap[1] = numberUtil.parsePercent(boundaryGap[1], rect.height);\n var height = rect.height - boundaryGap[0] - boundaryGap[1];\n themeRiverLayout(data, seriesModel, height);\n } else {\n boundaryGap[0] = numberUtil.parsePercent(boundaryGap[0], rect.width);\n boundaryGap[1] = numberUtil.parsePercent(boundaryGap[1], rect.width);\n var width = rect.width - boundaryGap[0] - boundaryGap[1];\n themeRiverLayout(data, seriesModel, width);\n }\n\n data.setLayout('layoutInfo', layoutInfo);\n });\n}\n/**\n * The layout information about themeriver\n *\n * @param {module:echarts/data/List} data data in the series\n * @param {module:echarts/model/Series} seriesModel the model object of themeRiver series\n * @param {number} height value used to compute every series height\n */\n\n\nfunction themeRiverLayout(data, seriesModel, height) {\n if (!data.count()) {\n return;\n }\n\n var coordSys = seriesModel.coordinateSystem; // the data in each layer are organized into a series.\n\n var layerSeries = seriesModel.getLayerSeries(); // the points in each layer.\n\n var timeDim = data.mapDimension('single');\n var valueDim = data.mapDimension('value');\n var layerPoints = zrUtil.map(layerSeries, function (singleLayer) {\n return zrUtil.map(singleLayer.indices, function (idx) {\n var pt = coordSys.dataToPoint(data.get(timeDim, idx));\n pt[1] = data.get(valueDim, idx);\n return pt;\n });\n });\n var base = computeBaseline(layerPoints);\n var baseLine = base.y0;\n var ky = height / base.max; // set layout information for each item.\n\n var n = layerSeries.length;\n var m = layerSeries[0].indices.length;\n var baseY0;\n\n for (var j = 0; j < m; ++j) {\n baseY0 = baseLine[j] * ky;\n data.setItemLayout(layerSeries[0].indices[j], {\n layerIndex: 0,\n x: layerPoints[0][j][0],\n y0: baseY0,\n y: layerPoints[0][j][1] * ky\n });\n\n for (var i = 1; i < n; ++i) {\n baseY0 += layerPoints[i - 1][j][1] * ky;\n data.setItemLayout(layerSeries[i].indices[j], {\n layerIndex: i,\n x: layerPoints[i][j][0],\n y0: baseY0,\n y: layerPoints[i][j][1] * ky\n });\n }\n }\n}\n/**\n * Compute the baseLine of the rawdata\n * Inspired by Lee Byron's paper Stacked Graphs - Geometry & Aesthetics\n *\n * @param {Array.} data the points in each layer\n * @return {Object}\n */\n\n\nfunction computeBaseline(data) {\n var layerNum = data.length;\n var pointNum = data[0].length;\n var sums = [];\n var y0 = [];\n var max = 0;\n var temp;\n var base = {};\n\n for (var i = 0; i < pointNum; ++i) {\n for (var j = 0, temp = 0; j < layerNum; ++j) {\n temp += data[j][i][1];\n }\n\n if (temp > max) {\n max = temp;\n }\n\n sums.push(temp);\n }\n\n for (var k = 0; k < pointNum; ++k) {\n y0[k] = (max - sums[k]) / 2;\n }\n\n max = 0;\n\n for (var l = 0; l < pointNum; ++l) {\n var sum = sums[l] + y0[l];\n\n if (sum > max) {\n max = sum;\n }\n }\n\n base.y0 = y0;\n base.max = max;\n return base;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction getNodeGlobalScale(seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys.type !== 'view') {\n return 1;\n }\n\n var nodeScaleRatio = seriesModel.option.nodeScaleRatio;\n var groupScale = coordSys.scale;\n var groupZoom = groupScale && groupScale[0] || 1; // Scale node when zoom changes\n\n var roamZoom = coordSys.getZoom();\n var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1;\n return nodeScale / groupZoom;\n}\n\nfunction getSymbolSize(node) {\n var symbolSize = node.getVisual('symbolSize');\n\n if (symbolSize instanceof Array) {\n symbolSize = (symbolSize[0] + symbolSize[1]) / 2;\n }\n\n return +symbolSize;\n}\n\nexports.getNodeGlobalScale = getNodeGlobalScale;\nexports.getSymbolSize = getSymbolSize;","\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\nrequire(\"./visualMapContinuous\");\n\nrequire(\"./visualMapPiecewise\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n ecModel.eachSeriesByType('map', function (seriesModel) {\n var colorList = seriesModel.get('color');\n var itemStyleModel = seriesModel.getModel('itemStyle');\n var areaColor = itemStyleModel.get('areaColor');\n var color = itemStyleModel.get('color') || colorList[seriesModel.seriesIndex % colorList.length];\n seriesModel.getData().setVisual({\n 'areaColor': areaColor,\n 'color': color\n });\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"../coord/radar/Radar\");\n\nrequire(\"../coord/radar/RadarModel\");\n\nrequire(\"./radar/RadarView\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar RoamController = require(\"../../component/helper/RoamController\");\n\nvar throttleUtil = require(\"../../util/throttle\");\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// Only create one roam controller for each coordinate system.\n// one roam controller might be refered by two inside data zoom\n// components (for example, one for x and one for y). When user\n// pan or zoom, only dispatch one action for those data zoom\n// components.\nvar ATTR = '\\0_ec_dataZoom_roams';\n/**\n * @public\n * @param {module:echarts/ExtensionAPI} api\n * @param {Object} dataZoomInfo\n * @param {string} dataZoomInfo.coordId\n * @param {Function} dataZoomInfo.containsPoint\n * @param {Array.} dataZoomInfo.allCoordIds\n * @param {string} dataZoomInfo.dataZoomId\n * @param {Object} dataZoomInfo.getRange\n * @param {Function} dataZoomInfo.getRange.pan\n * @param {Function} dataZoomInfo.getRange.zoom\n * @param {Function} dataZoomInfo.getRange.scrollMove\n * @param {boolean} dataZoomInfo.dataZoomModel\n */\n\nfunction register(api, dataZoomInfo) {\n var store = giveStore(api);\n var theDataZoomId = dataZoomInfo.dataZoomId;\n var theCoordId = dataZoomInfo.coordId; // Do clean when a dataZoom changes its target coordnate system.\n // Avoid memory leak, dispose all not-used-registered.\n\n zrUtil.each(store, function (record, coordId) {\n var dataZoomInfos = record.dataZoomInfos;\n\n if (dataZoomInfos[theDataZoomId] && zrUtil.indexOf(dataZoomInfo.allCoordIds, theCoordId) < 0) {\n delete dataZoomInfos[theDataZoomId];\n record.count--;\n }\n });\n cleanStore(store);\n var record = store[theCoordId]; // Create if needed.\n\n if (!record) {\n record = store[theCoordId] = {\n coordId: theCoordId,\n dataZoomInfos: {},\n count: 0\n };\n record.controller = createController(api, record);\n record.dispatchAction = zrUtil.curry(dispatchAction, api);\n } // Update reference of dataZoom.\n\n\n !record.dataZoomInfos[theDataZoomId] && record.count++;\n record.dataZoomInfos[theDataZoomId] = dataZoomInfo;\n var controllerParams = mergeControllerParams(record.dataZoomInfos);\n record.controller.enable(controllerParams.controlType, controllerParams.opt); // Consider resize, area should be always updated.\n\n record.controller.setPointerChecker(dataZoomInfo.containsPoint); // Update throttle.\n\n throttleUtil.createOrUpdate(record, 'dispatchAction', dataZoomInfo.dataZoomModel.get('throttle', true), 'fixRate');\n}\n/**\n * @public\n * @param {module:echarts/ExtensionAPI} api\n * @param {string} dataZoomId\n */\n\n\nfunction unregister(api, dataZoomId) {\n var store = giveStore(api);\n zrUtil.each(store, function (record) {\n record.controller.dispose();\n var dataZoomInfos = record.dataZoomInfos;\n\n if (dataZoomInfos[dataZoomId]) {\n delete dataZoomInfos[dataZoomId];\n record.count--;\n }\n });\n cleanStore(store);\n}\n/**\n * @public\n */\n\n\nfunction generateCoordId(coordModel) {\n return coordModel.type + '\\0_' + coordModel.id;\n}\n/**\n * Key: coordId, value: {dataZoomInfos: [], count, controller}\n * @type {Array.}\n */\n\n\nfunction giveStore(api) {\n // Mount store on zrender instance, so that we do not\n // need to worry about dispose.\n var zr = api.getZr();\n return zr[ATTR] || (zr[ATTR] = {});\n}\n\nfunction createController(api, newRecord) {\n var controller = new RoamController(api.getZr());\n zrUtil.each(['pan', 'zoom', 'scrollMove'], function (eventName) {\n controller.on(eventName, function (event) {\n var batch = [];\n zrUtil.each(newRecord.dataZoomInfos, function (info) {\n // Check whether the behaviors (zoomOnMouseWheel, moveOnMouseMove,\n // moveOnMouseWheel, ...) enabled.\n if (!event.isAvailableBehavior(info.dataZoomModel.option)) {\n return;\n }\n\n var method = (info.getRange || {})[eventName];\n var range = method && method(newRecord.controller, event);\n !info.dataZoomModel.get('disabled', true) && range && batch.push({\n dataZoomId: info.dataZoomId,\n start: range[0],\n end: range[1]\n });\n });\n batch.length && newRecord.dispatchAction(batch);\n });\n });\n return controller;\n}\n\nfunction cleanStore(store) {\n zrUtil.each(store, function (record, coordId) {\n if (!record.count) {\n record.controller.dispose();\n delete store[coordId];\n }\n });\n}\n/**\n * This action will be throttled.\n */\n\n\nfunction dispatchAction(api, batch) {\n api.dispatchAction({\n type: 'dataZoom',\n batch: batch\n });\n}\n/**\n * Merge roamController settings when multiple dataZooms share one roamController.\n */\n\n\nfunction mergeControllerParams(dataZoomInfos) {\n var controlType; // DO NOT use reserved word (true, false, undefined) as key literally. Even if encapsulated\n // as string, it is probably revert to reserved word by compress tool. See #7411.\n\n var prefix = 'type_';\n var typePriority = {\n 'type_true': 2,\n 'type_move': 1,\n 'type_false': 0,\n 'type_undefined': -1\n };\n var preventDefaultMouseMove = true;\n zrUtil.each(dataZoomInfos, function (dataZoomInfo) {\n var dataZoomModel = dataZoomInfo.dataZoomModel;\n var oneType = dataZoomModel.get('disabled', true) ? false : dataZoomModel.get('zoomLock', true) ? 'move' : true;\n\n if (typePriority[prefix + oneType] > typePriority[prefix + controlType]) {\n controlType = oneType;\n } // Prevent default move event by default. If one false, do not prevent. Otherwise\n // users may be confused why it does not work when multiple insideZooms exist.\n\n\n preventDefaultMouseMove &= dataZoomModel.get('preventDefaultMouseMove', true);\n });\n return {\n controlType: controlType,\n opt: {\n // RoamController will enable all of these functionalities,\n // and the final behavior is determined by its event listener\n // provided by each inside zoom.\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n moveOnMouseWheel: true,\n preventDefaultMouseMove: !!preventDefaultMouseMove\n }\n };\n}\n\nexports.register = register;\nexports.unregister = unregister;\nexports.generateCoordId = generateCoordId;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction retrieveTargetInfo(payload, validPayloadTypes, seriesModel) {\n if (payload && zrUtil.indexOf(validPayloadTypes, payload.type) >= 0) {\n var root = seriesModel.getData().tree.root;\n var targetNode = payload.targetNode;\n\n if (typeof targetNode === 'string') {\n targetNode = root.getNodeById(targetNode);\n }\n\n if (targetNode && root.contains(targetNode)) {\n return {\n node: targetNode\n };\n }\n\n var targetNodeId = payload.targetNodeId;\n\n if (targetNodeId != null && (targetNode = root.getNodeById(targetNodeId))) {\n return {\n node: targetNode\n };\n }\n }\n} // Not includes the given node at the last item.\n\n\nfunction getPathToRoot(node) {\n var path = [];\n\n while (node) {\n node = node.parentNode;\n node && path.push(node);\n }\n\n return path.reverse();\n}\n\nfunction aboveViewRoot(viewRoot, node) {\n var viewPath = getPathToRoot(viewRoot);\n return zrUtil.indexOf(viewPath, node) >= 0;\n} // From root to the input node (the input node will be included).\n\n\nfunction wrapTreePathInfo(node, seriesModel) {\n var treePathInfo = [];\n\n while (node) {\n var nodeDataIndex = node.dataIndex;\n treePathInfo.push({\n name: node.name,\n dataIndex: nodeDataIndex,\n value: seriesModel.getRawValue(nodeDataIndex)\n });\n node = node.parentNode;\n }\n\n treePathInfo.reverse();\n return treePathInfo;\n}\n\nexports.retrieveTargetInfo = retrieveTargetInfo;\nexports.getPathToRoot = getPathToRoot;\nexports.aboveViewRoot = aboveViewRoot;\nexports.wrapTreePathInfo = wrapTreePathInfo;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _forceHelper = require(\"./forceHelper\");\n\nvar forceLayout = _forceHelper.forceLayout;\n\nvar _simpleLayoutHelper = require(\"./simpleLayoutHelper\");\n\nvar simpleLayout = _simpleLayoutHelper.simpleLayout;\n\nvar _circularLayoutHelper = require(\"./circularLayoutHelper\");\n\nvar circularLayout = _circularLayoutHelper.circularLayout;\n\nvar _number = require(\"../../util/number\");\n\nvar linearMap = _number.linearMap;\n\nvar vec2 = require(\"zrender/lib/core/vector\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _multipleGraphEdgeHelper = require(\"../helper/multipleGraphEdgeHelper\");\n\nvar getCurvenessForEdge = _multipleGraphEdgeHelper.getCurvenessForEdge;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var coordSys = graphSeries.coordinateSystem;\n\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n\n if (graphSeries.get('layout') === 'force') {\n var preservedPoints = graphSeries.preservedPoints || {};\n var graph = graphSeries.getGraph();\n var nodeData = graph.data;\n var edgeData = graph.edgeData;\n var forceModel = graphSeries.getModel('force');\n var initLayout = forceModel.get('initLayout');\n\n if (graphSeries.preservedPoints) {\n nodeData.each(function (idx) {\n var id = nodeData.getId(idx);\n nodeData.setItemLayout(idx, preservedPoints[id] || [NaN, NaN]);\n });\n } else if (!initLayout || initLayout === 'none') {\n simpleLayout(graphSeries);\n } else if (initLayout === 'circular') {\n circularLayout(graphSeries, 'value');\n }\n\n var nodeDataExtent = nodeData.getDataExtent('value');\n var edgeDataExtent = edgeData.getDataExtent('value'); // var edgeDataExtent = edgeData.getDataExtent('value');\n\n var repulsion = forceModel.get('repulsion');\n var edgeLength = forceModel.get('edgeLength');\n\n if (!zrUtil.isArray(repulsion)) {\n repulsion = [repulsion, repulsion];\n }\n\n if (!zrUtil.isArray(edgeLength)) {\n edgeLength = [edgeLength, edgeLength];\n } // Larger value has smaller length\n\n\n edgeLength = [edgeLength[1], edgeLength[0]];\n var nodes = nodeData.mapArray('value', function (value, idx) {\n var point = nodeData.getItemLayout(idx);\n var rep = linearMap(value, nodeDataExtent, repulsion);\n\n if (isNaN(rep)) {\n rep = (repulsion[0] + repulsion[1]) / 2;\n }\n\n return {\n w: rep,\n rep: rep,\n fixed: nodeData.getItemModel(idx).get('fixed'),\n p: !point || isNaN(point[0]) || isNaN(point[1]) ? null : point\n };\n });\n var edges = edgeData.mapArray('value', function (value, idx) {\n var edge = graph.getEdgeByIndex(idx);\n var d = linearMap(value, edgeDataExtent, edgeLength);\n\n if (isNaN(d)) {\n d = (edgeLength[0] + edgeLength[1]) / 2;\n }\n\n var edgeModel = edge.getModel();\n var curveness = zrUtil.retrieve3(edgeModel.get('lineStyle.curveness'), -getCurvenessForEdge(edge, graphSeries, idx, true), 0);\n return {\n n1: nodes[edge.node1.dataIndex],\n n2: nodes[edge.node2.dataIndex],\n d: d,\n curveness: curveness,\n ignoreForceLayout: edgeModel.get('ignoreForceLayout')\n };\n });\n var coordSys = graphSeries.coordinateSystem;\n var rect = coordSys.getBoundingRect();\n var forceInstance = forceLayout(nodes, edges, {\n rect: rect,\n gravity: forceModel.get('gravity'),\n friction: forceModel.get('friction')\n });\n var oldStep = forceInstance.step;\n\n forceInstance.step = function (cb) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n if (nodes[i].fixed) {\n // Write back to layout instance\n vec2.copy(nodes[i].p, graph.getNodeByIndex(i).getLayout());\n }\n }\n\n oldStep(function (nodes, edges, stopped) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n if (!nodes[i].fixed) {\n graph.getNodeByIndex(i).setLayout(nodes[i].p);\n }\n\n preservedPoints[nodeData.getId(i)] = nodes[i].p;\n }\n\n for (var i = 0, l = edges.length; i < l; i++) {\n var e = edges[i];\n var edge = graph.getEdgeByIndex(i);\n var p1 = e.n1.p;\n var p2 = e.n2.p;\n var points = edge.getLayout();\n points = points ? points.slice() : [];\n points[0] = points[0] || [];\n points[1] = points[1] || [];\n vec2.copy(points[0], p1);\n vec2.copy(points[1], p2);\n\n if (+e.curveness) {\n points[2] = [(p1[0] + p2[0]) / 2 - (p1[1] - p2[1]) * e.curveness, (p1[1] + p2[1]) / 2 - (p2[0] - p1[0]) * e.curveness];\n }\n\n edge.setLayout(points);\n } // Update layout\n\n\n cb && cb(stopped);\n });\n };\n\n graphSeries.forceLayout = forceInstance;\n graphSeries.preservedPoints = preservedPoints; // Step to get the layout\n\n forceInstance.step();\n } else {\n // Remove prev injected forceLayout instance\n graphSeries.forceLayout = null;\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar nodeOpacityPath = ['itemStyle', 'opacity'];\nvar hoverNodeOpacityPath = ['emphasis', 'itemStyle', 'opacity'];\nvar lineOpacityPath = ['lineStyle', 'opacity'];\nvar hoverLineOpacityPath = ['emphasis', 'lineStyle', 'opacity'];\n\nfunction getItemOpacity(item, opacityPath) {\n return item.getVisual('opacity') || item.getModel().get(opacityPath);\n}\n\nfunction fadeOutItem(item, opacityPath, opacityRatio) {\n var el = item.getGraphicEl();\n var opacity = getItemOpacity(item, opacityPath);\n\n if (opacityRatio != null) {\n opacity == null && (opacity = 1);\n opacity *= opacityRatio;\n }\n\n el.downplay && el.downplay();\n el.traverse(function (child) {\n if (child.type !== 'group') {\n child.setStyle('opacity', opacity);\n }\n });\n}\n\nfunction fadeInItem(item, opacityPath) {\n var opacity = getItemOpacity(item, opacityPath);\n var el = item.getGraphicEl();\n el.traverse(function (child) {\n if (child.type !== 'group') {\n child.setStyle('opacity', opacity);\n }\n }); // Support emphasis here.\n\n el.highlight && el.highlight();\n}\n\nvar SankeyShape = graphic.extendShape({\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0,\n cpx1: 0,\n cpy1: 0,\n cpx2: 0,\n cpy2: 0,\n extent: 0,\n orient: ''\n },\n buildPath: function (ctx, shape) {\n var extent = shape.extent;\n ctx.moveTo(shape.x1, shape.y1);\n ctx.bezierCurveTo(shape.cpx1, shape.cpy1, shape.cpx2, shape.cpy2, shape.x2, shape.y2);\n\n if (shape.orient === 'vertical') {\n ctx.lineTo(shape.x2 + extent, shape.y2);\n ctx.bezierCurveTo(shape.cpx2 + extent, shape.cpy2, shape.cpx1 + extent, shape.cpy1, shape.x1 + extent, shape.y1);\n } else {\n ctx.lineTo(shape.x2, shape.y2 + extent);\n ctx.bezierCurveTo(shape.cpx2, shape.cpy2 + extent, shape.cpx1, shape.cpy1 + extent, shape.x1, shape.y1 + extent);\n }\n\n ctx.closePath();\n },\n highlight: function () {\n this.trigger('emphasis');\n },\n downplay: function () {\n this.trigger('normal');\n }\n});\n\nvar _default = echarts.extendChartView({\n type: 'sankey',\n\n /**\n * @private\n * @type {module:echarts/chart/sankey/SankeySeries}\n */\n _model: null,\n\n /**\n * @private\n * @type {boolean}\n */\n _focusAdjacencyDisabled: false,\n render: function (seriesModel, ecModel, api) {\n var sankeyView = this;\n var graph = seriesModel.getGraph();\n var group = this.group;\n var layoutInfo = seriesModel.layoutInfo; // view width\n\n var width = layoutInfo.width; // view height\n\n var height = layoutInfo.height;\n var nodeData = seriesModel.getData();\n var edgeData = seriesModel.getData('edge');\n var orient = seriesModel.get('orient');\n this._model = seriesModel;\n group.removeAll();\n group.attr('position', [layoutInfo.x, layoutInfo.y]); // generate a bezire Curve for each edge\n\n graph.eachEdge(function (edge) {\n var curve = new SankeyShape();\n curve.dataIndex = edge.dataIndex;\n curve.seriesIndex = seriesModel.seriesIndex;\n curve.dataType = 'edge';\n var lineStyleModel = edge.getModel('lineStyle');\n var curvature = lineStyleModel.get('curveness');\n var n1Layout = edge.node1.getLayout();\n var node1Model = edge.node1.getModel();\n var dragX1 = node1Model.get('localX');\n var dragY1 = node1Model.get('localY');\n var n2Layout = edge.node2.getLayout();\n var node2Model = edge.node2.getModel();\n var dragX2 = node2Model.get('localX');\n var dragY2 = node2Model.get('localY');\n var edgeLayout = edge.getLayout();\n var x1;\n var y1;\n var x2;\n var y2;\n var cpx1;\n var cpy1;\n var cpx2;\n var cpy2;\n curve.shape.extent = Math.max(1, edgeLayout.dy);\n curve.shape.orient = orient;\n\n if (orient === 'vertical') {\n x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + edgeLayout.sy;\n y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + n1Layout.dy;\n x2 = (dragX2 != null ? dragX2 * width : n2Layout.x) + edgeLayout.ty;\n y2 = dragY2 != null ? dragY2 * height : n2Layout.y;\n cpx1 = x1;\n cpy1 = y1 * (1 - curvature) + y2 * curvature;\n cpx2 = x2;\n cpy2 = y1 * curvature + y2 * (1 - curvature);\n } else {\n x1 = (dragX1 != null ? dragX1 * width : n1Layout.x) + n1Layout.dx;\n y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + edgeLayout.sy;\n x2 = dragX2 != null ? dragX2 * width : n2Layout.x;\n y2 = (dragY2 != null ? dragY2 * height : n2Layout.y) + edgeLayout.ty;\n cpx1 = x1 * (1 - curvature) + x2 * curvature;\n cpy1 = y1;\n cpx2 = x1 * curvature + x2 * (1 - curvature);\n cpy2 = y2;\n }\n\n curve.setShape({\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2,\n cpx1: cpx1,\n cpy1: cpy1,\n cpx2: cpx2,\n cpy2: cpy2\n });\n curve.setStyle(lineStyleModel.getItemStyle()); // Special color, use source node color or target node color\n\n switch (curve.style.fill) {\n case 'source':\n curve.style.fill = edge.node1.getVisual('color');\n break;\n\n case 'target':\n curve.style.fill = edge.node2.getVisual('color');\n break;\n }\n\n graphic.setHoverStyle(curve, edge.getModel('emphasis.lineStyle').getItemStyle());\n group.add(curve);\n edgeData.setItemGraphicEl(edge.dataIndex, curve);\n }); // Generate a rect for each node\n\n graph.eachNode(function (node) {\n var layout = node.getLayout();\n var itemModel = node.getModel();\n var dragX = itemModel.get('localX');\n var dragY = itemModel.get('localY');\n var labelModel = itemModel.getModel('label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n var rect = new graphic.Rect({\n shape: {\n x: dragX != null ? dragX * width : layout.x,\n y: dragY != null ? dragY * height : layout.y,\n width: layout.dx,\n height: layout.dy\n },\n style: itemModel.getModel('itemStyle').getItemStyle()\n });\n var hoverStyle = node.getModel('emphasis.itemStyle').getItemStyle();\n graphic.setLabelStyle(rect.style, hoverStyle, labelModel, labelHoverModel, {\n labelFetcher: seriesModel,\n labelDataIndex: node.dataIndex,\n defaultText: node.id,\n isRectText: true\n });\n rect.setStyle('fill', node.getVisual('color'));\n graphic.setHoverStyle(rect, hoverStyle);\n group.add(rect);\n nodeData.setItemGraphicEl(node.dataIndex, rect);\n rect.dataType = 'node';\n });\n nodeData.eachItemGraphicEl(function (el, dataIndex) {\n var itemModel = nodeData.getItemModel(dataIndex);\n\n if (itemModel.get('draggable')) {\n el.drift = function (dx, dy) {\n sankeyView._focusAdjacencyDisabled = true;\n this.shape.x += dx;\n this.shape.y += dy;\n this.dirty();\n api.dispatchAction({\n type: 'dragNode',\n seriesId: seriesModel.id,\n dataIndex: nodeData.getRawIndex(dataIndex),\n localX: this.shape.x / width,\n localY: this.shape.y / height\n });\n };\n\n el.ondragend = function () {\n sankeyView._focusAdjacencyDisabled = false;\n };\n\n el.draggable = true;\n el.cursor = 'move';\n }\n\n el.highlight = function () {\n this.trigger('emphasis');\n };\n\n el.downplay = function () {\n this.trigger('normal');\n };\n\n el.focusNodeAdjHandler && el.off('mouseover', el.focusNodeAdjHandler);\n el.unfocusNodeAdjHandler && el.off('mouseout', el.unfocusNodeAdjHandler);\n\n if (itemModel.get('focusNodeAdjacency')) {\n el.on('mouseover', el.focusNodeAdjHandler = function () {\n if (!sankeyView._focusAdjacencyDisabled) {\n sankeyView._clearTimer();\n\n api.dispatchAction({\n type: 'focusNodeAdjacency',\n seriesId: seriesModel.id,\n dataIndex: el.dataIndex\n });\n }\n });\n el.on('mouseout', el.unfocusNodeAdjHandler = function () {\n if (!sankeyView._focusAdjacencyDisabled) {\n sankeyView._dispatchUnfocus(api);\n }\n });\n }\n });\n edgeData.eachItemGraphicEl(function (el, dataIndex) {\n var edgeModel = edgeData.getItemModel(dataIndex);\n el.focusNodeAdjHandler && el.off('mouseover', el.focusNodeAdjHandler);\n el.unfocusNodeAdjHandler && el.off('mouseout', el.unfocusNodeAdjHandler);\n\n if (edgeModel.get('focusNodeAdjacency')) {\n el.on('mouseover', el.focusNodeAdjHandler = function () {\n if (!sankeyView._focusAdjacencyDisabled) {\n sankeyView._clearTimer();\n\n api.dispatchAction({\n type: 'focusNodeAdjacency',\n seriesId: seriesModel.id,\n edgeDataIndex: el.dataIndex\n });\n }\n });\n el.on('mouseout', el.unfocusNodeAdjHandler = function () {\n if (!sankeyView._focusAdjacencyDisabled) {\n sankeyView._dispatchUnfocus(api);\n }\n });\n }\n });\n\n if (!this._data && seriesModel.get('animation')) {\n group.setClipPath(createGridClipShape(group.getBoundingRect(), seriesModel, function () {\n group.removeClipPath();\n }));\n }\n\n this._data = seriesModel.getData();\n },\n dispose: function () {\n this._clearTimer();\n },\n _dispatchUnfocus: function (api) {\n var self = this;\n\n this._clearTimer();\n\n this._unfocusDelayTimer = setTimeout(function () {\n self._unfocusDelayTimer = null;\n api.dispatchAction({\n type: 'unfocusNodeAdjacency',\n seriesId: self._model.id\n });\n }, 500);\n },\n _clearTimer: function () {\n if (this._unfocusDelayTimer) {\n clearTimeout(this._unfocusDelayTimer);\n this._unfocusDelayTimer = null;\n }\n },\n focusNodeAdjacency: function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var graph = data.graph;\n var dataIndex = payload.dataIndex;\n var itemModel = data.getItemModel(dataIndex);\n var edgeDataIndex = payload.edgeDataIndex;\n\n if (dataIndex == null && edgeDataIndex == null) {\n return;\n }\n\n var node = graph.getNodeByIndex(dataIndex);\n var edge = graph.getEdgeByIndex(edgeDataIndex);\n graph.eachNode(function (node) {\n fadeOutItem(node, nodeOpacityPath, 0.1);\n });\n graph.eachEdge(function (edge) {\n fadeOutItem(edge, lineOpacityPath, 0.1);\n });\n\n if (node) {\n fadeInItem(node, hoverNodeOpacityPath);\n var focusNodeAdj = itemModel.get('focusNodeAdjacency');\n\n if (focusNodeAdj === 'outEdges') {\n zrUtil.each(node.outEdges, function (edge) {\n if (edge.dataIndex < 0) {\n return;\n }\n\n fadeInItem(edge, hoverLineOpacityPath);\n fadeInItem(edge.node2, hoverNodeOpacityPath);\n });\n } else if (focusNodeAdj === 'inEdges') {\n zrUtil.each(node.inEdges, function (edge) {\n if (edge.dataIndex < 0) {\n return;\n }\n\n fadeInItem(edge, hoverLineOpacityPath);\n fadeInItem(edge.node1, hoverNodeOpacityPath);\n });\n } else if (focusNodeAdj === 'allEdges') {\n zrUtil.each(node.edges, function (edge) {\n if (edge.dataIndex < 0) {\n return;\n }\n\n fadeInItem(edge, hoverLineOpacityPath);\n edge.node1 !== node && fadeInItem(edge.node1, hoverNodeOpacityPath);\n edge.node2 !== node && fadeInItem(edge.node2, hoverNodeOpacityPath);\n });\n }\n }\n\n if (edge) {\n fadeInItem(edge, hoverLineOpacityPath);\n fadeInItem(edge.node1, hoverNodeOpacityPath);\n fadeInItem(edge.node2, hoverNodeOpacityPath);\n }\n },\n unfocusNodeAdjacency: function (seriesModel, ecModel, api, payload) {\n var graph = seriesModel.getGraph();\n graph.eachNode(function (node) {\n fadeOutItem(node, nodeOpacityPath);\n });\n graph.eachEdge(function (edge) {\n fadeOutItem(edge, lineOpacityPath);\n });\n }\n}); // Add animation to the view\n\n\nfunction createGridClipShape(rect, seriesModel, cb) {\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x - 10,\n y: rect.y - 10,\n width: 0,\n height: rect.height + 20\n }\n });\n graphic.initProps(rectEl, {\n shape: {\n width: rect.width + 20\n }\n }, seriesModel, cb);\n return rectEl;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar each = _util.each;\nvar createHashMap = _util.createHashMap;\n\nvar mapDataStorage = require(\"./mapDataStorage\");\n\nvar geoJSONLoader = require(\"./geoJSONLoader\");\n\nvar geoSVGLoader = require(\"./geoSVGLoader\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar loaders = {\n geoJSON: geoJSONLoader,\n svg: geoSVGLoader\n};\nvar _default = {\n /**\n * @param {string} mapName\n * @param {Object} nameMap\n * @param {string} nameProperty\n * @return {Object} source {regions, regionsMap, nameCoordMap, boundingRect}\n */\n load: function (mapName, nameMap, nameProperty) {\n var regions = [];\n var regionsMap = createHashMap();\n var nameCoordMap = createHashMap();\n var boundingRect;\n var mapRecords = retrieveMap(mapName);\n each(mapRecords, function (record) {\n var singleSource = loaders[record.type].load(mapName, record, nameProperty);\n each(singleSource.regions, function (region) {\n var regionName = region.name; // Try use the alias in geoNameMap\n\n if (nameMap && nameMap.hasOwnProperty(regionName)) {\n region = region.cloneShallow(regionName = nameMap[regionName]);\n }\n\n regions.push(region);\n regionsMap.set(regionName, region);\n nameCoordMap.set(regionName, region.center);\n });\n var rect = singleSource.boundingRect;\n\n if (rect) {\n boundingRect ? boundingRect.union(rect) : boundingRect = rect.clone();\n }\n });\n return {\n regions: regions,\n regionsMap: regionsMap,\n nameCoordMap: nameCoordMap,\n // FIXME Always return new ?\n boundingRect: boundingRect || new BoundingRect(0, 0, 0, 0)\n };\n },\n\n /**\n * @param {string} mapName\n * @param {string} hostKey For cache.\n * @return {Array.} Roots.\n */\n makeGraphic: makeInvoker('makeGraphic'),\n\n /**\n * @param {string} mapName\n * @param {string} hostKey For cache.\n */\n removeGraphic: makeInvoker('removeGraphic')\n};\n\nfunction makeInvoker(methodName) {\n return function (mapName, hostKey) {\n var mapRecords = retrieveMap(mapName);\n var results = [];\n each(mapRecords, function (record) {\n var method = loaders[record.type][methodName];\n method && results.push(method(mapName, record, hostKey));\n });\n return results;\n };\n}\n\nfunction mapNotExistsError(mapName) {}\n\nfunction retrieveMap(mapName) {\n var mapRecords = mapDataStorage.retrieveMap(mapName) || [];\n return mapRecords;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"./heatmap/HeatmapSeries\");\n\nrequire(\"./heatmap/HeatmapView\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _listComponent = require(\"../helper/listComponent\");\n\nvar makeBackground = _listComponent.makeBackground;\n\nvar layoutUtil = require(\"../../util/layout\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar Group = graphic.Group;\n\nvar _default = echarts.extendComponentView({\n type: 'legend.plain',\n newlineDisabled: false,\n\n /**\n * @override\n */\n init: function () {\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this.group.add(this._contentGroup = new Group());\n /**\n * @private\n * @type {module:zrender/Element}\n */\n\n this._backgroundEl;\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n\n this.group.add(this._selectorGroup = new Group());\n /**\n * If first rendering, `contentGroup.position` is [0, 0], which\n * does not make sense and may cause unexepcted animation if adopted.\n * @private\n * @type {boolean}\n */\n\n this._isFirstRender = true;\n },\n\n /**\n * @protected\n */\n getContentGroup: function () {\n return this._contentGroup;\n },\n\n /**\n * @protected\n */\n getSelectorGroup: function () {\n return this._selectorGroup;\n },\n\n /**\n * @override\n */\n render: function (legendModel, ecModel, api) {\n var isFirstRender = this._isFirstRender;\n this._isFirstRender = false;\n this.resetInner();\n\n if (!legendModel.get('show', true)) {\n return;\n }\n\n var itemAlign = legendModel.get('align');\n var orient = legendModel.get('orient');\n\n if (!itemAlign || itemAlign === 'auto') {\n itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left';\n }\n\n var selector = legendModel.get('selector', true);\n var selectorPosition = legendModel.get('selectorPosition', true);\n\n if (selector && (!selectorPosition || selectorPosition === 'auto')) {\n selectorPosition = orient === 'horizontal' ? 'end' : 'start';\n }\n\n this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition); // Perform layout.\n\n var positionInfo = legendModel.getBoxLayoutParams();\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var padding = legendModel.get('padding');\n var maxSize = layoutUtil.getLayoutRect(positionInfo, viewportSize, padding);\n var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition); // Place mainGroup, based on the calculated `mainRect`.\n\n var layoutRect = layoutUtil.getLayoutRect(zrUtil.defaults({\n width: mainRect.width,\n height: mainRect.height\n }, positionInfo), viewportSize, padding);\n this.group.attr('position', [layoutRect.x - mainRect.x, layoutRect.y - mainRect.y]); // Render background after group is layout.\n\n this.group.add(this._backgroundEl = makeBackground(mainRect, legendModel));\n },\n\n /**\n * @protected\n */\n resetInner: function () {\n this.getContentGroup().removeAll();\n this._backgroundEl && this.group.remove(this._backgroundEl);\n this.getSelectorGroup().removeAll();\n },\n\n /**\n * @protected\n */\n renderInner: function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var legendDrawnMap = zrUtil.createHashMap();\n var selectMode = legendModel.get('selectedMode');\n var excludeSeriesId = [];\n ecModel.eachRawSeries(function (seriesModel) {\n !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id);\n });\n each(legendModel.getData(), function (itemModel, dataIndex) {\n var name = itemModel.get('name'); // Use empty string or \\n as a newline string\n\n if (!this.newlineDisabled && (name === '' || name === '\\n')) {\n contentGroup.add(new Group({\n newline: true\n }));\n return;\n } // Representitive series.\n\n\n var seriesModel = ecModel.getSeriesByName(name)[0];\n\n if (legendDrawnMap.get(name)) {\n // Have been drawed\n return;\n } // Legend to control series.\n\n\n if (seriesModel) {\n var data = seriesModel.getData();\n var color = data.getVisual('color');\n var borderColor = data.getVisual('borderColor'); // If color is a callback function\n\n if (typeof color === 'function') {\n // Use the first data\n color = color(seriesModel.getDataParams(0));\n } // If borderColor is a callback function\n\n\n if (typeof borderColor === 'function') {\n // Use the first data\n borderColor = borderColor(seriesModel.getDataParams(0));\n } // Using rect symbol defaultly\n\n\n var legendSymbolType = data.getVisual('legendSymbol') || 'roundRect';\n var symbolType = data.getVisual('symbol');\n\n var itemGroup = this._createItem(name, dataIndex, itemModel, legendModel, legendSymbolType, symbolType, itemAlign, color, borderColor, selectMode);\n\n itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId));\n legendDrawnMap.set(name, true);\n } else {\n // Legend to control data. In pie and funnel.\n ecModel.eachRawSeries(function (seriesModel) {\n // In case multiple series has same data name\n if (legendDrawnMap.get(name)) {\n return;\n }\n\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n\n if (!provider.containName(name)) {\n return;\n }\n\n var idx = provider.indexOfName(name);\n var color = provider.getItemVisual(idx, 'color');\n var borderColor = provider.getItemVisual(idx, 'borderColor');\n var legendSymbolType = 'roundRect';\n\n var itemGroup = this._createItem(name, dataIndex, itemModel, legendModel, legendSymbolType, null, itemAlign, color, borderColor, selectMode); // FIXME: consider different series has items with the same name.\n\n\n itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId)) // Should not specify the series name, consider legend controls\n // more than one pie series.\n .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId));\n legendDrawnMap.set(name, true);\n }\n }, this);\n }\n }, this);\n\n if (selector) {\n this._createSelector(selector, legendModel, api, orient, selectorPosition);\n }\n },\n _createSelector: function (selector, legendModel, api, orient, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n each(selector, function (selectorItem) {\n createSelectorButton(selectorItem);\n });\n\n function createSelectorButton(selectorItem) {\n var type = selectorItem.type;\n var labelText = new graphic.Text({\n style: {\n x: 0,\n y: 0,\n align: 'center',\n verticalAlign: 'middle'\n },\n onclick: function () {\n api.dispatchAction({\n type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect'\n });\n }\n });\n selectorGroup.add(labelText);\n var labelModel = legendModel.getModel('selectorLabel');\n var emphasisLabelModel = legendModel.getModel('emphasis.selectorLabel');\n graphic.setLabelStyle(labelText.style, labelText.hoverStyle = {}, labelModel, emphasisLabelModel, {\n defaultText: selectorItem.title,\n isRectText: false\n });\n graphic.setHoverStyle(labelText);\n }\n },\n _createItem: function (name, dataIndex, itemModel, legendModel, legendSymbolType, symbolType, itemAlign, color, borderColor, selectMode) {\n var itemWidth = legendModel.get('itemWidth');\n var itemHeight = legendModel.get('itemHeight');\n var inactiveColor = legendModel.get('inactiveColor');\n var inactiveBorderColor = legendModel.get('inactiveBorderColor');\n var symbolKeepAspect = legendModel.get('symbolKeepAspect');\n var legendModelItemStyle = legendModel.getModel('itemStyle');\n var isSelected = legendModel.isSelected(name);\n var itemGroup = new Group();\n var textStyleModel = itemModel.getModel('textStyle');\n var itemIcon = itemModel.get('icon');\n var tooltipModel = itemModel.getModel('tooltip');\n var legendGlobalTooltipModel = tooltipModel.parentModel; // Use user given icon first\n\n legendSymbolType = itemIcon || legendSymbolType;\n var legendSymbol = createSymbol(legendSymbolType, 0, 0, itemWidth, itemHeight, isSelected ? color : inactiveColor, // symbolKeepAspect default true for legend\n symbolKeepAspect == null ? true : symbolKeepAspect);\n itemGroup.add(setSymbolStyle(legendSymbol, legendSymbolType, legendModelItemStyle, borderColor, inactiveBorderColor, isSelected)); // Compose symbols\n // PENDING\n\n if (!itemIcon && symbolType // At least show one symbol, can't be all none\n && (symbolType !== legendSymbolType || symbolType === 'none')) {\n var size = itemHeight * 0.8;\n\n if (symbolType === 'none') {\n symbolType = 'circle';\n }\n\n var legendSymbolCenter = createSymbol(symbolType, (itemWidth - size) / 2, (itemHeight - size) / 2, size, size, isSelected ? color : inactiveColor, // symbolKeepAspect default true for legend\n symbolKeepAspect == null ? true : symbolKeepAspect); // Put symbol in the center\n\n itemGroup.add(setSymbolStyle(legendSymbolCenter, symbolType, legendModelItemStyle, borderColor, inactiveBorderColor, isSelected));\n }\n\n var textX = itemAlign === 'left' ? itemWidth + 5 : -5;\n var textAlign = itemAlign;\n var formatter = legendModel.get('formatter');\n var content = name;\n\n if (typeof formatter === 'string' && formatter) {\n content = formatter.replace('{name}', name != null ? name : '');\n } else if (typeof formatter === 'function') {\n content = formatter(name);\n }\n\n itemGroup.add(new graphic.Text({\n style: graphic.setTextStyle({}, textStyleModel, {\n text: content,\n x: textX,\n y: itemHeight / 2,\n textFill: isSelected ? textStyleModel.getTextColor() : inactiveColor,\n textAlign: textAlign,\n textVerticalAlign: 'middle'\n })\n })); // Add a invisible rect to increase the area of mouse hover\n\n var hitRect = new graphic.Rect({\n shape: itemGroup.getBoundingRect(),\n invisible: true,\n tooltip: tooltipModel.get('show') ? zrUtil.extend({\n content: name,\n // Defaul formatter\n formatter: legendGlobalTooltipModel.get('formatter', true) || function () {\n return name;\n },\n formatterParams: {\n componentType: 'legend',\n legendIndex: legendModel.componentIndex,\n name: name,\n $vars: ['name']\n }\n }, tooltipModel.option) : null\n });\n itemGroup.add(hitRect);\n itemGroup.eachChild(function (child) {\n child.silent = true;\n });\n hitRect.silent = !selectMode;\n this.getContentGroup().add(itemGroup);\n graphic.setHoverStyle(itemGroup);\n itemGroup.__legendDataIndex = dataIndex;\n return itemGroup;\n },\n\n /**\n * @protected\n */\n layoutInner: function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var selectorGroup = this.getSelectorGroup(); // Place items in contentGroup.\n\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height);\n var contentRect = contentGroup.getBoundingRect();\n var contentPos = [-contentRect.x, -contentRect.y];\n\n if (selector) {\n // Place buttons in selectorGroup\n layoutUtil.box( // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var orientIdx = legendModel.getOrient().index;\n var wh = orientIdx === 0 ? 'width' : 'height';\n var hw = orientIdx === 0 ? 'height' : 'width';\n var yx = orientIdx === 0 ? 'y' : 'x';\n\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap;\n } else {\n contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;\n } //Always align selector to content as 'middle'\n\n\n selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;\n selectorGroup.attr('position', selectorPos);\n contentGroup.attr('position', contentPos);\n var mainRect = {\n x: 0,\n y: 0\n };\n mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]);\n return mainRect;\n } else {\n contentGroup.attr('position', contentPos);\n return this.group.getBoundingRect();\n }\n },\n\n /**\n * @protected\n */\n remove: function () {\n this.getContentGroup().removeAll();\n this._isFirstRender = true;\n }\n});\n\nfunction setSymbolStyle(symbol, symbolType, legendModelItemStyle, borderColor, inactiveBorderColor, isSelected) {\n var itemStyle;\n\n if (symbolType !== 'line' && symbolType.indexOf('empty') < 0) {\n itemStyle = legendModelItemStyle.getItemStyle();\n symbol.style.stroke = borderColor;\n\n if (!isSelected) {\n itemStyle.stroke = inactiveBorderColor;\n }\n } else {\n itemStyle = legendModelItemStyle.getItemStyle(['borderWidth', 'borderColor']);\n }\n\n return symbol.setStyle(itemStyle);\n}\n\nfunction dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) {\n // downplay before unselect\n dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId);\n api.dispatchAction({\n type: 'legendToggleSelect',\n name: seriesName != null ? seriesName : dataName\n }); // highlight after select\n\n dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId);\n}\n\nfunction dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n var el = api.getZr().storage.getDisplayList()[0];\n\n if (!(el && el.useHoverLayer)) {\n api.dispatchAction({\n type: 'highlight',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\n\nfunction dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n var el = api.getZr().storage.getDisplayList()[0];\n\n if (!(el && el.useHoverLayer)) {\n api.dispatchAction({\n type: 'downplay',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar zrColor = require(\"zrender/lib/tool/color\");\n\nvar _number = require(\"../util/number\");\n\nvar linearMap = _number.linearMap;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\nvar CATEGORY_DEFAULT_VISUAL_INDEX = -1;\n/**\n * @param {Object} option\n * @param {string} [option.type] See visualHandlers.\n * @param {string} [option.mappingMethod] 'linear' or 'piecewise' or 'category' or 'fixed'\n * @param {Array.=} [option.dataExtent] [minExtent, maxExtent],\n * required when mappingMethod is 'linear'\n * @param {Array.=} [option.pieceList] [\n * {value: someValue},\n * {interval: [min1, max1], visual: {...}},\n * {interval: [min2, max2]}\n * ],\n * required when mappingMethod is 'piecewise'.\n * Visual for only each piece can be specified.\n * @param {Array.=} [option.categories] ['cate1', 'cate2']\n * required when mappingMethod is 'category'.\n * If no option.categories, categories is set\n * as [0, 1, 2, ...].\n * @param {boolean} [option.loop=false] Whether loop mapping when mappingMethod is 'category'.\n * @param {(Array|Object|*)} [option.visual] Visual data.\n * when mappingMethod is 'category',\n * visual data can be array or object\n * (like: {cate1: '#222', none: '#fff'})\n * or primary types (which represents\n * default category visual), otherwise visual\n * can be array or primary (which will be\n * normalized to array).\n *\n */\n\nvar VisualMapping = function (option) {\n var mappingMethod = option.mappingMethod;\n var visualType = option.type;\n /**\n * @readOnly\n * @type {Object}\n */\n\n var thisOption = this.option = zrUtil.clone(option);\n /**\n * @readOnly\n * @type {string}\n */\n\n this.type = visualType;\n /**\n * @readOnly\n * @type {string}\n */\n\n this.mappingMethod = mappingMethod;\n /**\n * @private\n * @type {Function}\n */\n\n this._normalizeData = normalizers[mappingMethod];\n var visualHandler = visualHandlers[visualType];\n /**\n * @public\n * @type {Function}\n */\n\n this.applyVisual = visualHandler.applyVisual;\n /**\n * @public\n * @type {Function}\n */\n\n this.getColorMapper = visualHandler.getColorMapper;\n /**\n * @private\n * @type {Function}\n */\n\n this._doMap = visualHandler._doMap[mappingMethod];\n\n if (mappingMethod === 'piecewise') {\n normalizeVisualRange(thisOption);\n preprocessForPiecewise(thisOption);\n } else if (mappingMethod === 'category') {\n thisOption.categories ? preprocessForSpecifiedCategory(thisOption) // categories is ordinal when thisOption.categories not specified,\n // which need no more preprocess except normalize visual.\n : normalizeVisualRange(thisOption, true);\n } else {\n // mappingMethod === 'linear' or 'fixed'\n zrUtil.assert(mappingMethod !== 'linear' || thisOption.dataExtent);\n normalizeVisualRange(thisOption);\n }\n};\n\nVisualMapping.prototype = {\n constructor: VisualMapping,\n mapValueToVisual: function (value) {\n var normalized = this._normalizeData(value);\n\n return this._doMap(normalized, value);\n },\n getNormalizer: function () {\n return zrUtil.bind(this._normalizeData, this);\n }\n};\nvar visualHandlers = VisualMapping.visualHandlers = {\n color: {\n applyVisual: makeApplyVisual('color'),\n\n /**\n * Create a mapper function\n * @return {Function}\n */\n getColorMapper: function () {\n var thisOption = this.option;\n return zrUtil.bind(thisOption.mappingMethod === 'category' ? function (value, isNormalized) {\n !isNormalized && (value = this._normalizeData(value));\n return doMapCategory.call(this, value);\n } : function (value, isNormalized, out) {\n // If output rgb array\n // which will be much faster and useful in pixel manipulation\n var returnRGBArray = !!out;\n !isNormalized && (value = this._normalizeData(value));\n out = zrColor.fastLerp(value, thisOption.parsedVisual, out);\n return returnRGBArray ? out : zrColor.stringify(out, 'rgba');\n }, this);\n },\n _doMap: {\n linear: function (normalized) {\n return zrColor.stringify(zrColor.fastLerp(normalized, this.option.parsedVisual), 'rgba');\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n\n if (result == null) {\n result = zrColor.stringify(zrColor.fastLerp(normalized, this.option.parsedVisual), 'rgba');\n }\n\n return result;\n },\n fixed: doMapFixed\n }\n },\n colorHue: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, value);\n }),\n colorSaturation: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, value);\n }),\n colorLightness: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyHSL(color, null, null, value);\n }),\n colorAlpha: makePartialColorVisualHandler(function (color, value) {\n return zrColor.modifyAlpha(color, value);\n }),\n opacity: {\n applyVisual: makeApplyVisual('opacity'),\n _doMap: makeDoMap([0, 1])\n },\n liftZ: {\n applyVisual: makeApplyVisual('liftZ'),\n _doMap: {\n linear: doMapFixed,\n category: doMapFixed,\n piecewise: doMapFixed,\n fixed: doMapFixed\n }\n },\n symbol: {\n applyVisual: function (value, getter, setter) {\n var symbolCfg = this.mapValueToVisual(value);\n\n if (zrUtil.isString(symbolCfg)) {\n setter('symbol', symbolCfg);\n } else if (isObject(symbolCfg)) {\n for (var name in symbolCfg) {\n if (symbolCfg.hasOwnProperty(name)) {\n setter(name, symbolCfg[name]);\n }\n }\n }\n },\n _doMap: {\n linear: doMapToArray,\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n\n if (result == null) {\n result = doMapToArray.call(this, normalized);\n }\n\n return result;\n },\n fixed: doMapFixed\n }\n },\n symbolSize: {\n applyVisual: makeApplyVisual('symbolSize'),\n _doMap: makeDoMap([0, 1])\n }\n};\n\nfunction preprocessForPiecewise(thisOption) {\n var pieceList = thisOption.pieceList;\n thisOption.hasSpecialVisual = false;\n zrUtil.each(pieceList, function (piece, index) {\n piece.originIndex = index; // piece.visual is \"result visual value\" but not\n // a visual range, so it does not need to be normalized.\n\n if (piece.visual != null) {\n thisOption.hasSpecialVisual = true;\n }\n });\n}\n\nfunction preprocessForSpecifiedCategory(thisOption) {\n // Hash categories.\n var categories = thisOption.categories;\n var visual = thisOption.visual;\n var categoryMap = thisOption.categoryMap = {};\n each(categories, function (cate, index) {\n categoryMap[cate] = index;\n }); // Process visual map input.\n\n if (!zrUtil.isArray(visual)) {\n var visualArr = [];\n\n if (zrUtil.isObject(visual)) {\n each(visual, function (v, cate) {\n var index = categoryMap[cate];\n visualArr[index != null ? index : CATEGORY_DEFAULT_VISUAL_INDEX] = v;\n });\n } else {\n // Is primary type, represents default visual.\n visualArr[CATEGORY_DEFAULT_VISUAL_INDEX] = visual;\n }\n\n visual = setVisualToOption(thisOption, visualArr);\n } // Remove categories that has no visual,\n // then we can mapping them to CATEGORY_DEFAULT_VISUAL_INDEX.\n\n\n for (var i = categories.length - 1; i >= 0; i--) {\n if (visual[i] == null) {\n delete categoryMap[categories[i]];\n categories.pop();\n }\n }\n}\n\nfunction normalizeVisualRange(thisOption, isCategory) {\n var visual = thisOption.visual;\n var visualArr = [];\n\n if (zrUtil.isObject(visual)) {\n each(visual, function (v) {\n visualArr.push(v);\n });\n } else if (visual != null) {\n visualArr.push(visual);\n }\n\n var doNotNeedPair = {\n color: 1,\n symbol: 1\n };\n\n if (!isCategory && visualArr.length === 1 && !doNotNeedPair.hasOwnProperty(thisOption.type)) {\n // Do not care visualArr.length === 0, which is illegal.\n visualArr[1] = visualArr[0];\n }\n\n setVisualToOption(thisOption, visualArr);\n}\n\nfunction makePartialColorVisualHandler(applyValue) {\n return {\n applyVisual: function (value, getter, setter) {\n value = this.mapValueToVisual(value); // Must not be array value\n\n setter('color', applyValue(getter('color'), value));\n },\n _doMap: makeDoMap([0, 1])\n };\n}\n\nfunction doMapToArray(normalized) {\n var visual = this.option.visual;\n return visual[Math.round(linearMap(normalized, [0, 1], [0, visual.length - 1], true))] || {};\n}\n\nfunction makeApplyVisual(visualType) {\n return function (value, getter, setter) {\n setter(visualType, this.mapValueToVisual(value));\n };\n}\n\nfunction doMapCategory(normalized) {\n var visual = this.option.visual;\n return visual[this.option.loop && normalized !== CATEGORY_DEFAULT_VISUAL_INDEX ? normalized % visual.length : normalized];\n}\n\nfunction doMapFixed() {\n return this.option.visual[0];\n}\n\nfunction makeDoMap(sourceExtent) {\n return {\n linear: function (normalized) {\n return linearMap(normalized, sourceExtent, this.option.visual, true);\n },\n category: doMapCategory,\n piecewise: function (normalized, value) {\n var result = getSpecifiedVisual.call(this, value);\n\n if (result == null) {\n result = linearMap(normalized, sourceExtent, this.option.visual, true);\n }\n\n return result;\n },\n fixed: doMapFixed\n };\n}\n\nfunction getSpecifiedVisual(value) {\n var thisOption = this.option;\n var pieceList = thisOption.pieceList;\n\n if (thisOption.hasSpecialVisual) {\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList);\n var piece = pieceList[pieceIndex];\n\n if (piece && piece.visual) {\n return piece.visual[this.type];\n }\n }\n}\n\nfunction setVisualToOption(thisOption, visualArr) {\n thisOption.visual = visualArr;\n\n if (thisOption.type === 'color') {\n thisOption.parsedVisual = zrUtil.map(visualArr, function (item) {\n return zrColor.parse(item);\n });\n }\n\n return visualArr;\n}\n/**\n * Normalizers by mapping methods.\n */\n\n\nvar normalizers = {\n linear: function (value) {\n return linearMap(value, this.option.dataExtent, [0, 1], true);\n },\n piecewise: function (value) {\n var pieceList = this.option.pieceList;\n var pieceIndex = VisualMapping.findPieceIndex(value, pieceList, true);\n\n if (pieceIndex != null) {\n return linearMap(pieceIndex, [0, pieceList.length - 1], [0, 1], true);\n }\n },\n category: function (value) {\n var index = this.option.categories ? this.option.categoryMap[value] : value; // ordinal\n\n return index == null ? CATEGORY_DEFAULT_VISUAL_INDEX : index;\n },\n fixed: zrUtil.noop\n};\n/**\n * List available visual types.\n *\n * @public\n * @return {Array.}\n */\n\nVisualMapping.listVisualTypes = function () {\n var visualTypes = [];\n zrUtil.each(visualHandlers, function (handler, key) {\n visualTypes.push(key);\n });\n return visualTypes;\n};\n/**\n * @public\n */\n\n\nVisualMapping.addVisualHandler = function (name, handler) {\n visualHandlers[name] = handler;\n};\n/**\n * @public\n */\n\n\nVisualMapping.isValidType = function (visualType) {\n return visualHandlers.hasOwnProperty(visualType);\n};\n/**\n * Convinent method.\n * Visual can be Object or Array or primary type.\n *\n * @public\n */\n\n\nVisualMapping.eachVisual = function (visual, callback, context) {\n if (zrUtil.isObject(visual)) {\n zrUtil.each(visual, callback, context);\n } else {\n callback.call(context, visual);\n }\n};\n\nVisualMapping.mapVisual = function (visual, callback, context) {\n var isPrimary;\n var newVisual = zrUtil.isArray(visual) ? [] : zrUtil.isObject(visual) ? {} : (isPrimary = true, null);\n VisualMapping.eachVisual(visual, function (v, key) {\n var newVal = callback.call(context, v, key);\n isPrimary ? newVisual = newVal : newVisual[key] = newVal;\n });\n return newVisual;\n};\n/**\n * @public\n * @param {Object} obj\n * @return {Object} new object containers visual values.\n * If no visuals, return null.\n */\n\n\nVisualMapping.retrieveVisuals = function (obj) {\n var ret = {};\n var hasVisual;\n obj && each(visualHandlers, function (h, visualType) {\n if (obj.hasOwnProperty(visualType)) {\n ret[visualType] = obj[visualType];\n hasVisual = true;\n }\n });\n return hasVisual ? ret : null;\n};\n/**\n * Give order to visual types, considering colorSaturation, colorAlpha depends on color.\n *\n * @public\n * @param {(Object|Array)} visualTypes If Object, like: {color: ..., colorSaturation: ...}\n * IF Array, like: ['color', 'symbol', 'colorSaturation']\n * @return {Array.} Sorted visual types.\n */\n\n\nVisualMapping.prepareVisualTypes = function (visualTypes) {\n if (isObject(visualTypes)) {\n var types = [];\n each(visualTypes, function (item, type) {\n types.push(type);\n });\n visualTypes = types;\n } else if (zrUtil.isArray(visualTypes)) {\n visualTypes = visualTypes.slice();\n } else {\n return [];\n }\n\n visualTypes.sort(function (type1, type2) {\n // color should be front of colorSaturation, colorAlpha, ...\n // symbol and symbolSize do not matter.\n return type2 === 'color' && type1 !== 'color' && type1.indexOf('color') === 0 ? 1 : -1;\n });\n return visualTypes;\n};\n/**\n * 'color', 'colorSaturation', 'colorAlpha', ... are depends on 'color'.\n * Other visuals are only depends on themself.\n *\n * @public\n * @param {string} visualType1\n * @param {string} visualType2\n * @return {boolean}\n */\n\n\nVisualMapping.dependsOn = function (visualType1, visualType2) {\n return visualType2 === 'color' ? !!(visualType1 && visualType1.indexOf(visualType2) === 0) : visualType1 === visualType2;\n};\n/**\n * @param {number} value\n * @param {Array.} pieceList [{value: ..., interval: [min, max]}, ...]\n * Always from small to big.\n * @param {boolean} [findClosestWhenOutside=false]\n * @return {number} index\n */\n\n\nVisualMapping.findPieceIndex = function (value, pieceList, findClosestWhenOutside) {\n var possibleI;\n var abs = Infinity; // value has the higher priority.\n\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var pieceValue = pieceList[i].value;\n\n if (pieceValue != null) {\n if (pieceValue === value // FIXME\n // It is supposed to compare value according to value type of dimension,\n // but currently value type can exactly be string or number.\n // Compromise for numeric-like string (like '12'), especially\n // in the case that visualMap.categories is ['22', '33'].\n || typeof pieceValue === 'string' && pieceValue === value + '') {\n return i;\n }\n\n findClosestWhenOutside && updatePossible(pieceValue, i);\n }\n }\n\n for (var i = 0, len = pieceList.length; i < len; i++) {\n var piece = pieceList[i];\n var interval = piece.interval;\n var close = piece.close;\n\n if (interval) {\n if (interval[0] === -Infinity) {\n if (littleThan(close[1], value, interval[1])) {\n return i;\n }\n } else if (interval[1] === Infinity) {\n if (littleThan(close[0], interval[0], value)) {\n return i;\n }\n } else if (littleThan(close[0], interval[0], value) && littleThan(close[1], value, interval[1])) {\n return i;\n }\n\n findClosestWhenOutside && updatePossible(interval[0], i);\n findClosestWhenOutside && updatePossible(interval[1], i);\n }\n }\n\n if (findClosestWhenOutside) {\n return value === Infinity ? pieceList.length - 1 : value === -Infinity ? 0 : possibleI;\n }\n\n function updatePossible(val, index) {\n var newAbs = Math.abs(val - value);\n\n if (newAbs < abs) {\n abs = newAbs;\n possibleI = index;\n }\n }\n};\n\nfunction littleThan(close, a, b) {\n return close ? a <= b : a < b;\n}\n\nvar _default = VisualMapping;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar ChartView = require(\"../../view/Chart\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar DEFAULT_SMOOTH = 0.3;\nvar ParallelView = ChartView.extend({\n type: 'parallel',\n init: function () {\n /**\n * @type {module:zrender/container/Group}\n * @private\n */\n this._dataGroup = new graphic.Group();\n this.group.add(this._dataGroup);\n /**\n * @type {module:echarts/data/List}\n */\n\n this._data;\n /**\n * @type {boolean}\n */\n\n this._initialized;\n },\n\n /**\n * @override\n */\n render: function (seriesModel, ecModel, api, payload) {\n var dataGroup = this._dataGroup;\n var data = seriesModel.getData();\n var oldData = this._data;\n var coordSys = seriesModel.coordinateSystem;\n var dimensions = coordSys.dimensions;\n var seriesScope = makeSeriesScope(seriesModel);\n data.diff(oldData).add(add).update(update).remove(remove).execute();\n\n function add(newDataIndex) {\n var line = addEl(data, dataGroup, newDataIndex, dimensions, coordSys);\n updateElCommon(line, data, newDataIndex, seriesScope);\n }\n\n function update(newDataIndex, oldDataIndex) {\n var line = oldData.getItemGraphicEl(oldDataIndex);\n var points = createLinePoints(data, newDataIndex, dimensions, coordSys);\n data.setItemGraphicEl(newDataIndex, line);\n var animationModel = payload && payload.animation === false ? null : seriesModel;\n graphic.updateProps(line, {\n shape: {\n points: points\n }\n }, animationModel, newDataIndex);\n updateElCommon(line, data, newDataIndex, seriesScope);\n }\n\n function remove(oldDataIndex) {\n var line = oldData.getItemGraphicEl(oldDataIndex);\n dataGroup.remove(line);\n } // First create\n\n\n if (!this._initialized) {\n this._initialized = true;\n var clipPath = createGridClipShape(coordSys, seriesModel, function () {\n // Callback will be invoked immediately if there is no animation\n setTimeout(function () {\n dataGroup.removeClipPath();\n });\n });\n dataGroup.setClipPath(clipPath);\n }\n\n this._data = data;\n },\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n this._initialized = true;\n this._data = null;\n\n this._dataGroup.removeAll();\n },\n incrementalRender: function (taskParams, seriesModel, ecModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var dimensions = coordSys.dimensions;\n var seriesScope = makeSeriesScope(seriesModel);\n\n for (var dataIndex = taskParams.start; dataIndex < taskParams.end; dataIndex++) {\n var line = addEl(data, this._dataGroup, dataIndex, dimensions, coordSys);\n line.incremental = true;\n updateElCommon(line, data, dataIndex, seriesScope);\n }\n },\n dispose: function () {},\n // _renderForProgressive: function (seriesModel) {\n // var dataGroup = this._dataGroup;\n // var data = seriesModel.getData();\n // var oldData = this._data;\n // var coordSys = seriesModel.coordinateSystem;\n // var dimensions = coordSys.dimensions;\n // var option = seriesModel.option;\n // var progressive = option.progressive;\n // var smooth = option.smooth ? SMOOTH : null;\n // // In progressive animation is disabled, so use simple data diff,\n // // which effects performance less.\n // // (Typically performance for data with length 7000+ like:\n // // simpleDiff: 60ms, addEl: 184ms,\n // // in RMBP 2.4GHz intel i7, OSX 10.9 chrome 50.0.2661.102 (64-bit))\n // if (simpleDiff(oldData, data, dimensions)) {\n // dataGroup.removeAll();\n // data.each(function (dataIndex) {\n // addEl(data, dataGroup, dataIndex, dimensions, coordSys);\n // });\n // }\n // updateElCommon(data, progressive, smooth);\n // // Consider switch between progressive and not.\n // data.__plProgressive = true;\n // this._data = data;\n // },\n\n /**\n * @override\n */\n remove: function () {\n this._dataGroup && this._dataGroup.removeAll();\n this._data = null;\n }\n});\n\nfunction createGridClipShape(coordSys, seriesModel, cb) {\n var parallelModel = coordSys.model;\n var rect = coordSys.getRect();\n var rectEl = new graphic.Rect({\n shape: {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n }\n });\n var dim = parallelModel.get('layout') === 'horizontal' ? 'width' : 'height';\n rectEl.setShape(dim, 0);\n graphic.initProps(rectEl, {\n shape: {\n width: rect.width,\n height: rect.height\n }\n }, seriesModel, cb);\n return rectEl;\n}\n\nfunction createLinePoints(data, dataIndex, dimensions, coordSys) {\n var points = [];\n\n for (var i = 0; i < dimensions.length; i++) {\n var dimName = dimensions[i];\n var value = data.get(data.mapDimension(dimName), dataIndex);\n\n if (!isEmptyValue(value, coordSys.getAxis(dimName).type)) {\n points.push(coordSys.dataToPoint(value, dimName));\n }\n }\n\n return points;\n}\n\nfunction addEl(data, dataGroup, dataIndex, dimensions, coordSys) {\n var points = createLinePoints(data, dataIndex, dimensions, coordSys);\n var line = new graphic.Polyline({\n shape: {\n points: points\n },\n silent: true,\n z2: 10\n });\n dataGroup.add(line);\n data.setItemGraphicEl(dataIndex, line);\n return line;\n}\n\nfunction makeSeriesScope(seriesModel) {\n var smooth = seriesModel.get('smooth', true);\n smooth === true && (smooth = DEFAULT_SMOOTH);\n return {\n lineStyle: seriesModel.getModel('lineStyle').getLineStyle(),\n smooth: smooth != null ? smooth : DEFAULT_SMOOTH\n };\n}\n\nfunction updateElCommon(el, data, dataIndex, seriesScope) {\n var lineStyle = seriesScope.lineStyle;\n\n if (data.hasItemOption) {\n var lineStyleModel = data.getItemModel(dataIndex).getModel('lineStyle');\n lineStyle = lineStyleModel.getLineStyle();\n }\n\n el.useStyle(lineStyle);\n var elStyle = el.style;\n elStyle.fill = null; // lineStyle.color have been set to itemVisual in module:echarts/visual/seriesColor.\n\n elStyle.stroke = data.getItemVisual(dataIndex, 'color'); // lineStyle.opacity have been set to itemVisual in parallelVisual.\n\n elStyle.opacity = data.getItemVisual(dataIndex, 'opacity');\n seriesScope.smooth && (el.shape.smooth = seriesScope.smooth);\n} // function simpleDiff(oldData, newData, dimensions) {\n// var oldLen;\n// if (!oldData\n// || !oldData.__plProgressive\n// || (oldLen = oldData.count()) !== newData.count()\n// ) {\n// return true;\n// }\n// var dimLen = dimensions.length;\n// for (var i = 0; i < oldLen; i++) {\n// for (var j = 0; j < dimLen; j++) {\n// if (oldData.get(dimensions[j], i) !== newData.get(dimensions[j], i)) {\n// return true;\n// }\n// }\n// }\n// return false;\n// }\n// FIXME\n// 公用方法?\n\n\nfunction isEmptyValue(val, axisType) {\n return axisType === 'category' ? val == null : val == null || isNaN(val); // axisType === 'value'\n}\n\nvar _default = ParallelView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @file Visual mapping.\n */\nvar visualDefault = {\n /**\n * @public\n */\n get: function (visualType, key, isCategory) {\n var value = zrUtil.clone((defaultOption[visualType] || {})[key]);\n return isCategory ? zrUtil.isArray(value) ? value[value.length - 1] : value : value;\n }\n};\nvar defaultOption = {\n color: {\n active: ['#006edd', '#e0ffff'],\n inactive: ['rgba(0,0,0,0)']\n },\n colorHue: {\n active: [0, 360],\n inactive: [0, 0]\n },\n colorSaturation: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n colorLightness: {\n active: [0.9, 0.5],\n inactive: [0, 0]\n },\n colorAlpha: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n opacity: {\n active: [0.3, 1],\n inactive: [0, 0]\n },\n symbol: {\n active: ['circle', 'roundRect', 'diamond'],\n inactive: ['none']\n },\n symbolSize: {\n active: [10, 50],\n inactive: [0, 0]\n }\n};\nvar _default = visualDefault;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar echarts = require(\"../echarts\");\n\nvar graphic = require(\"../util/graphic\");\n\nvar _layout = require(\"../util/layout\");\n\nvar getLayoutRect = _layout.getLayoutRect;\n\nvar _format = require(\"../util/format\");\n\nvar windowOpen = _format.windowOpen;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Model\necharts.extendComponentModel({\n type: 'title',\n layoutMode: {\n type: 'box',\n ignoreSize: true\n },\n defaultOption: {\n // 一级层叠\n zlevel: 0,\n // 二级层叠\n z: 6,\n show: true,\n text: '',\n // 超链接跳转\n // link: null,\n // 仅支持self | blank\n target: 'blank',\n subtext: '',\n // 超链接跳转\n // sublink: null,\n // 仅支持self | blank\n subtarget: 'blank',\n // 'center' ¦ 'left' ¦ 'right'\n // ¦ {number}(x坐标,单位px)\n left: 0,\n // 'top' ¦ 'bottom' ¦ 'center'\n // ¦ {number}(y坐标,单位px)\n top: 0,\n // 水平对齐\n // 'auto' | 'left' | 'right' | 'center'\n // 默认根据 left 的位置判断是左对齐还是右对齐\n // textAlign: null\n //\n // 垂直对齐\n // 'auto' | 'top' | 'bottom' | 'middle'\n // 默认根据 top 位置判断是上对齐还是下对齐\n // textVerticalAlign: null\n // textBaseline: null // The same as textVerticalAlign.\n backgroundColor: 'rgba(0,0,0,0)',\n // 标题边框颜色\n borderColor: '#ccc',\n // 标题边框线宽,单位px,默认为0(无边框)\n borderWidth: 0,\n // 标题内边距,单位px,默认各方向内边距为5,\n // 接受数组分别设定上右下左边距,同css\n padding: 5,\n // 主副标题纵向间隔,单位px,默认为10,\n itemGap: 10,\n textStyle: {\n fontSize: 18,\n fontWeight: 'bolder',\n color: '#333'\n },\n subtextStyle: {\n color: '#aaa'\n }\n }\n}); // View\n\necharts.extendComponentView({\n type: 'title',\n render: function (titleModel, ecModel, api) {\n this.group.removeAll();\n\n if (!titleModel.get('show')) {\n return;\n }\n\n var group = this.group;\n var textStyleModel = titleModel.getModel('textStyle');\n var subtextStyleModel = titleModel.getModel('subtextStyle');\n var textAlign = titleModel.get('textAlign');\n var textVerticalAlign = zrUtil.retrieve2(titleModel.get('textBaseline'), titleModel.get('textVerticalAlign'));\n var textEl = new graphic.Text({\n style: graphic.setTextStyle({}, textStyleModel, {\n text: titleModel.get('text'),\n textFill: textStyleModel.getTextColor()\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var textRect = textEl.getBoundingRect();\n var subText = titleModel.get('subtext');\n var subTextEl = new graphic.Text({\n style: graphic.setTextStyle({}, subtextStyleModel, {\n text: subText,\n textFill: subtextStyleModel.getTextColor(),\n y: textRect.height + titleModel.get('itemGap'),\n textVerticalAlign: 'top'\n }, {\n disableBox: true\n }),\n z2: 10\n });\n var link = titleModel.get('link');\n var sublink = titleModel.get('sublink');\n var triggerEvent = titleModel.get('triggerEvent', true);\n textEl.silent = !link && !triggerEvent;\n subTextEl.silent = !sublink && !triggerEvent;\n\n if (link) {\n textEl.on('click', function () {\n windowOpen(link, '_' + titleModel.get('target'));\n });\n }\n\n if (sublink) {\n subTextEl.on('click', function () {\n windowOpen(sublink, '_' + titleModel.get('subtarget'));\n });\n }\n\n textEl.eventData = subTextEl.eventData = triggerEvent ? {\n componentType: 'title',\n componentIndex: titleModel.componentIndex\n } : null;\n group.add(textEl);\n subText && group.add(subTextEl); // If no subText, but add subTextEl, there will be an empty line.\n\n var groupRect = group.getBoundingRect();\n var layoutOption = titleModel.getBoxLayoutParams();\n layoutOption.width = groupRect.width;\n layoutOption.height = groupRect.height;\n var layoutRect = getLayoutRect(layoutOption, {\n width: api.getWidth(),\n height: api.getHeight()\n }, titleModel.get('padding')); // Adjust text align based on position\n\n if (!textAlign) {\n // Align left if title is on the left. center and right is same\n textAlign = titleModel.get('left') || titleModel.get('right');\n\n if (textAlign === 'middle') {\n textAlign = 'center';\n } // Adjust layout by text align\n\n\n if (textAlign === 'right') {\n layoutRect.x += layoutRect.width;\n } else if (textAlign === 'center') {\n layoutRect.x += layoutRect.width / 2;\n }\n }\n\n if (!textVerticalAlign) {\n textVerticalAlign = titleModel.get('top') || titleModel.get('bottom');\n\n if (textVerticalAlign === 'center') {\n textVerticalAlign = 'middle';\n }\n\n if (textVerticalAlign === 'bottom') {\n layoutRect.y += layoutRect.height;\n } else if (textVerticalAlign === 'middle') {\n layoutRect.y += layoutRect.height / 2;\n }\n\n textVerticalAlign = textVerticalAlign || 'top';\n }\n\n group.attr('position', [layoutRect.x, layoutRect.y]);\n var alignStyle = {\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n textEl.setStyle(alignStyle);\n subTextEl.setStyle(alignStyle); // Render background\n // Get groupRect again because textAlign has been changed\n\n groupRect = group.getBoundingRect();\n var padding = layoutRect.margin;\n var style = titleModel.getItemStyle(['color', 'opacity']);\n style.fill = titleModel.get('backgroundColor');\n var rect = new graphic.Rect({\n shape: {\n x: groupRect.x - padding[3],\n y: groupRect.y - padding[0],\n width: groupRect.width + padding[1] + padding[3],\n height: groupRect.height + padding[0] + padding[2],\n r: titleModel.get('borderRadius')\n },\n style: style,\n subPixelOptimize: true,\n silent: true\n });\n group.add(rect);\n }\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar modelUtil = require(\"../../util/model\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(option) {\n createParallelIfNeeded(option);\n mergeAxisOptionFromParallel(option);\n}\n/**\n * Create a parallel coordinate if not exists.\n * @inner\n */\n\n\nfunction createParallelIfNeeded(option) {\n if (option.parallel) {\n return;\n }\n\n var hasParallelSeries = false;\n zrUtil.each(option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'parallel') {\n hasParallelSeries = true;\n }\n });\n\n if (hasParallelSeries) {\n option.parallel = [{}];\n }\n}\n/**\n * Merge aixs definition from parallel option (if exists) to axis option.\n * @inner\n */\n\n\nfunction mergeAxisOptionFromParallel(option) {\n var axes = modelUtil.normalizeToArray(option.parallelAxis);\n zrUtil.each(axes, function (axisOption) {\n if (!zrUtil.isObject(axisOption)) {\n return;\n }\n\n var parallelIndex = axisOption.parallelIndex || 0;\n var parallelOption = modelUtil.normalizeToArray(option.parallel)[parallelIndex];\n\n if (parallelOption && parallelOption.parallelAxisDefault) {\n zrUtil.merge(axisOption, parallelOption.parallelAxisDefault, false);\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar createRenderPlanner = require(\"../helper/createRenderPlanner\");\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/* global Float32Array */\nvar _default = {\n seriesType: 'lines',\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var isPolyline = seriesModel.get('polyline');\n var isLarge = seriesModel.pipelineContext.large;\n\n function progress(params, lineData) {\n var lineCoords = [];\n\n if (isLarge) {\n var points;\n var segCount = params.end - params.start;\n\n if (isPolyline) {\n var totalCoordsCount = 0;\n\n for (var i = params.start; i < params.end; i++) {\n totalCoordsCount += seriesModel.getLineCoordsCount(i);\n }\n\n points = new Float32Array(segCount + totalCoordsCount * 2);\n } else {\n points = new Float32Array(segCount * 4);\n }\n\n var offset = 0;\n var pt = [];\n\n for (var i = params.start; i < params.end; i++) {\n var len = seriesModel.getLineCoords(i, lineCoords);\n\n if (isPolyline) {\n points[offset++] = len;\n }\n\n for (var k = 0; k < len; k++) {\n pt = coordSys.dataToPoint(lineCoords[k], false, pt);\n points[offset++] = pt[0];\n points[offset++] = pt[1];\n }\n }\n\n lineData.setLayout('linesPoints', points);\n } else {\n for (var i = params.start; i < params.end; i++) {\n var itemModel = lineData.getItemModel(i);\n var len = seriesModel.getLineCoords(i, lineCoords);\n var pts = [];\n\n if (isPolyline) {\n for (var j = 0; j < len; j++) {\n pts.push(coordSys.dataToPoint(lineCoords[j]));\n }\n } else {\n pts[0] = coordSys.dataToPoint(lineCoords[0]);\n pts[1] = coordSys.dataToPoint(lineCoords[1]);\n var curveness = itemModel.get('lineStyle.curveness');\n\n if (+curveness) {\n pts[2] = [(pts[0][0] + pts[1][0]) / 2 - (pts[0][1] - pts[1][1]) * curveness, (pts[0][1] + pts[1][1]) / 2 - (pts[1][0] - pts[0][0]) * curveness];\n }\n }\n\n lineData.setItemLayout(i, pts);\n }\n }\n }\n\n return {\n progress: progress\n };\n }\n};\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(option) {\n var timelineOpt = option && option.timeline;\n\n if (!zrUtil.isArray(timelineOpt)) {\n timelineOpt = timelineOpt ? [timelineOpt] : [];\n }\n\n zrUtil.each(timelineOpt, function (opt) {\n if (!opt) {\n return;\n }\n\n compatibleEC2(opt);\n });\n}\n\nfunction compatibleEC2(opt) {\n var type = opt.type;\n var ec2Types = {\n 'number': 'value',\n 'time': 'time'\n }; // Compatible with ec2\n\n if (ec2Types[type]) {\n opt.axisType = ec2Types[type];\n delete opt.type;\n }\n\n transferItem(opt);\n\n if (has(opt, 'controlPosition')) {\n var controlStyle = opt.controlStyle || (opt.controlStyle = {});\n\n if (!has(controlStyle, 'position')) {\n controlStyle.position = opt.controlPosition;\n }\n\n if (controlStyle.position === 'none' && !has(controlStyle, 'show')) {\n controlStyle.show = false;\n delete controlStyle.position;\n }\n\n delete opt.controlPosition;\n }\n\n zrUtil.each(opt.data || [], function (dataItem) {\n if (zrUtil.isObject(dataItem) && !zrUtil.isArray(dataItem)) {\n if (!has(dataItem, 'value') && has(dataItem, 'name')) {\n // In ec2, using name as value.\n dataItem.value = dataItem.name;\n }\n\n transferItem(dataItem);\n }\n });\n}\n\nfunction transferItem(opt) {\n var itemStyle = opt.itemStyle || (opt.itemStyle = {});\n var itemStyleEmphasis = itemStyle.emphasis || (itemStyle.emphasis = {}); // Transfer label out\n\n var label = opt.label || opt.label || {};\n var labelNormal = label.normal || (label.normal = {});\n var excludeLabelAttr = {\n normal: 1,\n emphasis: 1\n };\n zrUtil.each(label, function (value, name) {\n if (!excludeLabelAttr[name] && !has(labelNormal, name)) {\n labelNormal[name] = value;\n }\n });\n\n if (itemStyleEmphasis.label && !has(label, 'emphasis')) {\n label.emphasis = itemStyleEmphasis.label;\n delete itemStyleEmphasis.label;\n }\n}\n\nfunction has(obj, attr) {\n return obj.hasOwnProperty(attr);\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Axis = require(\"../Axis\");\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 * @constructor module:echarts/coord/single/SingleAxis\n * @extends {module:echarts/coord/Axis}\n * @param {string} dim\n * @param {*} scale\n * @param {Array.} coordExtent\n * @param {string} axisType\n * @param {string} position\n */\nvar SingleAxis = function (dim, scale, coordExtent, axisType, position) {\n Axis.call(this, dim, scale, coordExtent);\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n\n this.type = axisType || 'value';\n /**\n * Axis position\n * - 'top'\n * - 'bottom'\n * - 'left'\n * - 'right'\n * @type {string}\n */\n\n this.position = position || 'bottom';\n /**\n * Axis orient\n * - 'horizontal'\n * - 'vertical'\n * @type {[type]}\n */\n\n this.orient = null;\n};\n\nSingleAxis.prototype = {\n constructor: SingleAxis,\n\n /**\n * Axis model\n * @type {module:echarts/coord/single/AxisModel}\n */\n model: null,\n\n /**\n * Judge the orient of the axis.\n * @return {boolean}\n */\n isHorizontal: function () {\n var position = this.position;\n return position === 'top' || position === 'bottom';\n },\n\n /**\n * @override\n */\n pointToData: function (point, clamp) {\n return this.coordinateSystem.pointToData(point, clamp)[0];\n },\n\n /**\n * Convert the local coord(processed by dataToCoord())\n * to global coord(concrete pixel coord).\n * designated by module:echarts/coord/single/Single.\n * @type {Function}\n */\n toGlobalCoord: null,\n\n /**\n * Convert the global coord to local coord.\n * designated by module:echarts/coord/single/Single.\n * @type {Function}\n */\n toLocalCoord: null\n};\nzrUtil.inherits(SingleAxis, Axis);\nvar _default = SingleAxis;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n\n if (!legendModels || !legendModels.length) {\n return;\n }\n\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var categoriesData = graphSeries.getCategoriesData();\n var graph = graphSeries.getGraph();\n var data = graph.data;\n var categoryNames = categoriesData.mapArray(categoriesData.getName);\n data.filterSelf(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\n\n if (category != null) {\n if (typeof category === 'number') {\n category = categoryNames[category];\n } // If in any legend component the status is not selected.\n\n\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(category)) {\n return false;\n }\n }\n }\n\n return true;\n });\n }, this);\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./map/MapSeries\");\n\nrequire(\"./map/MapView\");\n\nrequire(\"../action/geoRoam\");\n\nrequire(\"../coord/geo/geoCreator\");\n\nvar mapSymbolLayout = require(\"./map/mapSymbolLayout\");\n\nvar mapVisual = require(\"./map/mapVisual\");\n\nvar mapDataStatistic = require(\"./map/mapDataStatistic\");\n\nvar backwardCompat = require(\"./map/backwardCompat\");\n\nvar createDataSelectAction = require(\"../action/createDataSelectAction\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerLayout(mapSymbolLayout);\necharts.registerVisual(mapVisual);\necharts.registerProcessor(echarts.PRIORITY.PROCESSOR.STATISTIC, mapDataStatistic);\necharts.registerPreprocessor(backwardCompat);\ncreateDataSelectAction('map', [{\n type: 'mapToggleSelect',\n event: 'mapselectchanged',\n method: 'toggleSelected'\n}, {\n type: 'mapSelect',\n event: 'mapselected',\n method: 'select'\n}, {\n type: 'mapUnSelect',\n event: 'mapunselected',\n method: 'unSelect'\n}]);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar createListFromArray = require(\"../helper/createListFromArray\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.effectScatter',\n dependencies: ['grid', 'polar'],\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {\n useEncodeDefaulter: true\n });\n },\n brushSelector: 'point',\n defaultOption: {\n coordinateSystem: 'cartesian2d',\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n effectType: 'ripple',\n progressive: 0,\n // When to show the effect, option: 'render'|'emphasis'\n showEffectOn: 'render',\n // Ripple effect config\n rippleEffect: {\n period: 4,\n // Scale of ripple\n scale: 2.5,\n // Brush type can be fill or stroke\n brushType: 'fill'\n },\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Polar coordinate system\n // polarIndex: 0,\n // Geo coordinate system\n // geoIndex: 0,\n // symbol: null, // 图形类型\n symbolSize: 10 // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2\n // symbolRotate: null, // 图形旋转控制\n // large: false,\n // Available when large is true\n // largeThreshold: 2000,\n // itemStyle: {\n // opacity: 1\n // }\n\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _helper = require(\"./helper\");\n\nvar setLabel = _helper.setLabel;\n\nvar Model = require(\"../../model/Model\");\n\nvar barItemStyle = require(\"./barItemStyle\");\n\nvar Path = require(\"zrender/lib/graphic/Path\");\n\nvar Group = require(\"zrender/lib/container/Group\");\n\nvar _throttle = require(\"../../util/throttle\");\n\nvar throttle = _throttle.throttle;\n\nvar _createClipPathFromCoordSys = require(\"../helper/createClipPathFromCoordSys\");\n\nvar createClipPath = _createClipPathFromCoordSys.createClipPath;\n\nvar Sausage = require(\"../../util/shape/sausage\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar BAR_BORDER_WIDTH_QUERY = ['itemStyle', 'barBorderWidth'];\nvar _eventPos = [0, 0]; // FIXME\n// Just for compatible with ec2.\n\nzrUtil.extend(Model.prototype, barItemStyle);\n\nfunction getClipArea(coord, data) {\n var coordSysClipArea = coord.getArea && coord.getArea();\n\n if (coord.type === 'cartesian2d') {\n var baseAxis = coord.getBaseAxis(); // When boundaryGap is false or using time axis. bar may exceed the grid.\n // We should not clip this part.\n // See test/bar2.html\n\n if (baseAxis.type !== 'category' || !baseAxis.onBand) {\n var expandWidth = data.getLayout('bandWidth');\n\n if (baseAxis.isHorizontal()) {\n coordSysClipArea.x -= expandWidth;\n coordSysClipArea.width += expandWidth * 2;\n } else {\n coordSysClipArea.y -= expandWidth;\n coordSysClipArea.height += expandWidth * 2;\n }\n }\n }\n\n return coordSysClipArea;\n}\n\nvar _default = echarts.extendChartView({\n type: 'bar',\n render: function (seriesModel, ecModel, api) {\n this._updateDrawMode(seriesModel);\n\n var coordinateSystemType = seriesModel.get('coordinateSystem');\n\n if (coordinateSystemType === 'cartesian2d' || coordinateSystemType === 'polar') {\n this._isLargeDraw ? this._renderLarge(seriesModel, ecModel, api) : this._renderNormal(seriesModel, ecModel, api);\n } else {}\n\n return this.group;\n },\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n this._clear();\n\n this._updateDrawMode(seriesModel);\n },\n incrementalRender: function (params, seriesModel, ecModel, api) {\n // Do not support progressive in normal mode.\n this._incrementalRenderLarge(params, seriesModel);\n },\n _updateDrawMode: function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n\n if (this._isLargeDraw == null || isLargeDraw ^ this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n\n this._clear();\n }\n },\n _renderNormal: function (seriesModel, ecModel, api) {\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n var coord = seriesModel.coordinateSystem;\n var baseAxis = coord.getBaseAxis();\n var isHorizontalOrRadial;\n\n if (coord.type === 'cartesian2d') {\n isHorizontalOrRadial = baseAxis.isHorizontal();\n } else if (coord.type === 'polar') {\n isHorizontalOrRadial = baseAxis.dim === 'angle';\n }\n\n var animationModel = seriesModel.isAnimationEnabled() ? seriesModel : null;\n var needsClip = seriesModel.get('clip', true);\n var coordSysClipArea = getClipArea(coord, data); // If there is clipPath created in large mode. Remove it.\n\n group.removeClipPath(); // We don't use clipPath in normal mode because we needs a perfect animation\n // And don't want the label are clipped.\n\n var roundCap = seriesModel.get('roundCap', true);\n var drawBackground = seriesModel.get('showBackground', true);\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var barBorderRadius = backgroundModel.get('barBorderRadius') || 0;\n var bgEls = [];\n var oldBgEls = this._backgroundEls || [];\n\n var createBackground = function (dataIndex) {\n var bgLayout = getLayout[coord.type](data, dataIndex);\n var bgEl = createBackgroundEl(coord, isHorizontalOrRadial, bgLayout);\n bgEl.useStyle(backgroundModel.getBarItemStyle()); // Only cartesian2d support borderRadius.\n\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n }\n\n bgEls[dataIndex] = bgEl;\n return bgEl;\n };\n\n data.diff(oldData).add(function (dataIndex) {\n var itemModel = data.getItemModel(dataIndex);\n var layout = getLayout[coord.type](data, dataIndex, itemModel);\n\n if (drawBackground) {\n createBackground(dataIndex);\n } // If dataZoom in filteMode: 'empty', the baseValue can be set as NaN in \"axisProxy\".\n\n\n if (!data.hasValue(dataIndex)) {\n return;\n }\n\n if (needsClip) {\n // Clip will modify the layout params.\n // And return a boolean to determine if the shape are fully clipped.\n var isClipped = clip[coord.type](coordSysClipArea, layout);\n\n if (isClipped) {\n group.remove(el);\n return;\n }\n }\n\n var el = elementCreator[coord.type](dataIndex, layout, isHorizontalOrRadial, animationModel, false, roundCap);\n data.setItemGraphicEl(dataIndex, el);\n group.add(el);\n updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\n }).update(function (newIndex, oldIndex) {\n var itemModel = data.getItemModel(newIndex);\n var layout = getLayout[coord.type](data, newIndex, itemModel);\n\n if (drawBackground) {\n var bgEl;\n\n if (oldBgEls.length === 0) {\n bgEl = createBackground(oldIndex);\n } else {\n bgEl = oldBgEls[oldIndex];\n bgEl.useStyle(backgroundModel.getBarItemStyle()); // Only cartesian2d support borderRadius.\n\n if (coord.type === 'cartesian2d') {\n bgEl.setShape('r', barBorderRadius);\n }\n\n bgEls[newIndex] = bgEl;\n }\n\n var bgLayout = getLayout[coord.type](data, newIndex);\n var shape = createBackgroundShape(isHorizontalOrRadial, bgLayout, coord);\n graphic.updateProps(bgEl, {\n shape: shape\n }, animationModel, newIndex);\n }\n\n var el = oldData.getItemGraphicEl(oldIndex);\n\n if (!data.hasValue(newIndex)) {\n group.remove(el);\n return;\n }\n\n if (needsClip) {\n var isClipped = clip[coord.type](coordSysClipArea, layout);\n\n if (isClipped) {\n group.remove(el);\n return;\n }\n }\n\n if (el) {\n graphic.updateProps(el, {\n shape: layout\n }, animationModel, newIndex);\n } else {\n el = elementCreator[coord.type](newIndex, layout, isHorizontalOrRadial, animationModel, true, roundCap);\n }\n\n data.setItemGraphicEl(newIndex, el); // Add back\n\n group.add(el);\n updateStyle(el, data, newIndex, itemModel, layout, seriesModel, isHorizontalOrRadial, coord.type === 'polar');\n }).remove(function (dataIndex) {\n var el = oldData.getItemGraphicEl(dataIndex);\n\n if (coord.type === 'cartesian2d') {\n el && removeRect(dataIndex, animationModel, el);\n } else {\n el && removeSector(dataIndex, animationModel, el);\n }\n }).execute();\n var bgGroup = this._backgroundGroup || (this._backgroundGroup = new Group());\n bgGroup.removeAll();\n\n for (var i = 0; i < bgEls.length; ++i) {\n bgGroup.add(bgEls[i]);\n }\n\n group.add(bgGroup);\n this._backgroundEls = bgEls;\n this._data = data;\n },\n _renderLarge: function (seriesModel, ecModel, api) {\n this._clear();\n\n createLarge(seriesModel, this.group); // Use clipPath in large mode.\n\n var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;\n\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n },\n _incrementalRenderLarge: function (params, seriesModel) {\n this._removeBackground();\n\n createLarge(seriesModel, this.group, true);\n },\n dispose: zrUtil.noop,\n remove: function (ecModel) {\n this._clear(ecModel);\n },\n _clear: function (ecModel) {\n var group = this.group;\n var data = this._data;\n\n if (ecModel && ecModel.get('animation') && data && !this._isLargeDraw) {\n this._removeBackground();\n\n this._backgroundEls = [];\n data.eachItemGraphicEl(function (el) {\n if (el.type === 'sector') {\n removeSector(el.dataIndex, ecModel, el);\n } else {\n removeRect(el.dataIndex, ecModel, el);\n }\n });\n } else {\n group.removeAll();\n }\n\n this._data = null;\n },\n _removeBackground: function () {\n this.group.remove(this._backgroundGroup);\n this._backgroundGroup = null;\n }\n});\n\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nvar clip = {\n cartesian2d: function (coordSysBoundingRect, layout) {\n var signWidth = layout.width < 0 ? -1 : 1;\n var signHeight = layout.height < 0 ? -1 : 1; // Needs positive width and height\n\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n\n var x = mathMax(layout.x, coordSysBoundingRect.x);\n var x2 = mathMin(layout.x + layout.width, coordSysBoundingRect.x + coordSysBoundingRect.width);\n var y = mathMax(layout.y, coordSysBoundingRect.y);\n var y2 = mathMin(layout.y + layout.height, coordSysBoundingRect.y + coordSysBoundingRect.height);\n layout.x = x;\n layout.y = y;\n layout.width = x2 - x;\n layout.height = y2 - y;\n var clipped = layout.width < 0 || layout.height < 0; // Reverse back\n\n if (signWidth < 0) {\n layout.x += layout.width;\n layout.width = -layout.width;\n }\n\n if (signHeight < 0) {\n layout.y += layout.height;\n layout.height = -layout.height;\n }\n\n return clipped;\n },\n polar: function (coordSysClipArea, layout) {\n var signR = layout.r0 <= layout.r ? 1 : -1; // Make sure r is larger than r0\n\n if (signR < 0) {\n var r = layout.r;\n layout.r = layout.r0;\n layout.r0 = r;\n }\n\n var r = mathMin(layout.r, coordSysClipArea.r);\n var r0 = mathMax(layout.r0, coordSysClipArea.r0);\n layout.r = r;\n layout.r0 = r0;\n var clipped = r - r0 < 0; // Reverse back\n\n if (signR < 0) {\n var r = layout.r;\n layout.r = layout.r0;\n layout.r0 = r;\n }\n\n return clipped;\n }\n};\nvar elementCreator = {\n cartesian2d: function (dataIndex, layout, isHorizontal, animationModel, isUpdate) {\n var rect = new graphic.Rect({\n shape: zrUtil.extend({}, layout),\n z2: 1\n });\n rect.name = 'item'; // Animation\n\n if (animationModel) {\n var rectShape = rect.shape;\n var animateProperty = isHorizontal ? 'height' : 'width';\n var animateTarget = {};\n rectShape[animateProperty] = 0;\n animateTarget[animateProperty] = layout[animateProperty];\n graphic[isUpdate ? 'updateProps' : 'initProps'](rect, {\n shape: animateTarget\n }, animationModel, dataIndex);\n }\n\n return rect;\n },\n polar: function (dataIndex, layout, isRadial, animationModel, isUpdate, roundCap) {\n // Keep the same logic with bar in catesion: use end value to control\n // direction. Notice that if clockwise is true (by default), the sector\n // will always draw clockwisely, no matter whether endAngle is greater\n // or less than startAngle.\n var clockwise = layout.startAngle < layout.endAngle;\n var ShapeClass = !isRadial && roundCap ? Sausage : graphic.Sector;\n var sector = new ShapeClass({\n shape: zrUtil.defaults({\n clockwise: clockwise\n }, layout),\n z2: 1\n });\n sector.name = 'item'; // Animation\n\n if (animationModel) {\n var sectorShape = sector.shape;\n var animateProperty = isRadial ? 'r' : 'endAngle';\n var animateTarget = {};\n sectorShape[animateProperty] = isRadial ? 0 : layout.startAngle;\n animateTarget[animateProperty] = layout[animateProperty];\n graphic[isUpdate ? 'updateProps' : 'initProps'](sector, {\n shape: animateTarget\n }, animationModel, dataIndex);\n }\n\n return sector;\n }\n};\n\nfunction removeRect(dataIndex, animationModel, el) {\n // Not show text when animating\n el.style.text = null;\n graphic.updateProps(el, {\n shape: {\n width: 0\n }\n }, animationModel, dataIndex, function () {\n el.parent && el.parent.remove(el);\n });\n}\n\nfunction removeSector(dataIndex, animationModel, el) {\n // Not show text when animating\n el.style.text = null;\n graphic.updateProps(el, {\n shape: {\n r: el.shape.r0\n }\n }, animationModel, dataIndex, function () {\n el.parent && el.parent.remove(el);\n });\n}\n\nvar getLayout = {\n // itemModel is only used to get borderWidth, which is not needed\n // when calculating bar background layout.\n cartesian2d: function (data, dataIndex, itemModel) {\n var layout = data.getItemLayout(dataIndex);\n var fixedLineWidth = itemModel ? getLineWidth(itemModel, layout) : 0; // fix layout with lineWidth\n\n var signX = layout.width > 0 ? 1 : -1;\n var signY = layout.height > 0 ? 1 : -1;\n return {\n x: layout.x + signX * fixedLineWidth / 2,\n y: layout.y + signY * fixedLineWidth / 2,\n width: layout.width - signX * fixedLineWidth,\n height: layout.height - signY * fixedLineWidth\n };\n },\n polar: function (data, dataIndex, itemModel) {\n var layout = data.getItemLayout(dataIndex);\n return {\n cx: layout.cx,\n cy: layout.cy,\n r0: layout.r0,\n r: layout.r,\n startAngle: layout.startAngle,\n endAngle: layout.endAngle\n };\n }\n};\n\nfunction isZeroOnPolar(layout) {\n return layout.startAngle != null && layout.endAngle != null && layout.startAngle === layout.endAngle;\n}\n\nfunction updateStyle(el, data, dataIndex, itemModel, layout, seriesModel, isHorizontal, isPolar) {\n var color = data.getItemVisual(dataIndex, 'color');\n var opacity = data.getItemVisual(dataIndex, 'opacity');\n var stroke = data.getVisual('borderColor');\n var itemStyleModel = itemModel.getModel('itemStyle');\n var hoverStyle = itemModel.getModel('emphasis.itemStyle').getBarItemStyle();\n\n if (!isPolar) {\n el.setShape('r', itemStyleModel.get('barBorderRadius') || 0);\n }\n\n el.useStyle(zrUtil.defaults({\n stroke: isZeroOnPolar(layout) ? 'none' : stroke,\n fill: isZeroOnPolar(layout) ? 'none' : color,\n opacity: opacity\n }, itemStyleModel.getBarItemStyle()));\n var cursorStyle = itemModel.getShallow('cursor');\n cursorStyle && el.attr('cursor', cursorStyle);\n var labelPositionOutside = isHorizontal ? layout.height > 0 ? 'bottom' : 'top' : layout.width > 0 ? 'left' : 'right';\n\n if (!isPolar) {\n setLabel(el.style, hoverStyle, itemModel, color, seriesModel, dataIndex, labelPositionOutside);\n }\n\n if (isZeroOnPolar(layout)) {\n hoverStyle.fill = hoverStyle.stroke = 'none';\n }\n\n graphic.setHoverStyle(el, hoverStyle);\n} // In case width or height are too small.\n\n\nfunction getLineWidth(itemModel, rawLayout) {\n var lineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0; // width or height may be NaN for empty data\n\n var width = isNaN(rawLayout.width) ? Number.MAX_VALUE : Math.abs(rawLayout.width);\n var height = isNaN(rawLayout.height) ? Number.MAX_VALUE : Math.abs(rawLayout.height);\n return Math.min(lineWidth, width, height);\n}\n\nvar LargePath = Path.extend({\n type: 'largeBar',\n shape: {\n points: []\n },\n buildPath: function (ctx, shape) {\n // Drawing lines is more efficient than drawing\n // a whole line or drawing rects.\n var points = shape.points;\n var startPoint = this.__startPoint;\n var baseDimIdx = this.__baseDimIdx;\n\n for (var i = 0; i < points.length; i += 2) {\n startPoint[baseDimIdx] = points[i + baseDimIdx];\n ctx.moveTo(startPoint[0], startPoint[1]);\n ctx.lineTo(points[i], points[i + 1]);\n }\n }\n});\n\nfunction createLarge(seriesModel, group, incremental) {\n // TODO support polar\n var data = seriesModel.getData();\n var startPoint = [];\n var baseDimIdx = data.getLayout('valueAxisHorizontal') ? 1 : 0;\n startPoint[1 - baseDimIdx] = data.getLayout('valueAxisStart');\n var largeDataIndices = data.getLayout('largeDataIndices');\n var barWidth = data.getLayout('barWidth');\n var backgroundModel = seriesModel.getModel('backgroundStyle');\n var drawBackground = seriesModel.get('showBackground', true);\n\n if (drawBackground) {\n var points = data.getLayout('largeBackgroundPoints');\n var backgroundStartPoint = [];\n backgroundStartPoint[1 - baseDimIdx] = data.getLayout('backgroundStart');\n var bgEl = new LargePath({\n shape: {\n points: points\n },\n incremental: !!incremental,\n __startPoint: backgroundStartPoint,\n __baseDimIdx: baseDimIdx,\n __largeDataIndices: largeDataIndices,\n __barWidth: barWidth,\n silent: true,\n z2: 0\n });\n setLargeBackgroundStyle(bgEl, backgroundModel, data);\n group.add(bgEl);\n }\n\n var el = new LargePath({\n shape: {\n points: data.getLayout('largePoints')\n },\n incremental: !!incremental,\n __startPoint: startPoint,\n __baseDimIdx: baseDimIdx,\n __largeDataIndices: largeDataIndices,\n __barWidth: barWidth\n });\n group.add(el);\n setLargeStyle(el, seriesModel, data); // Enable tooltip and user mouse/touch event handlers.\n\n el.seriesIndex = seriesModel.seriesIndex;\n\n if (!seriesModel.get('silent')) {\n el.on('mousedown', largePathUpdateDataIndex);\n el.on('mousemove', largePathUpdateDataIndex);\n }\n} // Use throttle to avoid frequently traverse to find dataIndex.\n\n\nvar largePathUpdateDataIndex = throttle(function (event) {\n var largePath = this;\n var dataIndex = largePathFindDataIndex(largePath, event.offsetX, event.offsetY);\n largePath.dataIndex = dataIndex >= 0 ? dataIndex : null;\n}, 30, false);\n\nfunction largePathFindDataIndex(largePath, x, y) {\n var baseDimIdx = largePath.__baseDimIdx;\n var valueDimIdx = 1 - baseDimIdx;\n var points = largePath.shape.points;\n var largeDataIndices = largePath.__largeDataIndices;\n var barWidthHalf = Math.abs(largePath.__barWidth / 2);\n var startValueVal = largePath.__startPoint[valueDimIdx];\n _eventPos[0] = x;\n _eventPos[1] = y;\n var pointerBaseVal = _eventPos[baseDimIdx];\n var pointerValueVal = _eventPos[1 - baseDimIdx];\n var baseLowerBound = pointerBaseVal - barWidthHalf;\n var baseUpperBound = pointerBaseVal + barWidthHalf;\n\n for (var i = 0, len = points.length / 2; i < len; i++) {\n var ii = i * 2;\n var barBaseVal = points[ii + baseDimIdx];\n var barValueVal = points[ii + valueDimIdx];\n\n if (barBaseVal >= baseLowerBound && barBaseVal <= baseUpperBound && (startValueVal <= barValueVal ? pointerValueVal >= startValueVal && pointerValueVal <= barValueVal : pointerValueVal >= barValueVal && pointerValueVal <= startValueVal)) {\n return largeDataIndices[i];\n }\n }\n\n return -1;\n}\n\nfunction setLargeStyle(el, seriesModel, data) {\n var borderColor = data.getVisual('borderColor') || data.getVisual('color');\n var itemStyle = seriesModel.getModel('itemStyle').getItemStyle(['color', 'borderColor']);\n el.useStyle(itemStyle);\n el.style.fill = null;\n el.style.stroke = borderColor;\n el.style.lineWidth = data.getLayout('barWidth');\n}\n\nfunction setLargeBackgroundStyle(el, backgroundModel, data) {\n var borderColor = backgroundModel.get('borderColor') || backgroundModel.get('color');\n var itemStyle = backgroundModel.getItemStyle(['color', 'borderColor']);\n el.useStyle(itemStyle);\n el.style.fill = null;\n el.style.stroke = borderColor;\n el.style.lineWidth = data.getLayout('barWidth');\n}\n\nfunction createBackgroundShape(isHorizontalOrRadial, layout, coord) {\n var coordLayout;\n var isPolar = coord.type === 'polar';\n\n if (isPolar) {\n coordLayout = coord.getArea();\n } else {\n coordLayout = coord.grid.getRect();\n }\n\n if (isPolar) {\n return {\n cx: coordLayout.cx,\n cy: coordLayout.cy,\n r0: isHorizontalOrRadial ? coordLayout.r0 : layout.r0,\n r: isHorizontalOrRadial ? coordLayout.r : layout.r,\n startAngle: isHorizontalOrRadial ? layout.startAngle : 0,\n endAngle: isHorizontalOrRadial ? layout.endAngle : Math.PI * 2\n };\n } else {\n return {\n x: isHorizontalOrRadial ? layout.x : coordLayout.x,\n y: isHorizontalOrRadial ? coordLayout.y : layout.y,\n width: isHorizontalOrRadial ? layout.width : coordLayout.width,\n height: isHorizontalOrRadial ? coordLayout.height : layout.height\n };\n }\n}\n\nfunction createBackgroundEl(coord, isHorizontalOrRadial, layout) {\n var ElementClz = coord.type === 'polar' ? graphic.Sector : graphic.Rect;\n return new ElementClz({\n shape: createBackgroundShape(isHorizontalOrRadial, layout, coord),\n silent: true,\n z2: 0\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Component = require(\"../../model/Component\");\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*/\nComponent.registerSubTypeDefaulter('dataZoom', function () {\n // Default 'slider' when no type specified.\n return 'slider';\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Polyline = require(\"./Polyline\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar EffectLine = require(\"./EffectLine\");\n\nvar vec2 = require(\"zrender/lib/core/vector\");\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 * Provide effect for line\n * @module echarts/chart/helper/EffectLine\n */\n\n/**\n * @constructor\n * @extends {module:echarts/chart/helper/EffectLine}\n * @alias {module:echarts/chart/helper/Polyline}\n */\nfunction EffectPolyline(lineData, idx, seriesScope) {\n EffectLine.call(this, lineData, idx, seriesScope);\n this._lastFrame = 0;\n this._lastFramePercent = 0;\n}\n\nvar effectPolylineProto = EffectPolyline.prototype; // Overwrite\n\neffectPolylineProto.createLine = function (lineData, idx, seriesScope) {\n return new Polyline(lineData, idx, seriesScope);\n}; // Overwrite\n\n\neffectPolylineProto.updateAnimationPoints = function (symbol, points) {\n this._points = points;\n var accLenArr = [0];\n var len = 0;\n\n for (var i = 1; i < points.length; i++) {\n var p1 = points[i - 1];\n var p2 = points[i];\n len += vec2.dist(p1, p2);\n accLenArr.push(len);\n }\n\n if (len === 0) {\n return;\n }\n\n for (var i = 0; i < accLenArr.length; i++) {\n accLenArr[i] /= len;\n }\n\n this._offsets = accLenArr;\n this._length = len;\n}; // Overwrite\n\n\neffectPolylineProto.getLineLength = function (symbol) {\n return this._length;\n}; // Overwrite\n\n\neffectPolylineProto.updateSymbolPosition = function (symbol) {\n var t = symbol.__t;\n var points = this._points;\n var offsets = this._offsets;\n var len = points.length;\n\n if (!offsets) {\n // Has length 0\n return;\n }\n\n var lastFrame = this._lastFrame;\n var frame;\n\n if (t < this._lastFramePercent) {\n // Start from the next frame\n // PENDING start from lastFrame ?\n var start = Math.min(lastFrame + 1, len - 1);\n\n for (frame = start; frame >= 0; frame--) {\n if (offsets[frame] <= t) {\n break;\n }\n } // PENDING really need to do this ?\n\n\n frame = Math.min(frame, len - 2);\n } else {\n for (var frame = lastFrame; frame < len; frame++) {\n if (offsets[frame] > t) {\n break;\n }\n }\n\n frame = Math.min(frame - 1, len - 2);\n }\n\n vec2.lerp(symbol.position, points[frame], points[frame + 1], (t - offsets[frame]) / (offsets[frame + 1] - offsets[frame]));\n var tx = points[frame + 1][0] - points[frame][0];\n var ty = points[frame + 1][1] - points[frame][1];\n symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2;\n this._lastFrame = frame;\n this._lastFramePercent = t;\n symbol.ignore = false;\n};\n\nzrUtil.inherits(EffectPolyline, EffectLine);\nvar _default = EffectPolyline;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar geoCoordMap = {\n 'Russia': [100, 60],\n 'United States': [-99, 38],\n 'United States of America': [-99, 38]\n};\n\nfunction _default(mapType, region) {\n if (mapType === 'world') {\n var geoCoord = geoCoordMap[region.name];\n\n if (geoCoord) {\n var cp = region.center;\n cp[0] = geoCoord[0];\n cp[1] = geoCoord[1];\n }\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar AxisBuilder = require(\"../axis/AxisBuilder\");\n\nvar graphic = require(\"../../util/graphic\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\n\nvar _default = echarts.extendComponentView({\n type: 'radar',\n render: function (radarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n\n this._buildAxes(radarModel);\n\n this._buildSplitLineAndArea(radarModel);\n },\n _buildAxes: function (radarModel) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n var axisBuilders = zrUtil.map(indicatorAxes, function (indicatorAxis) {\n var axisBuilder = new AxisBuilder(indicatorAxis.model, {\n position: [radar.cx, radar.cy],\n rotation: indicatorAxis.angle,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1\n });\n return axisBuilder;\n });\n zrUtil.each(axisBuilders, function (axisBuilder) {\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n this.group.add(axisBuilder.getGroup());\n }, this);\n },\n _buildSplitLineAndArea: function (radarModel) {\n var radar = radarModel.coordinateSystem;\n var indicatorAxes = radar.getIndicatorAxes();\n\n if (!indicatorAxes.length) {\n return;\n }\n\n var shape = radarModel.get('shape');\n var splitLineModel = radarModel.getModel('splitLine');\n var splitAreaModel = radarModel.getModel('splitArea');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var showSplitLine = splitLineModel.get('show');\n var showSplitArea = splitAreaModel.get('show');\n var splitLineColors = lineStyleModel.get('color');\n var splitAreaColors = areaStyleModel.get('color');\n splitLineColors = zrUtil.isArray(splitLineColors) ? splitLineColors : [splitLineColors];\n splitAreaColors = zrUtil.isArray(splitAreaColors) ? splitAreaColors : [splitAreaColors];\n var splitLines = [];\n var splitAreas = [];\n\n function getColorIndex(areaOrLine, areaOrLineColorList, idx) {\n var colorIndex = idx % areaOrLineColorList.length;\n areaOrLine[colorIndex] = areaOrLine[colorIndex] || [];\n return colorIndex;\n }\n\n if (shape === 'circle') {\n var ticksRadius = indicatorAxes[0].getTicksCoords();\n var cx = radar.cx;\n var cy = radar.cy;\n\n for (var i = 0; i < ticksRadius.length; i++) {\n if (showSplitLine) {\n var colorIndex = getColorIndex(splitLines, splitLineColors, i);\n splitLines[colorIndex].push(new graphic.Circle({\n shape: {\n cx: cx,\n cy: cy,\n r: ticksRadius[i].coord\n }\n }));\n }\n\n if (showSplitArea && i < ticksRadius.length - 1) {\n var colorIndex = getColorIndex(splitAreas, splitAreaColors, i);\n splitAreas[colorIndex].push(new graphic.Ring({\n shape: {\n cx: cx,\n cy: cy,\n r0: ticksRadius[i].coord,\n r: ticksRadius[i + 1].coord\n }\n }));\n }\n }\n } // Polyyon\n else {\n var realSplitNumber;\n var axesTicksPoints = zrUtil.map(indicatorAxes, function (indicatorAxis, idx) {\n var ticksCoords = indicatorAxis.getTicksCoords();\n realSplitNumber = realSplitNumber == null ? ticksCoords.length - 1 : Math.min(ticksCoords.length - 1, realSplitNumber);\n return zrUtil.map(ticksCoords, function (tickCoord) {\n return radar.coordToPoint(tickCoord.coord, idx);\n });\n });\n var prevPoints = [];\n\n for (var i = 0; i <= realSplitNumber; i++) {\n var points = [];\n\n for (var j = 0; j < indicatorAxes.length; j++) {\n points.push(axesTicksPoints[j][i]);\n } // Close\n\n\n if (points[0]) {\n points.push(points[0].slice());\n } else {}\n\n if (showSplitLine) {\n var colorIndex = getColorIndex(splitLines, splitLineColors, i);\n splitLines[colorIndex].push(new graphic.Polyline({\n shape: {\n points: points\n }\n }));\n }\n\n if (showSplitArea && prevPoints) {\n var colorIndex = getColorIndex(splitAreas, splitAreaColors, i - 1);\n splitAreas[colorIndex].push(new graphic.Polygon({\n shape: {\n points: points.concat(prevPoints)\n }\n }));\n }\n\n prevPoints = points.slice().reverse();\n }\n }\n\n var lineStyle = lineStyleModel.getLineStyle();\n var areaStyle = areaStyleModel.getAreaStyle(); // Add splitArea before splitLine\n\n zrUtil.each(splitAreas, function (splitAreas, idx) {\n this.group.add(graphic.mergePath(splitAreas, {\n style: zrUtil.defaults({\n stroke: 'none',\n fill: splitAreaColors[idx % splitAreaColors.length]\n }, areaStyle),\n silent: true\n }));\n }, this);\n zrUtil.each(splitLines, function (splitLines, idx) {\n this.group.add(graphic.mergePath(splitLines, {\n style: zrUtil.defaults({\n fill: 'none',\n stroke: splitLineColors[idx % splitLineColors.length]\n }, lineStyle),\n silent: true\n }));\n }, this);\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"../component/singleAxis\");\n\nrequire(\"./themeRiver/ThemeRiverSeries\");\n\nrequire(\"./themeRiver/ThemeRiverView\");\n\nvar themeRiverLayout = require(\"./themeRiver/themeRiverLayout\");\n\nvar themeRiverVisual = require(\"./themeRiver/themeRiverVisual\");\n\nvar dataFilter = require(\"../processor/dataFilter\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerLayout(themeRiverLayout);\necharts.registerVisual(themeRiverVisual);\necharts.registerProcessor(dataFilter('themeRiver'));","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar vector = require(\"zrender/lib/core/vector\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar Transformable = require(\"zrender/lib/mixin/Transformable\");\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 * Simple view coordinate system\n * Mapping given x, y to transformd view x, y\n */\nvar v2ApplyTransform = vector.applyTransform; // Dummy transform node\n\nfunction TransformDummy() {\n Transformable.call(this);\n}\n\nzrUtil.mixin(TransformDummy, Transformable);\n\nfunction View(name) {\n /**\n * @type {string}\n */\n this.name = name;\n /**\n * @type {Object}\n */\n\n this.zoomLimit;\n Transformable.call(this);\n this._roamTransformable = new TransformDummy();\n this._rawTransformable = new TransformDummy();\n this._center;\n this._zoom;\n}\n\nView.prototype = {\n constructor: View,\n type: 'view',\n\n /**\n * @param {Array.}\n * @readOnly\n */\n dimensions: ['x', 'y'],\n\n /**\n * Set bounding rect\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n */\n // PENDING to getRect\n setBoundingRect: function (x, y, width, height) {\n this._rect = new BoundingRect(x, y, width, height);\n return this._rect;\n },\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n // PENDING to getRect\n getBoundingRect: function () {\n return this._rect;\n },\n\n /**\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n */\n setViewRect: function (x, y, width, height) {\n this.transformTo(x, y, width, height);\n this._viewRect = new BoundingRect(x, y, width, height);\n },\n\n /**\n * Transformed to particular position and size\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n */\n transformTo: function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var rawTransform = this._rawTransformable;\n rawTransform.transform = rect.calculateTransform(new BoundingRect(x, y, width, height));\n rawTransform.decomposeTransform();\n\n this._updateTransform();\n },\n\n /**\n * Set center of view\n * @param {Array.} [centerCoord]\n */\n setCenter: function (centerCoord) {\n if (!centerCoord) {\n return;\n }\n\n this._center = centerCoord;\n\n this._updateCenterAndZoom();\n },\n\n /**\n * @param {number} zoom\n */\n setZoom: function (zoom) {\n zoom = zoom || 1;\n var zoomLimit = this.zoomLimit;\n\n if (zoomLimit) {\n if (zoomLimit.max != null) {\n zoom = Math.min(zoomLimit.max, zoom);\n }\n\n if (zoomLimit.min != null) {\n zoom = Math.max(zoomLimit.min, zoom);\n }\n }\n\n this._zoom = zoom;\n\n this._updateCenterAndZoom();\n },\n\n /**\n * Get default center without roam\n */\n getDefaultCenter: function () {\n // Rect before any transform\n var rawRect = this.getBoundingRect();\n var cx = rawRect.x + rawRect.width / 2;\n var cy = rawRect.y + rawRect.height / 2;\n return [cx, cy];\n },\n getCenter: function () {\n return this._center || this.getDefaultCenter();\n },\n getZoom: function () {\n return this._zoom || 1;\n },\n\n /**\n * @return {Array.} data\n * @param {boolean} noRoam\n * @param {Array.} [out]\n * @return {Array.}\n */\n dataToPoint: function (data, noRoam, out) {\n var transform = noRoam ? this._rawTransform : this.transform;\n out = out || [];\n return transform ? v2ApplyTransform(out, data, transform) : vector.copy(out, data);\n },\n\n /**\n * Convert a (x, y) point to (lon, lat) data\n * @param {Array.} point\n * @return {Array.}\n */\n pointToData: function (point) {\n var invTransform = this.invTransform;\n return invTransform ? v2ApplyTransform([], point, invTransform) : [point[0], point[1]];\n },\n\n /**\n * @implements\n * see {module:echarts/CoodinateSystem}\n */\n convertToPixel: zrUtil.curry(doConvert, 'dataToPoint'),\n\n /**\n * @implements\n * see {module:echarts/CoodinateSystem}\n */\n convertFromPixel: zrUtil.curry(doConvert, 'pointToData'),\n\n /**\n * @implements\n * see {module:echarts/CoodinateSystem}\n */\n containPoint: function (point) {\n return this.getViewRectAfterRoam().contain(point[0], point[1]);\n }\n /**\n * @return {number}\n */\n // getScalarScale: function () {\n // // Use determinant square root of transform to mutiply scalar\n // var m = this.transform;\n // var det = Math.sqrt(Math.abs(m[0] * m[3] - m[2] * m[1]));\n // return det;\n // }\n\n};\nzrUtil.mixin(View, Transformable);\n\nfunction doConvert(methodName, ecModel, finder, value) {\n var seriesModel = finder.seriesModel;\n var coordSys = seriesModel ? seriesModel.coordinateSystem : null; // e.g., graph.\n\n return coordSys === this ? coordSys[methodName](value) : null;\n}\n\nvar _default = View;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar SymbolClz = require(\"../helper/Symbol\");\n\nvar _layoutHelper = require(\"./layoutHelper\");\n\nvar radialCoordinate = _layoutHelper.radialCoordinate;\n\nvar echarts = require(\"../../echarts\");\n\nvar bbox = require(\"zrender/lib/core/bbox\");\n\nvar View = require(\"../../coord/View\");\n\nvar roamHelper = require(\"../../component/helper/roamHelper\");\n\nvar RoamController = require(\"../../component/helper/RoamController\");\n\nvar _cursorHelper = require(\"../../component/helper/cursorHelper\");\n\nvar onIrrelevantElement = _cursorHelper.onIrrelevantElement;\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar TreeShape = graphic.extendShape({\n shape: {\n parentPoint: [],\n childPoints: [],\n orient: '',\n forkPosition: ''\n },\n style: {\n stroke: '#000',\n fill: null\n },\n buildPath: function (ctx, shape) {\n var childPoints = shape.childPoints;\n var childLen = childPoints.length;\n var parentPoint = shape.parentPoint;\n var firstChildPos = childPoints[0];\n var lastChildPos = childPoints[childLen - 1];\n\n if (childLen === 1) {\n ctx.moveTo(parentPoint[0], parentPoint[1]);\n ctx.lineTo(firstChildPos[0], firstChildPos[1]);\n return;\n }\n\n var orient = shape.orient;\n var forkDim = orient === 'TB' || orient === 'BT' ? 0 : 1;\n var otherDim = 1 - forkDim;\n var forkPosition = parsePercent(shape.forkPosition, 1);\n var tmpPoint = [];\n tmpPoint[forkDim] = parentPoint[forkDim];\n tmpPoint[otherDim] = parentPoint[otherDim] + (lastChildPos[otherDim] - parentPoint[otherDim]) * forkPosition;\n ctx.moveTo(parentPoint[0], parentPoint[1]);\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n ctx.moveTo(firstChildPos[0], firstChildPos[1]);\n tmpPoint[forkDim] = firstChildPos[forkDim];\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n tmpPoint[forkDim] = lastChildPos[forkDim];\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n ctx.lineTo(lastChildPos[0], lastChildPos[1]);\n\n for (var i = 1; i < childLen - 1; i++) {\n var point = childPoints[i];\n ctx.moveTo(point[0], point[1]);\n tmpPoint[forkDim] = point[forkDim];\n ctx.lineTo(tmpPoint[0], tmpPoint[1]);\n }\n }\n});\n\nvar _default = echarts.extendChartView({\n type: 'tree',\n\n /**\n * Init the chart\n * @override\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n */\n init: function (ecModel, api) {\n /**\n * @private\n * @type {module:echarts/data/Tree}\n */\n this._oldTree;\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n\n this._mainGroup = new graphic.Group();\n /**\n * @private\n * @type {module:echarts/componet/helper/RoamController}\n */\n\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {\n target: this.group\n };\n this.group.add(this._mainGroup);\n },\n render: function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var layoutInfo = seriesModel.layoutInfo;\n var group = this._mainGroup;\n var layout = seriesModel.get('layout');\n\n if (layout === 'radial') {\n group.attr('position', [layoutInfo.x + layoutInfo.width / 2, layoutInfo.y + layoutInfo.height / 2]);\n } else {\n group.attr('position', [layoutInfo.x, layoutInfo.y]);\n }\n\n this._updateViewCoordSys(seriesModel, layoutInfo, layout);\n\n this._updateController(seriesModel, ecModel, api);\n\n var oldData = this._data;\n var seriesScope = {\n expandAndCollapse: seriesModel.get('expandAndCollapse'),\n layout: layout,\n edgeShape: seriesModel.get('edgeShape'),\n edgeForkPosition: seriesModel.get('edgeForkPosition'),\n orient: seriesModel.getOrient(),\n curvature: seriesModel.get('lineStyle.curveness'),\n symbolRotate: seriesModel.get('symbolRotate'),\n symbolOffset: seriesModel.get('symbolOffset'),\n hoverAnimation: seriesModel.get('hoverAnimation'),\n useNameLabel: true,\n fadeIn: true\n };\n data.diff(oldData).add(function (newIdx) {\n if (symbolNeedsDraw(data, newIdx)) {\n // Create node and edge\n updateNode(data, newIdx, null, group, seriesModel, seriesScope);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n\n if (!symbolNeedsDraw(data, newIdx)) {\n symbolEl && removeNode(oldData, oldIdx, symbolEl, group, seriesModel, seriesScope);\n return;\n } // Update node and edge\n\n\n updateNode(data, newIdx, symbolEl, group, seriesModel, seriesScope);\n }).remove(function (oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx); // When remove a collapsed node of subtree, since the collapsed\n // node haven't been initialized with a symbol element,\n // you can't found it's symbol element through index.\n // so if we want to remove the symbol element we should insure\n // that the symbol element is not null.\n\n if (symbolEl) {\n removeNode(oldData, oldIdx, symbolEl, group, seriesModel, seriesScope);\n }\n }).execute();\n this._nodeScaleRatio = seriesModel.get('nodeScaleRatio');\n\n this._updateNodeAndLinkScale(seriesModel);\n\n if (seriesScope.expandAndCollapse === true) {\n data.eachItemGraphicEl(function (el, dataIndex) {\n el.off('click').on('click', function () {\n api.dispatchAction({\n type: 'treeExpandAndCollapse',\n seriesId: seriesModel.id,\n dataIndex: dataIndex\n });\n });\n });\n }\n\n this._data = data;\n },\n _updateViewCoordSys: function (seriesModel) {\n var data = seriesModel.getData();\n var points = [];\n data.each(function (idx) {\n var layout = data.getItemLayout(idx);\n\n if (layout && !isNaN(layout.x) && !isNaN(layout.y)) {\n points.push([+layout.x, +layout.y]);\n }\n });\n var min = [];\n var max = [];\n bbox.fromPoints(points, min, max); // If don't Store min max when collapse the root node after roam,\n // the root node will disappear.\n\n var oldMin = this._min;\n var oldMax = this._max; // If width or height is 0\n\n if (max[0] - min[0] === 0) {\n min[0] = oldMin ? oldMin[0] : min[0] - 1;\n max[0] = oldMax ? oldMax[0] : max[0] + 1;\n }\n\n if (max[1] - min[1] === 0) {\n min[1] = oldMin ? oldMin[1] : min[1] - 1;\n max[1] = oldMax ? oldMax[1] : max[1] + 1;\n }\n\n var viewCoordSys = seriesModel.coordinateSystem = new View();\n viewCoordSys.zoomLimit = seriesModel.get('scaleLimit');\n viewCoordSys.setBoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n viewCoordSys.setCenter(seriesModel.get('center'));\n viewCoordSys.setZoom(seriesModel.get('zoom')); // Here we use viewCoordSys just for computing the 'position' and 'scale' of the group\n\n this.group.attr({\n position: viewCoordSys.position,\n scale: viewCoordSys.scale\n });\n this._viewCoordSys = viewCoordSys;\n this._min = min;\n this._max = max;\n },\n _updateController: function (seriesModel, ecModel, api) {\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n var group = this.group;\n controller.setPointerChecker(function (e, x, y) {\n var rect = group.getBoundingRect();\n rect.applyTransform(group.transform);\n return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel);\n });\n controller.enable(seriesModel.get('roam'));\n controllerHost.zoomLimit = seriesModel.get('scaleLimit');\n controllerHost.zoom = seriesModel.coordinateSystem.getZoom();\n controller.off('pan').off('zoom').on('pan', function (e) {\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'treeRoam',\n dx: e.dx,\n dy: e.dy\n });\n }, this).on('zoom', function (e) {\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'treeRoam',\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY\n });\n\n this._updateNodeAndLinkScale(seriesModel);\n }, this);\n },\n _updateNodeAndLinkScale: function (seriesModel) {\n var data = seriesModel.getData();\n\n var nodeScale = this._getNodeGlobalScale(seriesModel);\n\n var invScale = [nodeScale, nodeScale];\n data.eachItemGraphicEl(function (el, idx) {\n el.attr('scale', invScale);\n });\n },\n _getNodeGlobalScale: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys.type !== 'view') {\n return 1;\n }\n\n var nodeScaleRatio = this._nodeScaleRatio;\n var groupScale = coordSys.scale;\n var groupZoom = groupScale && groupScale[0] || 1; // Scale node when zoom changes\n\n var roamZoom = coordSys.getZoom();\n var nodeScale = (roamZoom - 1) * nodeScaleRatio + 1;\n return nodeScale / groupZoom;\n },\n dispose: function () {\n this._controller && this._controller.dispose();\n this._controllerHost = {};\n },\n remove: function () {\n this._mainGroup.removeAll();\n\n this._data = null;\n }\n});\n\nfunction symbolNeedsDraw(data, dataIndex) {\n var layout = data.getItemLayout(dataIndex);\n return layout && !isNaN(layout.x) && !isNaN(layout.y) && data.getItemVisual(dataIndex, 'symbol') !== 'none';\n}\n\nfunction getTreeNodeStyle(node, itemModel, seriesScope) {\n seriesScope.itemModel = itemModel;\n seriesScope.itemStyle = itemModel.getModel('itemStyle').getItemStyle();\n seriesScope.hoverItemStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n seriesScope.lineStyle = itemModel.getModel('lineStyle').getLineStyle();\n seriesScope.labelModel = itemModel.getModel('label');\n seriesScope.hoverLabelModel = itemModel.getModel('emphasis.label');\n\n if (node.isExpand === false && node.children.length !== 0) {\n seriesScope.symbolInnerColor = seriesScope.itemStyle.fill;\n } else {\n seriesScope.symbolInnerColor = '#fff';\n }\n\n return seriesScope;\n}\n\nfunction updateNode(data, dataIndex, symbolEl, group, seriesModel, seriesScope) {\n var isInit = !symbolEl;\n var node = data.tree.getNodeByDataIndex(dataIndex);\n var itemModel = node.getModel();\n var seriesScope = getTreeNodeStyle(node, itemModel, seriesScope);\n var virtualRoot = data.tree.root;\n var source = node.parentNode === virtualRoot ? node : node.parentNode || node;\n var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex);\n var sourceLayout = source.getLayout();\n var sourceOldLayout = sourceSymbolEl ? {\n x: sourceSymbolEl.position[0],\n y: sourceSymbolEl.position[1],\n rawX: sourceSymbolEl.__radialOldRawX,\n rawY: sourceSymbolEl.__radialOldRawY\n } : sourceLayout;\n var targetLayout = node.getLayout();\n\n if (isInit) {\n symbolEl = new SymbolClz(data, dataIndex, seriesScope);\n symbolEl.attr('position', [sourceOldLayout.x, sourceOldLayout.y]);\n } else {\n symbolEl.updateData(data, dataIndex, seriesScope);\n }\n\n symbolEl.__radialOldRawX = symbolEl.__radialRawX;\n symbolEl.__radialOldRawY = symbolEl.__radialRawY;\n symbolEl.__radialRawX = targetLayout.rawX;\n symbolEl.__radialRawY = targetLayout.rawY;\n group.add(symbolEl);\n data.setItemGraphicEl(dataIndex, symbolEl);\n graphic.updateProps(symbolEl, {\n position: [targetLayout.x, targetLayout.y]\n }, seriesModel);\n var symbolPath = symbolEl.getSymbolPath();\n\n if (seriesScope.layout === 'radial') {\n var realRoot = virtualRoot.children[0];\n var rootLayout = realRoot.getLayout();\n var length = realRoot.children.length;\n var rad;\n var isLeft;\n\n if (targetLayout.x === rootLayout.x && node.isExpand === true) {\n var center = {};\n center.x = (realRoot.children[0].getLayout().x + realRoot.children[length - 1].getLayout().x) / 2;\n center.y = (realRoot.children[0].getLayout().y + realRoot.children[length - 1].getLayout().y) / 2;\n rad = Math.atan2(center.y - rootLayout.y, center.x - rootLayout.x);\n\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n\n isLeft = center.x < rootLayout.x;\n\n if (isLeft) {\n rad = rad - Math.PI;\n }\n } else {\n rad = Math.atan2(targetLayout.y - rootLayout.y, targetLayout.x - rootLayout.x);\n\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n\n if (node.children.length === 0 || node.children.length !== 0 && node.isExpand === false) {\n isLeft = targetLayout.x < rootLayout.x;\n\n if (isLeft) {\n rad = rad - Math.PI;\n }\n } else {\n isLeft = targetLayout.x > rootLayout.x;\n\n if (!isLeft) {\n rad = rad - Math.PI;\n }\n }\n }\n\n var textPosition = isLeft ? 'left' : 'right';\n var rotate = seriesScope.labelModel.get('rotate');\n var labelRotateRadian = rotate * (Math.PI / 180);\n symbolPath.setStyle({\n textPosition: seriesScope.labelModel.get('position') || textPosition,\n textRotation: rotate == null ? -rad : labelRotateRadian,\n textOrigin: 'center',\n verticalAlign: 'middle'\n });\n }\n\n drawEdge(seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, sourceLayout, targetLayout, group, seriesScope);\n}\n\nfunction drawEdge(seriesModel, node, virtualRoot, symbolEl, sourceOldLayout, sourceLayout, targetLayout, group, seriesScope) {\n var edgeShape = seriesScope.edgeShape;\n var edge = symbolEl.__edge;\n\n if (edgeShape === 'curve') {\n if (node.parentNode && node.parentNode !== virtualRoot) {\n if (!edge) {\n edge = symbolEl.__edge = new graphic.BezierCurve({\n shape: getEdgeShape(seriesScope, sourceOldLayout, sourceOldLayout),\n style: zrUtil.defaults({\n opacity: 0,\n strokeNoScale: true\n }, seriesScope.lineStyle)\n });\n }\n\n graphic.updateProps(edge, {\n shape: getEdgeShape(seriesScope, sourceLayout, targetLayout),\n style: zrUtil.defaults({\n opacity: 1\n }, seriesScope.lineStyle)\n }, seriesModel);\n }\n } else if (edgeShape === 'polyline') {\n if (seriesScope.layout === 'orthogonal') {\n if (node !== virtualRoot && node.children && node.children.length !== 0 && node.isExpand === true) {\n var children = node.children;\n var childPoints = [];\n\n for (var i = 0; i < children.length; i++) {\n var childLayout = children[i].getLayout();\n childPoints.push([childLayout.x, childLayout.y]);\n }\n\n if (!edge) {\n edge = symbolEl.__edge = new TreeShape({\n shape: {\n parentPoint: [targetLayout.x, targetLayout.y],\n childPoints: [[targetLayout.x, targetLayout.y]],\n orient: seriesScope.orient,\n forkPosition: seriesScope.edgeForkPosition\n },\n style: zrUtil.defaults({\n opacity: 0,\n strokeNoScale: true\n }, seriesScope.lineStyle)\n });\n }\n\n graphic.updateProps(edge, {\n shape: {\n parentPoint: [targetLayout.x, targetLayout.y],\n childPoints: childPoints\n },\n style: zrUtil.defaults({\n opacity: 1\n }, seriesScope.lineStyle)\n }, seriesModel);\n }\n } else {}\n }\n\n group.add(edge);\n}\n\nfunction removeNode(data, dataIndex, symbolEl, group, seriesModel, seriesScope) {\n var node = data.tree.getNodeByDataIndex(dataIndex);\n var virtualRoot = data.tree.root;\n var itemModel = node.getModel();\n var seriesScope = getTreeNodeStyle(node, itemModel, seriesScope);\n var source = node.parentNode === virtualRoot ? node : node.parentNode || node;\n var edgeShape = seriesScope.edgeShape;\n var sourceLayout;\n\n while (sourceLayout = source.getLayout(), sourceLayout == null) {\n source = source.parentNode === virtualRoot ? source : source.parentNode || source;\n }\n\n graphic.updateProps(symbolEl, {\n position: [sourceLayout.x + 1, sourceLayout.y + 1]\n }, seriesModel, function () {\n group.remove(symbolEl);\n data.setItemGraphicEl(dataIndex, null);\n });\n symbolEl.fadeOut(null, {\n keepLabel: true\n });\n var sourceSymbolEl = data.getItemGraphicEl(source.dataIndex);\n var sourceEdge = sourceSymbolEl.__edge; // 1. when expand the sub tree, delete the children node should delete the edge of\n // the source at the same time. because the polyline edge shape is only owned by the source.\n // 2.when the node is the only children of the source, delete the node should delete the edge of\n // the source at the same time. the same reason as above.\n\n var edge = symbolEl.__edge || (source.isExpand === false || source.children.length === 1 ? sourceEdge : undefined);\n var edgeShape = seriesScope.edgeShape;\n\n if (edge) {\n if (edgeShape === 'curve') {\n graphic.updateProps(edge, {\n shape: getEdgeShape(seriesScope, sourceLayout, sourceLayout),\n style: {\n opacity: 0\n }\n }, seriesModel, function () {\n group.remove(edge);\n });\n } else if (edgeShape === 'polyline' && seriesScope.layout === 'orthogonal') {\n graphic.updateProps(edge, {\n shape: {\n parentPoint: [sourceLayout.x, sourceLayout.y],\n childPoints: [[sourceLayout.x, sourceLayout.y]]\n },\n style: {\n opacity: 0\n }\n }, seriesModel, function () {\n group.remove(edge);\n });\n }\n }\n}\n\nfunction getEdgeShape(seriesScope, sourceLayout, targetLayout) {\n var cpx1;\n var cpy1;\n var cpx2;\n var cpy2;\n var orient = seriesScope.orient;\n var x1;\n var x2;\n var y1;\n var y2;\n\n if (seriesScope.layout === 'radial') {\n x1 = sourceLayout.rawX;\n y1 = sourceLayout.rawY;\n x2 = targetLayout.rawX;\n y2 = targetLayout.rawY;\n var radialCoor1 = radialCoordinate(x1, y1);\n var radialCoor2 = radialCoordinate(x1, y1 + (y2 - y1) * seriesScope.curvature);\n var radialCoor3 = radialCoordinate(x2, y2 + (y1 - y2) * seriesScope.curvature);\n var radialCoor4 = radialCoordinate(x2, y2);\n return {\n x1: radialCoor1.x,\n y1: radialCoor1.y,\n x2: radialCoor4.x,\n y2: radialCoor4.y,\n cpx1: radialCoor2.x,\n cpy1: radialCoor2.y,\n cpx2: radialCoor3.x,\n cpy2: radialCoor3.y\n };\n } else {\n x1 = sourceLayout.x;\n y1 = sourceLayout.y;\n x2 = targetLayout.x;\n y2 = targetLayout.y;\n\n if (orient === 'LR' || orient === 'RL') {\n cpx1 = x1 + (x2 - x1) * seriesScope.curvature;\n cpy1 = y1;\n cpx2 = x2 + (x1 - x2) * seriesScope.curvature;\n cpy2 = y2;\n }\n\n if (orient === 'TB' || orient === 'BT') {\n cpx1 = x1;\n cpy1 = y1 + (y2 - y1) * seriesScope.curvature;\n cpx2 = x2;\n cpy2 = y2 + (y1 - y2) * seriesScope.curvature;\n }\n }\n\n return {\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2,\n cpx1: cpx1,\n cpy1: cpy1,\n cpx2: cpx2,\n cpy2: cpy2\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Traverse the tree from bottom to top and do something\n * @param {module:echarts/data/Tree~TreeNode} root The real root of the tree\n * @param {Function} callback\n */\nfunction eachAfter(root, callback, separation) {\n var nodes = [root];\n var next = [];\n var node;\n\n while (node = nodes.pop()) {\n // jshint ignore:line\n next.push(node);\n\n if (node.isExpand) {\n var children = node.children;\n\n if (children.length) {\n for (var i = 0; i < children.length; i++) {\n nodes.push(children[i]);\n }\n }\n }\n }\n\n while (node = next.pop()) {\n // jshint ignore:line\n callback(node, separation);\n }\n}\n/**\n * Traverse the tree from top to bottom and do something\n * @param {module:echarts/data/Tree~TreeNode} root The real root of the tree\n * @param {Function} callback\n */\n\n\nfunction eachBefore(root, callback) {\n var nodes = [root];\n var node;\n\n while (node = nodes.pop()) {\n // jshint ignore:line\n callback(node);\n\n if (node.isExpand) {\n var children = node.children;\n\n if (children.length) {\n for (var i = children.length - 1; i >= 0; i--) {\n nodes.push(children[i]);\n }\n }\n }\n }\n}\n\nexports.eachAfter = eachAfter;\nexports.eachBefore = eachBefore;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar each = zrUtil.each;\nvar ATTR = '\\0_ec_hist_store';\n/**\n * @param {module:echarts/model/Global} ecModel\n * @param {Object} newSnapshot {dataZoomId, batch: [payloadInfo, ...]}\n */\n\nfunction push(ecModel, newSnapshot) {\n var store = giveStore(ecModel); // If previous dataZoom can not be found,\n // complete an range with current range.\n\n each(newSnapshot, function (batchItem, dataZoomId) {\n var i = store.length - 1;\n\n for (; i >= 0; i--) {\n var snapshot = store[i];\n\n if (snapshot[dataZoomId]) {\n break;\n }\n }\n\n if (i < 0) {\n // No origin range set, create one by current range.\n var dataZoomModel = ecModel.queryComponents({\n mainType: 'dataZoom',\n subType: 'select',\n id: dataZoomId\n })[0];\n\n if (dataZoomModel) {\n var percentRange = dataZoomModel.getPercentRange();\n store[0][dataZoomId] = {\n dataZoomId: dataZoomId,\n start: percentRange[0],\n end: percentRange[1]\n };\n }\n }\n });\n store.push(newSnapshot);\n}\n/**\n * @param {module:echarts/model/Global} ecModel\n * @return {Object} snapshot\n */\n\n\nfunction pop(ecModel) {\n var store = giveStore(ecModel);\n var head = store[store.length - 1];\n store.length > 1 && store.pop(); // Find top for all dataZoom.\n\n var snapshot = {};\n each(head, function (batchItem, dataZoomId) {\n for (var i = store.length - 1; i >= 0; i--) {\n var batchItem = store[i][dataZoomId];\n\n if (batchItem) {\n snapshot[dataZoomId] = batchItem;\n break;\n }\n }\n });\n return snapshot;\n}\n/**\n * @param {module:echarts/model/Global} ecModel\n */\n\n\nfunction clear(ecModel) {\n ecModel[ATTR] = null;\n}\n/**\n * @param {module:echarts/model/Global} ecModel\n * @return {number} records. always >= 1.\n */\n\n\nfunction count(ecModel) {\n return giveStore(ecModel).length;\n}\n/**\n * [{key: dataZoomId, value: {dataZoomId, range}}, ...]\n * History length of each dataZoom may be different.\n * this._history[0] is used to store origin range.\n * @type {Array.}\n */\n\n\nfunction giveStore(ecModel) {\n var store = ecModel[ATTR];\n\n if (!store) {\n store = ecModel[ATTR] = [{}];\n }\n\n return store;\n}\n\nexports.push = push;\nexports.pop = pop;\nexports.clear = clear;\nexports.count = count;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Data selectable mixin for chart series.\n * To eanble data select, option of series must have `selectedMode`.\n * And each data item will use `selected` to toggle itself selected status\n */\nvar _default = {\n /**\n * @param {Array.} targetList [{name, value, selected}, ...]\n * If targetList is an array, it should like [{name: ..., value: ...}, ...].\n * If targetList is a \"List\", it must have coordDim: 'value' dimension and name.\n */\n updateSelectedMap: function (targetList) {\n this._targetList = zrUtil.isArray(targetList) ? targetList.slice() : [];\n this._selectTargetMap = zrUtil.reduce(targetList || [], function (targetMap, target) {\n targetMap.set(target.name, target);\n return targetMap;\n }, zrUtil.createHashMap());\n },\n\n /**\n * Either name or id should be passed as input here.\n * If both of them are defined, id is used.\n *\n * @param {string|undefined} name name of data\n * @param {number|undefined} id dataIndex of data\n */\n // PENGING If selectedMode is null ?\n select: function (name, id) {\n var target = id != null ? this._targetList[id] : this._selectTargetMap.get(name);\n var selectedMode = this.get('selectedMode');\n\n if (selectedMode === 'single') {\n this._selectTargetMap.each(function (target) {\n target.selected = false;\n });\n }\n\n target && (target.selected = true);\n },\n\n /**\n * Either name or id should be passed as input here.\n * If both of them are defined, id is used.\n *\n * @param {string|undefined} name name of data\n * @param {number|undefined} id dataIndex of data\n */\n unSelect: function (name, id) {\n var target = id != null ? this._targetList[id] : this._selectTargetMap.get(name); // var selectedMode = this.get('selectedMode');\n // selectedMode !== 'single' && target && (target.selected = false);\n\n target && (target.selected = false);\n },\n\n /**\n * Either name or id should be passed as input here.\n * If both of them are defined, id is used.\n *\n * @param {string|undefined} name name of data\n * @param {number|undefined} id dataIndex of data\n */\n toggleSelected: function (name, id) {\n var target = id != null ? this._targetList[id] : this._selectTargetMap.get(name);\n\n if (target != null) {\n this[target.selected ? 'unSelect' : 'select'](name, id);\n return target.selected;\n }\n },\n\n /**\n * Either name or id should be passed as input here.\n * If both of them are defined, id is used.\n *\n * @param {string|undefined} name name of data\n * @param {number|undefined} id dataIndex of data\n */\n isSelected: function (name, id) {\n var target = id != null ? this._targetList[id] : this._selectTargetMap.get(name);\n return target && target.selected;\n }\n};\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar createHashMap = _util.createHashMap;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n ecModel.eachSeriesByType('themeRiver', function (seriesModel) {\n var data = seriesModel.getData();\n var rawData = seriesModel.getRawData();\n var colorList = seriesModel.get('color');\n var idxMap = createHashMap();\n data.each(function (idx) {\n idxMap.set(data.getRawIndex(idx), idx);\n });\n rawData.each(function (rawIndex) {\n var name = rawData.getName(rawIndex);\n var color = colorList[(seriesModel.nameMap.get(name) - 1) % colorList.length];\n rawData.setItemVisual(rawIndex, 'color', color);\n var idx = idxMap.get(rawIndex);\n\n if (idx != null) {\n data.setItemVisual(idx, 'color', color);\n }\n });\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar List = require(\"../../data/List\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar concatArray = _util.concatArray;\nvar mergeAll = _util.mergeAll;\nvar map = _util.map;\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\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/* global Uint32Array, Float64Array, Float32Array */\nvar Uint32Arr = typeof Uint32Array === 'undefined' ? Array : Uint32Array;\nvar Float64Arr = typeof Float64Array === 'undefined' ? Array : Float64Array;\n\nfunction compatEc2(seriesOpt) {\n var data = seriesOpt.data;\n\n if (data && data[0] && data[0][0] && data[0][0].coord) {\n seriesOpt.data = map(data, function (itemOpt) {\n var coords = [itemOpt[0].coord, itemOpt[1].coord];\n var target = {\n coords: coords\n };\n\n if (itemOpt[0].name) {\n target.fromName = itemOpt[0].name;\n }\n\n if (itemOpt[1].name) {\n target.toName = itemOpt[1].name;\n }\n\n return mergeAll([target, itemOpt[0], itemOpt[1]]);\n });\n }\n}\n\nvar LinesSeries = SeriesModel.extend({\n type: 'series.lines',\n dependencies: ['grid', 'polar'],\n visualColorAccessPath: 'lineStyle.color',\n init: function (option) {\n // The input data may be null/undefined.\n option.data = option.data || []; // Not using preprocessor because mergeOption may not have series.type\n\n compatEc2(option);\n\n var result = this._processFlatCoordsArray(option.data);\n\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n\n if (result.flatCoords) {\n option.data = new Float32Array(result.count);\n }\n\n LinesSeries.superApply(this, 'init', arguments);\n },\n mergeOption: function (option) {\n compatEc2(option);\n\n if (option.data) {\n // Only update when have option data to merge.\n var result = this._processFlatCoordsArray(option.data);\n\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n\n if (result.flatCoords) {\n option.data = new Float32Array(result.count);\n }\n }\n\n LinesSeries.superApply(this, 'mergeOption', arguments);\n },\n appendData: function (params) {\n var result = this._processFlatCoordsArray(params.data);\n\n if (result.flatCoords) {\n if (!this._flatCoords) {\n this._flatCoords = result.flatCoords;\n this._flatCoordsOffset = result.flatCoordsOffset;\n } else {\n this._flatCoords = concatArray(this._flatCoords, result.flatCoords);\n this._flatCoordsOffset = concatArray(this._flatCoordsOffset, result.flatCoordsOffset);\n }\n\n params.data = new Float32Array(result.count);\n }\n\n this.getRawData().appendData(params.data);\n },\n _getCoordsFromItemModel: function (idx) {\n var itemModel = this.getData().getItemModel(idx);\n var coords = itemModel.option instanceof Array ? itemModel.option : itemModel.getShallow('coords');\n return coords;\n },\n getLineCoordsCount: function (idx) {\n if (this._flatCoordsOffset) {\n return this._flatCoordsOffset[idx * 2 + 1];\n } else {\n return this._getCoordsFromItemModel(idx).length;\n }\n },\n getLineCoords: function (idx, out) {\n if (this._flatCoordsOffset) {\n var offset = this._flatCoordsOffset[idx * 2];\n var len = this._flatCoordsOffset[idx * 2 + 1];\n\n for (var i = 0; i < len; i++) {\n out[i] = out[i] || [];\n out[i][0] = this._flatCoords[offset + i * 2];\n out[i][1] = this._flatCoords[offset + i * 2 + 1];\n }\n\n return len;\n } else {\n var coords = this._getCoordsFromItemModel(idx);\n\n for (var i = 0; i < coords.length; i++) {\n out[i] = out[i] || [];\n out[i][0] = coords[i][0];\n out[i][1] = coords[i][1];\n }\n\n return coords.length;\n }\n },\n _processFlatCoordsArray: function (data) {\n var startOffset = 0;\n\n if (this._flatCoords) {\n startOffset = this._flatCoords.length;\n } // Stored as a typed array. In format\n // Points Count(2) | x | y | x | y | Points Count(3) | x | y | x | y | x | y |\n\n\n if (typeof data[0] === 'number') {\n var len = data.length; // Store offset and len of each segment\n\n var coordsOffsetAndLenStorage = new Uint32Arr(len);\n var coordsStorage = new Float64Arr(len);\n var coordsCursor = 0;\n var offsetCursor = 0;\n var dataCount = 0;\n\n for (var i = 0; i < len;) {\n dataCount++;\n var count = data[i++]; // Offset\n\n coordsOffsetAndLenStorage[offsetCursor++] = coordsCursor + startOffset; // Len\n\n coordsOffsetAndLenStorage[offsetCursor++] = count;\n\n for (var k = 0; k < count; k++) {\n var x = data[i++];\n var y = data[i++];\n coordsStorage[coordsCursor++] = x;\n coordsStorage[coordsCursor++] = y;\n\n if (i > len) {}\n }\n }\n\n return {\n flatCoordsOffset: new Uint32Array(coordsOffsetAndLenStorage.buffer, 0, offsetCursor),\n flatCoords: coordsStorage,\n count: dataCount\n };\n }\n\n return {\n flatCoordsOffset: null,\n flatCoords: null,\n count: data.length\n };\n },\n getInitialData: function (option, ecModel) {\n var lineData = new List(['value'], this);\n lineData.hasItemOption = false;\n lineData.initData(option.data, [], function (dataItem, dimName, dataIndex, dimIndex) {\n // dataItem is simply coords\n if (dataItem instanceof Array) {\n return NaN;\n } else {\n lineData.hasItemOption = true;\n var value = dataItem.value;\n\n if (value != null) {\n return value instanceof Array ? value[dimIndex] : value;\n }\n }\n });\n return lineData;\n },\n formatTooltip: function (dataIndex) {\n var data = this.getData();\n var itemModel = data.getItemModel(dataIndex);\n var name = itemModel.get('name');\n\n if (name) {\n return name;\n }\n\n var fromName = itemModel.get('fromName');\n var toName = itemModel.get('toName');\n var html = [];\n fromName != null && html.push(fromName);\n toName != null && html.push(toName);\n return encodeHTML(html.join(' > '));\n },\n preventIncremental: function () {\n return !!this.get('effect.show');\n },\n getProgressive: function () {\n var progressive = this.option.progressive;\n\n if (progressive == null) {\n return this.option.large ? 1e4 : this.get('progressive');\n }\n\n return progressive;\n },\n getProgressiveThreshold: function () {\n var progressiveThreshold = this.option.progressiveThreshold;\n\n if (progressiveThreshold == null) {\n return this.option.large ? 2e4 : this.get('progressiveThreshold');\n }\n\n return progressiveThreshold;\n },\n defaultOption: {\n coordinateSystem: 'geo',\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n hoverAnimation: true,\n // Cartesian coordinate system\n xAxisIndex: 0,\n yAxisIndex: 0,\n symbol: ['none', 'none'],\n symbolSize: [10, 10],\n // Geo coordinate system\n geoIndex: 0,\n effect: {\n show: false,\n period: 4,\n // Animation delay. support callback\n // delay: 0,\n // If move with constant speed px/sec\n // period will be ignored if this property is > 0,\n constantSpeed: 0,\n symbol: 'circle',\n symbolSize: 3,\n loop: true,\n // Length of trail, 0 - 1\n trailLength: 0.2 // Same with lineStyle.color\n // color\n\n },\n large: false,\n // Available when large is true\n largeThreshold: 2000,\n // If lines are polyline\n // polyline not support curveness, label, animation\n polyline: false,\n // If clip the overflow.\n // Available when coordinateSystem is cartesian or polar.\n clip: true,\n label: {\n show: false,\n position: 'end' // distance: 5,\n // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n\n },\n lineStyle: {\n opacity: 0.5\n }\n }\n});\nvar _default = LinesSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar formatUtil = require(\"../../util/format\");\n\nvar layout = require(\"../../util/layout\");\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = echarts.extendComponentView({\n type: 'visualMap',\n\n /**\n * @readOnly\n * @type {Object}\n */\n autoPositionValues: {\n left: 1,\n right: 1,\n top: 1,\n bottom: 1\n },\n init: function (ecModel, api) {\n /**\n * @readOnly\n * @type {module:echarts/model/Global}\n */\n this.ecModel = ecModel;\n /**\n * @readOnly\n * @type {module:echarts/ExtensionAPI}\n */\n\n this.api = api;\n /**\n * @readOnly\n * @type {module:echarts/component/visualMap/visualMapModel}\n */\n\n this.visualMapModel;\n },\n\n /**\n * @protected\n */\n render: function (visualMapModel, ecModel, api, payload) {\n this.visualMapModel = visualMapModel;\n\n if (visualMapModel.get('show') === false) {\n this.group.removeAll();\n return;\n }\n\n this.doRender.apply(this, arguments);\n },\n\n /**\n * @protected\n */\n renderBackground: function (group) {\n var visualMapModel = this.visualMapModel;\n var padding = formatUtil.normalizeCssArray(visualMapModel.get('padding') || 0);\n var rect = group.getBoundingRect();\n group.add(new graphic.Rect({\n z2: -1,\n // Lay background rect on the lowest layer.\n silent: true,\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[3] + padding[1],\n height: rect.height + padding[0] + padding[2]\n },\n style: {\n fill: visualMapModel.get('backgroundColor'),\n stroke: visualMapModel.get('borderColor'),\n lineWidth: visualMapModel.get('borderWidth')\n }\n }));\n },\n\n /**\n * @protected\n * @param {number} targetValue can be Infinity or -Infinity\n * @param {string=} visualCluster Only can be 'color' 'opacity' 'symbol' 'symbolSize'\n * @param {Object} [opts]\n * @param {string=} [opts.forceState] Specify state, instead of using getValueState method.\n * @param {string=} [opts.convertOpacityToAlpha=false] For color gradient in controller widget.\n * @return {*} Visual value.\n */\n getControllerVisual: function (targetValue, visualCluster, opts) {\n opts = opts || {};\n var forceState = opts.forceState;\n var visualMapModel = this.visualMapModel;\n var visualObj = {}; // Default values.\n\n if (visualCluster === 'symbol') {\n visualObj.symbol = visualMapModel.get('itemSymbol');\n }\n\n if (visualCluster === 'color') {\n var defaultColor = visualMapModel.get('contentColor');\n visualObj.color = defaultColor;\n }\n\n function getter(key) {\n return visualObj[key];\n }\n\n function setter(key, value) {\n visualObj[key] = value;\n }\n\n var mappings = visualMapModel.controllerVisuals[forceState || visualMapModel.getValueState(targetValue)];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n zrUtil.each(visualTypes, function (type) {\n var visualMapping = mappings[type];\n\n if (opts.convertOpacityToAlpha && type === 'opacity') {\n type = 'colorAlpha';\n visualMapping = mappings.__alphaForOpacity;\n }\n\n if (VisualMapping.dependsOn(type, visualCluster)) {\n visualMapping && visualMapping.applyVisual(targetValue, getter, setter);\n }\n });\n return visualObj[visualCluster];\n },\n\n /**\n * @protected\n */\n positionGroup: function (group) {\n var model = this.visualMapModel;\n var api = this.api;\n layout.positionElement(group, model.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n },\n\n /**\n * @protected\n * @abstract\n */\n doRender: zrUtil.noop\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _clazz = require(\"../util/clazz\");\n\nvar enableClassCheck = _clazz.enableClassCheck;\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// id may be function name of Object, add a prefix to avoid this problem.\nfunction generateNodeKey(id) {\n return '_EC_' + id;\n}\n/**\n * @alias module:echarts/data/Graph\n * @constructor\n * @param {boolean} directed\n */\n\n\nvar Graph = function (directed) {\n /**\n * 是否是有向图\n * @type {boolean}\n * @private\n */\n this._directed = directed || false;\n /**\n * @type {Array.}\n * @readOnly\n */\n\n this.nodes = [];\n /**\n * @type {Array.}\n * @readOnly\n */\n\n this.edges = [];\n /**\n * @type {Object.}\n * @private\n */\n\n this._nodesMap = {};\n /**\n * @type {Object.}\n * @private\n */\n\n this._edgesMap = {};\n /**\n * @type {module:echarts/data/List}\n * @readOnly\n */\n\n this.data;\n /**\n * @type {module:echarts/data/List}\n * @readOnly\n */\n\n this.edgeData;\n};\n\nvar graphProto = Graph.prototype;\n/**\n * @type {string}\n */\n\ngraphProto.type = 'graph';\n/**\n * If is directed graph\n * @return {boolean}\n */\n\ngraphProto.isDirected = function () {\n return this._directed;\n};\n/**\n * Add a new node\n * @param {string} id\n * @param {number} [dataIndex]\n */\n\n\ngraphProto.addNode = function (id, dataIndex) {\n id = id == null ? '' + dataIndex : '' + id;\n var nodesMap = this._nodesMap;\n\n if (nodesMap[generateNodeKey(id)]) {\n return;\n }\n\n var node = new Node(id, dataIndex);\n node.hostGraph = this;\n this.nodes.push(node);\n nodesMap[generateNodeKey(id)] = node;\n return node;\n};\n/**\n * Get node by data index\n * @param {number} dataIndex\n * @return {module:echarts/data/Graph~Node}\n */\n\n\ngraphProto.getNodeByIndex = function (dataIndex) {\n var rawIdx = this.data.getRawIndex(dataIndex);\n return this.nodes[rawIdx];\n};\n/**\n * Get node by id\n * @param {string} id\n * @return {module:echarts/data/Graph.Node}\n */\n\n\ngraphProto.getNodeById = function (id) {\n return this._nodesMap[generateNodeKey(id)];\n};\n/**\n * Add a new edge\n * @param {number|string|module:echarts/data/Graph.Node} n1\n * @param {number|string|module:echarts/data/Graph.Node} n2\n * @param {number} [dataIndex=-1]\n * @return {module:echarts/data/Graph.Edge}\n */\n\n\ngraphProto.addEdge = function (n1, n2, dataIndex) {\n var nodesMap = this._nodesMap;\n var edgesMap = this._edgesMap; // PNEDING\n\n if (typeof n1 === 'number') {\n n1 = this.nodes[n1];\n }\n\n if (typeof n2 === 'number') {\n n2 = this.nodes[n2];\n }\n\n if (!Node.isInstance(n1)) {\n n1 = nodesMap[generateNodeKey(n1)];\n }\n\n if (!Node.isInstance(n2)) {\n n2 = nodesMap[generateNodeKey(n2)];\n }\n\n if (!n1 || !n2) {\n return;\n }\n\n var key = n1.id + '-' + n2.id;\n var edge = new Edge(n1, n2, dataIndex);\n edge.hostGraph = this;\n\n if (this._directed) {\n n1.outEdges.push(edge);\n n2.inEdges.push(edge);\n }\n\n n1.edges.push(edge);\n\n if (n1 !== n2) {\n n2.edges.push(edge);\n }\n\n this.edges.push(edge);\n edgesMap[key] = edge;\n return edge;\n};\n/**\n * Get edge by data index\n * @param {number} dataIndex\n * @return {module:echarts/data/Graph~Node}\n */\n\n\ngraphProto.getEdgeByIndex = function (dataIndex) {\n var rawIdx = this.edgeData.getRawIndex(dataIndex);\n return this.edges[rawIdx];\n};\n/**\n * Get edge by two linked nodes\n * @param {module:echarts/data/Graph.Node|string} n1\n * @param {module:echarts/data/Graph.Node|string} n2\n * @return {module:echarts/data/Graph.Edge}\n */\n\n\ngraphProto.getEdge = function (n1, n2) {\n if (Node.isInstance(n1)) {\n n1 = n1.id;\n }\n\n if (Node.isInstance(n2)) {\n n2 = n2.id;\n }\n\n var edgesMap = this._edgesMap;\n\n if (this._directed) {\n return edgesMap[n1 + '-' + n2];\n } else {\n return edgesMap[n1 + '-' + n2] || edgesMap[n2 + '-' + n1];\n }\n};\n/**\n * Iterate all nodes\n * @param {Function} cb\n * @param {*} [context]\n */\n\n\ngraphProto.eachNode = function (cb, context) {\n var nodes = this.nodes;\n var len = nodes.length;\n\n for (var i = 0; i < len; i++) {\n if (nodes[i].dataIndex >= 0) {\n cb.call(context, nodes[i], i);\n }\n }\n};\n/**\n * Iterate all edges\n * @param {Function} cb\n * @param {*} [context]\n */\n\n\ngraphProto.eachEdge = function (cb, context) {\n var edges = this.edges;\n var len = edges.length;\n\n for (var i = 0; i < len; i++) {\n if (edges[i].dataIndex >= 0 && edges[i].node1.dataIndex >= 0 && edges[i].node2.dataIndex >= 0) {\n cb.call(context, edges[i], i);\n }\n }\n};\n/**\n * Breadth first traverse\n * @param {Function} cb\n * @param {module:echarts/data/Graph.Node} startNode\n * @param {string} [direction='none'] 'none'|'in'|'out'\n * @param {*} [context]\n */\n\n\ngraphProto.breadthFirstTraverse = function (cb, startNode, direction, context) {\n if (!Node.isInstance(startNode)) {\n startNode = this._nodesMap[generateNodeKey(startNode)];\n }\n\n if (!startNode) {\n return;\n }\n\n var edgeType = direction === 'out' ? 'outEdges' : direction === 'in' ? 'inEdges' : 'edges';\n\n for (var i = 0; i < this.nodes.length; i++) {\n this.nodes[i].__visited = false;\n }\n\n if (cb.call(context, startNode, null)) {\n return;\n }\n\n var queue = [startNode];\n\n while (queue.length) {\n var currentNode = queue.shift();\n var edges = currentNode[edgeType];\n\n for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n var otherNode = e.node1 === currentNode ? e.node2 : e.node1;\n\n if (!otherNode.__visited) {\n if (cb.call(context, otherNode, currentNode)) {\n // Stop traversing\n return;\n }\n\n queue.push(otherNode);\n otherNode.__visited = true;\n }\n }\n }\n}; // TODO\n// graphProto.depthFirstTraverse = function (\n// cb, startNode, direction, context\n// ) {\n// };\n// Filter update\n\n\ngraphProto.update = function () {\n var data = this.data;\n var edgeData = this.edgeData;\n var nodes = this.nodes;\n var edges = this.edges;\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n nodes[i].dataIndex = -1;\n }\n\n for (var i = 0, len = data.count(); i < len; i++) {\n nodes[data.getRawIndex(i)].dataIndex = i;\n }\n\n edgeData.filterSelf(function (idx) {\n var edge = edges[edgeData.getRawIndex(idx)];\n return edge.node1.dataIndex >= 0 && edge.node2.dataIndex >= 0;\n }); // Update edge\n\n for (var i = 0, len = edges.length; i < len; i++) {\n edges[i].dataIndex = -1;\n }\n\n for (var i = 0, len = edgeData.count(); i < len; i++) {\n edges[edgeData.getRawIndex(i)].dataIndex = i;\n }\n};\n/**\n * @return {module:echarts/data/Graph}\n */\n\n\ngraphProto.clone = function () {\n var graph = new Graph(this._directed);\n var nodes = this.nodes;\n var edges = this.edges;\n\n for (var i = 0; i < nodes.length; i++) {\n graph.addNode(nodes[i].id, nodes[i].dataIndex);\n }\n\n for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n graph.addEdge(e.node1.id, e.node2.id, e.dataIndex);\n }\n\n return graph;\n};\n/**\n * @alias module:echarts/data/Graph.Node\n */\n\n\nfunction Node(id, dataIndex) {\n /**\n * @type {string}\n */\n this.id = id == null ? '' : id;\n /**\n * @type {Array.}\n */\n\n this.inEdges = [];\n /**\n * @type {Array.}\n */\n\n this.outEdges = [];\n /**\n * @type {Array.}\n */\n\n this.edges = [];\n /**\n * @type {module:echarts/data/Graph}\n */\n\n this.hostGraph;\n /**\n * @type {number}\n */\n\n this.dataIndex = dataIndex == null ? -1 : dataIndex;\n}\n\nNode.prototype = {\n constructor: Node,\n\n /**\n * @return {number}\n */\n degree: function () {\n return this.edges.length;\n },\n\n /**\n * @return {number}\n */\n inDegree: function () {\n return this.inEdges.length;\n },\n\n /**\n * @return {number}\n */\n outDegree: function () {\n return this.outEdges.length;\n },\n\n /**\n * @param {string} [path]\n * @return {module:echarts/model/Model}\n */\n getModel: function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n\n var graph = this.hostGraph;\n var itemModel = graph.data.getItemModel(this.dataIndex);\n return itemModel.getModel(path);\n }\n};\n/**\n * 图边\n * @alias module:echarts/data/Graph.Edge\n * @param {module:echarts/data/Graph.Node} n1\n * @param {module:echarts/data/Graph.Node} n2\n * @param {number} [dataIndex=-1]\n */\n\nfunction Edge(n1, n2, dataIndex) {\n /**\n * 节点1,如果是有向图则为源节点\n * @type {module:echarts/data/Graph.Node}\n */\n this.node1 = n1;\n /**\n * 节点2,如果是有向图则为目标节点\n * @type {module:echarts/data/Graph.Node}\n */\n\n this.node2 = n2;\n this.dataIndex = dataIndex == null ? -1 : dataIndex;\n}\n/**\n * @param {string} [path]\n * @return {module:echarts/model/Model}\n */\n\n\nEdge.prototype.getModel = function (path) {\n if (this.dataIndex < 0) {\n return;\n }\n\n var graph = this.hostGraph;\n var itemModel = graph.edgeData.getItemModel(this.dataIndex);\n return itemModel.getModel(path);\n};\n\nvar createGraphDataProxyMixin = function (hostName, dataName) {\n return {\n /**\n * @param {string=} [dimension='value'] Default 'value'. can be 'a', 'b', 'c', 'd', 'e'.\n * @return {number}\n */\n getValue: function (dimension) {\n var data = this[hostName][dataName];\n return data.get(data.getDimension(dimension || 'value'), this.dataIndex);\n },\n\n /**\n * @param {Object|string} key\n * @param {*} [value]\n */\n setVisual: function (key, value) {\n this.dataIndex >= 0 && this[hostName][dataName].setItemVisual(this.dataIndex, key, value);\n },\n\n /**\n * @param {string} key\n * @return {boolean}\n */\n getVisual: function (key, ignoreParent) {\n return this[hostName][dataName].getItemVisual(this.dataIndex, key, ignoreParent);\n },\n\n /**\n * @param {Object} layout\n * @return {boolean} [merge=false]\n */\n setLayout: function (layout, merge) {\n this.dataIndex >= 0 && this[hostName][dataName].setItemLayout(this.dataIndex, layout, merge);\n },\n\n /**\n * @return {Object}\n */\n getLayout: function () {\n return this[hostName][dataName].getItemLayout(this.dataIndex);\n },\n\n /**\n * @return {module:zrender/Element}\n */\n getGraphicEl: function () {\n return this[hostName][dataName].getItemGraphicEl(this.dataIndex);\n },\n\n /**\n * @return {number}\n */\n getRawIndex: function () {\n return this[hostName][dataName].getRawIndex(this.dataIndex);\n }\n };\n};\n\nzrUtil.mixin(Node, createGraphDataProxyMixin('hostGraph', 'data'));\nzrUtil.mixin(Edge, createGraphDataProxyMixin('hostGraph', 'edgeData'));\nGraph.Node = Node;\nGraph.Edge = Edge;\nenableClassCheck(Node);\nenableClassCheck(Edge);\nvar _default = Graph;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar LineGroup = require(\"./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 * @module echarts/chart/helper/LineDraw\n */\n// import IncrementalDisplayable from 'zrender/src/graphic/IncrementalDisplayable';\n\n/**\n * @alias module:echarts/component/marker/LineDraw\n * @constructor\n */\nfunction LineDraw(ctor) {\n this._ctor = ctor || LineGroup;\n this.group = new graphic.Group();\n}\n\nvar lineDrawProto = LineDraw.prototype;\n\nlineDrawProto.isPersistent = function () {\n return true;\n};\n/**\n * @param {module:echarts/data/List} lineData\n */\n\n\nlineDrawProto.updateData = function (lineData) {\n var lineDraw = this;\n var group = lineDraw.group;\n var oldLineData = lineDraw._lineData;\n lineDraw._lineData = lineData; // There is no oldLineData only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n\n if (!oldLineData) {\n group.removeAll();\n }\n\n var seriesScope = makeSeriesScope(lineData);\n lineData.diff(oldLineData).add(function (idx) {\n doAdd(lineDraw, lineData, idx, seriesScope);\n }).update(function (newIdx, oldIdx) {\n doUpdate(lineDraw, oldLineData, lineData, oldIdx, newIdx, seriesScope);\n }).remove(function (idx) {\n group.remove(oldLineData.getItemGraphicEl(idx));\n }).execute();\n};\n\nfunction doAdd(lineDraw, lineData, idx, seriesScope) {\n var itemLayout = lineData.getItemLayout(idx);\n\n if (!lineNeedsDraw(itemLayout)) {\n return;\n }\n\n var el = new lineDraw._ctor(lineData, idx, seriesScope);\n lineData.setItemGraphicEl(idx, el);\n lineDraw.group.add(el);\n}\n\nfunction doUpdate(lineDraw, oldLineData, newLineData, oldIdx, newIdx, seriesScope) {\n var itemEl = oldLineData.getItemGraphicEl(oldIdx);\n\n if (!lineNeedsDraw(newLineData.getItemLayout(newIdx))) {\n lineDraw.group.remove(itemEl);\n return;\n }\n\n if (!itemEl) {\n itemEl = new lineDraw._ctor(newLineData, newIdx, seriesScope);\n } else {\n itemEl.updateData(newLineData, newIdx, seriesScope);\n }\n\n newLineData.setItemGraphicEl(newIdx, itemEl);\n lineDraw.group.add(itemEl);\n}\n\nlineDrawProto.updateLayout = function () {\n var lineData = this._lineData; // Do not support update layout in incremental mode.\n\n if (!lineData) {\n return;\n }\n\n lineData.eachItemGraphicEl(function (el, idx) {\n el.updateLayout(lineData, idx);\n }, this);\n};\n\nlineDrawProto.incrementalPrepareUpdate = function (lineData) {\n this._seriesScope = makeSeriesScope(lineData);\n this._lineData = null;\n this.group.removeAll();\n};\n\nfunction isEffectObject(el) {\n return el.animators && el.animators.length > 0;\n}\n\nlineDrawProto.incrementalUpdate = function (taskParams, lineData) {\n function updateIncrementalAndHover(el) {\n if (!el.isGroup && !isEffectObject(el)) {\n el.incremental = el.useHoverLayer = true;\n }\n }\n\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var itemLayout = lineData.getItemLayout(idx);\n\n if (lineNeedsDraw(itemLayout)) {\n var el = new this._ctor(lineData, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n this.group.add(el);\n lineData.setItemGraphicEl(idx, el);\n }\n }\n};\n\nfunction makeSeriesScope(lineData) {\n var hostModel = lineData.hostModel;\n return {\n lineStyle: hostModel.getModel('lineStyle').getLineStyle(),\n hoverLineStyle: hostModel.getModel('emphasis.lineStyle').getLineStyle(),\n labelModel: hostModel.getModel('label'),\n hoverLabelModel: hostModel.getModel('emphasis.label')\n };\n}\n\nlineDrawProto.remove = function () {\n this._clearIncremental();\n\n this._incremental = null;\n this.group.removeAll();\n};\n\nlineDrawProto._clearIncremental = function () {\n var incremental = this._incremental;\n\n if (incremental) {\n incremental.clearDisplaybles();\n }\n};\n\nfunction isPointNaN(pt) {\n return isNaN(pt[0]) || isNaN(pt[1]);\n}\n\nfunction lineNeedsDraw(pts) {\n return !isPointNaN(pts[0]) && !isPointNaN(pts[1]);\n}\n\nvar _default = LineDraw;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar preprocessor = require(\"./visualMap/preprocessor\");\n\nrequire(\"./visualMap/typeDefaulter\");\n\nrequire(\"./visualMap/visualEncoding\");\n\nrequire(\"./visualMap/ContinuousModel\");\n\nrequire(\"./visualMap/ContinuousView\");\n\nrequire(\"./visualMap/visualMapAction\");\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 * DataZoom component entry\n */\necharts.registerPreprocessor(preprocessor);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar MapDraw = require(\"../helper/MapDraw\");\n\nvar echarts = require(\"../../echarts\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = echarts.extendComponentView({\n type: 'geo',\n init: function (ecModel, api) {\n var mapDraw = new MapDraw(api, true);\n this._mapDraw = mapDraw;\n this.group.add(mapDraw.group);\n },\n render: function (geoModel, ecModel, api, payload) {\n // Not render if it is an toggleSelect action from self\n if (payload && payload.type === 'geoToggleSelect' && payload.from === this.uid) {\n return;\n }\n\n var mapDraw = this._mapDraw;\n\n if (geoModel.get('show')) {\n mapDraw.draw(geoModel, ecModel, api, this, payload);\n } else {\n this._mapDraw.group.removeAll();\n }\n\n this.group.silent = geoModel.get('silent');\n },\n dispose: function () {\n this._mapDraw && this._mapDraw.remove();\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar eventTool = require(\"zrender/lib/core/event\");\n\nvar lang = require(\"../../../lang\");\n\nvar featureManager = require(\"../featureManager\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar dataViewLang = lang.toolbox.dataView;\nvar BLOCK_SPLITER = new Array(60).join('-');\nvar ITEM_SPLITER = '\\t';\n/**\n * Group series into two types\n * 1. on category axis, like line, bar\n * 2. others, like scatter, pie\n * @param {module:echarts/model/Global} ecModel\n * @return {Object}\n * @inner\n */\n\nfunction groupSeries(ecModel) {\n var seriesGroupByCategoryAxis = {};\n var otherSeries = [];\n var meta = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && (coordSys.type === 'cartesian2d' || coordSys.type === 'polar')) {\n var baseAxis = coordSys.getBaseAxis();\n\n if (baseAxis.type === 'category') {\n var key = baseAxis.dim + '_' + baseAxis.index;\n\n if (!seriesGroupByCategoryAxis[key]) {\n seriesGroupByCategoryAxis[key] = {\n categoryAxis: baseAxis,\n valueAxis: coordSys.getOtherAxis(baseAxis),\n series: []\n };\n meta.push({\n axisDim: baseAxis.dim,\n axisIndex: baseAxis.index\n });\n }\n\n seriesGroupByCategoryAxis[key].series.push(seriesModel);\n } else {\n otherSeries.push(seriesModel);\n }\n } else {\n otherSeries.push(seriesModel);\n }\n });\n return {\n seriesGroupByCategoryAxis: seriesGroupByCategoryAxis,\n other: otherSeries,\n meta: meta\n };\n}\n/**\n * Assemble content of series on cateogory axis\n * @param {Array.} series\n * @return {string}\n * @inner\n */\n\n\nfunction assembleSeriesWithCategoryAxis(series) {\n var tables = [];\n zrUtil.each(series, function (group, key) {\n var categoryAxis = group.categoryAxis;\n var valueAxis = group.valueAxis;\n var valueAxisDim = valueAxis.dim;\n var headers = [' '].concat(zrUtil.map(group.series, function (series) {\n return series.name;\n }));\n var columns = [categoryAxis.model.getCategories()];\n zrUtil.each(group.series, function (series) {\n var rawData = series.getRawData();\n columns.push(series.getRawData().mapArray(rawData.mapDimension(valueAxisDim), function (val) {\n return val;\n }));\n }); // Assemble table content\n\n var lines = [headers.join(ITEM_SPLITER)];\n\n for (var i = 0; i < columns[0].length; i++) {\n var items = [];\n\n for (var j = 0; j < columns.length; j++) {\n items.push(columns[j][i]);\n }\n\n lines.push(items.join(ITEM_SPLITER));\n }\n\n tables.push(lines.join('\\n'));\n });\n return tables.join('\\n\\n' + BLOCK_SPLITER + '\\n\\n');\n}\n/**\n * Assemble content of other series\n * @param {Array.} series\n * @return {string}\n * @inner\n */\n\n\nfunction assembleOtherSeries(series) {\n return zrUtil.map(series, function (series) {\n var data = series.getRawData();\n var lines = [series.name];\n var vals = [];\n data.each(data.dimensions, function () {\n var argLen = arguments.length;\n var dataIndex = arguments[argLen - 1];\n var name = data.getName(dataIndex);\n\n for (var i = 0; i < argLen - 1; i++) {\n vals[i] = arguments[i];\n }\n\n lines.push((name ? name + ITEM_SPLITER : '') + vals.join(ITEM_SPLITER));\n });\n return lines.join('\\n');\n }).join('\\n\\n' + BLOCK_SPLITER + '\\n\\n');\n}\n/**\n * @param {module:echarts/model/Global}\n * @return {Object}\n * @inner\n */\n\n\nfunction getContentFromModel(ecModel) {\n var result = groupSeries(ecModel);\n return {\n value: zrUtil.filter([assembleSeriesWithCategoryAxis(result.seriesGroupByCategoryAxis), assembleOtherSeries(result.other)], function (str) {\n return str.replace(/[\\n\\t\\s]/g, '');\n }).join('\\n\\n' + BLOCK_SPLITER + '\\n\\n'),\n meta: result.meta\n };\n}\n\nfunction trim(str) {\n return str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n}\n/**\n * If a block is tsv format\n */\n\n\nfunction isTSVFormat(block) {\n // Simple method to find out if a block is tsv format\n var firstLine = block.slice(0, block.indexOf('\\n'));\n\n if (firstLine.indexOf(ITEM_SPLITER) >= 0) {\n return true;\n }\n}\n\nvar itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g');\n/**\n * @param {string} tsv\n * @return {Object}\n */\n\nfunction parseTSVContents(tsv) {\n var tsvLines = tsv.split(/\\n+/g);\n var headers = trim(tsvLines.shift()).split(itemSplitRegex);\n var categories = [];\n var series = zrUtil.map(headers, function (header) {\n return {\n name: header,\n data: []\n };\n });\n\n for (var i = 0; i < tsvLines.length; i++) {\n var items = trim(tsvLines[i]).split(itemSplitRegex);\n categories.push(items.shift());\n\n for (var j = 0; j < items.length; j++) {\n series[j] && (series[j].data[i] = items[j]);\n }\n }\n\n return {\n series: series,\n categories: categories\n };\n}\n/**\n * @param {string} str\n * @return {Array.}\n * @inner\n */\n\n\nfunction parseListContents(str) {\n var lines = str.split(/\\n+/g);\n var seriesName = trim(lines.shift());\n var data = [];\n\n for (var i = 0; i < lines.length; i++) {\n // if line is empty, ignore it.\n // there is a case that a user forgot to delete `\\n`.\n var line = trim(lines[i]);\n\n if (!line) {\n continue;\n }\n\n var items = line.split(itemSplitRegex);\n var name = '';\n var value;\n var hasName = false;\n\n if (isNaN(items[0])) {\n // First item is name\n hasName = true;\n name = items[0];\n items = items.slice(1);\n data[i] = {\n name: name,\n value: []\n };\n value = data[i].value;\n } else {\n value = data[i] = [];\n }\n\n for (var j = 0; j < items.length; j++) {\n value.push(+items[j]);\n }\n\n if (value.length === 1) {\n hasName ? data[i].value = value[0] : data[i] = value[0];\n }\n }\n\n return {\n name: seriesName,\n data: data\n };\n}\n/**\n * @param {string} str\n * @param {Array.} blockMetaList\n * @return {Object}\n * @inner\n */\n\n\nfunction parseContents(str, blockMetaList) {\n var blocks = str.split(new RegExp('\\n*' + BLOCK_SPLITER + '\\n*', 'g'));\n var newOption = {\n series: []\n };\n zrUtil.each(blocks, function (block, idx) {\n if (isTSVFormat(block)) {\n var result = parseTSVContents(block);\n var blockMeta = blockMetaList[idx];\n var axisKey = blockMeta.axisDim + 'Axis';\n\n if (blockMeta) {\n newOption[axisKey] = newOption[axisKey] || [];\n newOption[axisKey][blockMeta.axisIndex] = {\n data: result.categories\n };\n newOption.series = newOption.series.concat(result.series);\n }\n } else {\n var result = parseListContents(block);\n newOption.series.push(result);\n }\n });\n return newOption;\n}\n/**\n * @alias {module:echarts/component/toolbox/feature/DataView}\n * @constructor\n * @param {module:echarts/model/Model} model\n */\n\n\nfunction DataView(model) {\n this._dom = null;\n this.model = model;\n}\n\nDataView.defaultOption = {\n show: true,\n readOnly: false,\n optionToContent: null,\n contentToOption: null,\n icon: 'M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28',\n title: zrUtil.clone(dataViewLang.title),\n lang: zrUtil.clone(dataViewLang.lang),\n backgroundColor: '#fff',\n textColor: '#000',\n textareaColor: '#fff',\n textareaBorderColor: '#333',\n buttonColor: '#c23531',\n buttonTextColor: '#fff'\n};\n\nDataView.prototype.onclick = function (ecModel, api) {\n var container = api.getDom();\n var model = this.model;\n\n if (this._dom) {\n container.removeChild(this._dom);\n }\n\n var root = document.createElement('div');\n root.style.cssText = 'position:absolute;left:5px;top:5px;bottom:5px;right:5px;';\n root.style.backgroundColor = model.get('backgroundColor') || '#fff'; // Create elements\n\n var header = document.createElement('h4');\n var lang = model.get('lang') || [];\n header.innerHTML = lang[0] || model.get('title');\n header.style.cssText = 'margin: 10px 20px;';\n header.style.color = model.get('textColor');\n var viewMain = document.createElement('div');\n var textarea = document.createElement('textarea');\n viewMain.style.cssText = 'display:block;width:100%;overflow:auto;';\n var optionToContent = model.get('optionToContent');\n var contentToOption = model.get('contentToOption');\n var result = getContentFromModel(ecModel);\n\n if (typeof optionToContent === 'function') {\n var htmlOrDom = optionToContent(api.getOption());\n\n if (typeof htmlOrDom === 'string') {\n viewMain.innerHTML = htmlOrDom;\n } else if (zrUtil.isDom(htmlOrDom)) {\n viewMain.appendChild(htmlOrDom);\n }\n } else {\n // Use default textarea\n viewMain.appendChild(textarea);\n textarea.readOnly = model.get('readOnly');\n textarea.style.cssText = 'width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;';\n textarea.style.color = model.get('textColor');\n textarea.style.borderColor = model.get('textareaBorderColor');\n textarea.style.backgroundColor = model.get('textareaColor');\n textarea.value = result.value;\n }\n\n var blockMetaList = result.meta;\n var buttonContainer = document.createElement('div');\n buttonContainer.style.cssText = 'position:absolute;bottom:0;left:0;right:0;';\n var buttonStyle = 'float:right;margin-right:20px;border:none;' + 'cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px';\n var closeButton = document.createElement('div');\n var refreshButton = document.createElement('div');\n buttonStyle += ';background-color:' + model.get('buttonColor');\n buttonStyle += ';color:' + model.get('buttonTextColor');\n var self = this;\n\n function close() {\n container.removeChild(root);\n self._dom = null;\n }\n\n eventTool.addEventListener(closeButton, 'click', close);\n eventTool.addEventListener(refreshButton, 'click', function () {\n var newOption;\n\n try {\n if (typeof contentToOption === 'function') {\n newOption = contentToOption(viewMain, api.getOption());\n } else {\n newOption = parseContents(textarea.value, blockMetaList);\n }\n } catch (e) {\n close();\n throw new Error('Data view format error ' + e);\n }\n\n if (newOption) {\n api.dispatchAction({\n type: 'changeDataView',\n newOption: newOption\n });\n }\n\n close();\n });\n closeButton.innerHTML = lang[1];\n refreshButton.innerHTML = lang[2];\n refreshButton.style.cssText = buttonStyle;\n closeButton.style.cssText = buttonStyle;\n !model.get('readOnly') && buttonContainer.appendChild(refreshButton);\n buttonContainer.appendChild(closeButton);\n root.appendChild(header);\n root.appendChild(viewMain);\n root.appendChild(buttonContainer);\n viewMain.style.height = container.clientHeight - 80 + 'px';\n container.appendChild(root);\n this._dom = root;\n};\n\nDataView.prototype.remove = function (ecModel, api) {\n this._dom && api.getDom().removeChild(this._dom);\n};\n\nDataView.prototype.dispose = function (ecModel, api) {\n this.remove(ecModel, api);\n};\n/**\n * @inner\n */\n\n\nfunction tryMergeDataOption(newData, originalData) {\n return zrUtil.map(newData, function (newVal, idx) {\n var original = originalData && originalData[idx];\n\n if (zrUtil.isObject(original) && !zrUtil.isArray(original)) {\n var newValIsObject = zrUtil.isObject(newVal) && !zrUtil.isArray(newVal);\n\n if (!newValIsObject) {\n newVal = {\n value: newVal\n };\n } // original data has name but new data has no name\n\n\n var shouldDeleteName = original.name != null && newVal.name == null; // Original data has option\n\n newVal = zrUtil.defaults(newVal, original);\n shouldDeleteName && delete newVal.name;\n return newVal;\n } else {\n return newVal;\n }\n });\n}\n\nfeatureManager.register('dataView', DataView);\necharts.registerAction({\n type: 'changeDataView',\n event: 'dataViewChanged',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n var newSeriesOptList = [];\n zrUtil.each(payload.newOption.series, function (seriesOpt) {\n var seriesModel = ecModel.getSeriesByName(seriesOpt.name)[0];\n\n if (!seriesModel) {\n // New created series\n // Geuss the series type\n newSeriesOptList.push(zrUtil.extend({\n // Default is scatter\n type: 'scatter'\n }, seriesOpt));\n } else {\n var originalData = seriesModel.get('data');\n newSeriesOptList.push({\n name: seriesOpt.name,\n data: tryMergeDataOption(seriesOpt.data, originalData)\n });\n }\n });\n ecModel.mergeOption(zrUtil.defaults({\n series: newSeriesOptList\n }, payload.newOption));\n});\nvar _default = DataView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(seriesType, actionInfos) {\n zrUtil.each(actionInfos, function (actionInfo) {\n actionInfo.update = 'updateView';\n /**\n * @payload\n * @property {string} seriesName\n * @property {string} name\n */\n\n echarts.registerAction(actionInfo, function (payload, ecModel) {\n var selected = {};\n ecModel.eachComponent({\n mainType: 'series',\n subType: seriesType,\n query: payload\n }, function (seriesModel) {\n if (seriesModel[actionInfo.method]) {\n seriesModel[actionInfo.method](payload.name, payload.dataIndex);\n }\n\n var data = seriesModel.getData(); // Create selected map\n\n data.each(function (idx) {\n var name = data.getName(idx);\n selected[name] = seriesModel.isSelected(name) || false;\n });\n });\n return {\n name: payload.name,\n selected: selected,\n seriesId: payload.seriesId\n };\n });\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Axis = require(\"../Axis\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction IndicatorAxis(dim, scale, radiusExtent) {\n Axis.call(this, dim, scale, radiusExtent);\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n\n this.type = 'value';\n this.angle = 0;\n /**\n * Indicator name\n * @type {string}\n */\n\n this.name = '';\n /**\n * @type {module:echarts/model/Model}\n */\n\n this.model;\n}\n\nzrUtil.inherits(IndicatorAxis, Axis);\nvar _default = IndicatorAxis;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Backward compat for radar chart in 2\nfunction _default(option) {\n var polarOptArr = option.polar;\n\n if (polarOptArr) {\n if (!zrUtil.isArray(polarOptArr)) {\n polarOptArr = [polarOptArr];\n }\n\n var polarNotRadar = [];\n zrUtil.each(polarOptArr, function (polarOpt, idx) {\n if (polarOpt.indicator) {\n if (polarOpt.type && !polarOpt.shape) {\n polarOpt.shape = polarOpt.type;\n }\n\n option.radar = option.radar || [];\n\n if (!zrUtil.isArray(option.radar)) {\n option.radar = [option.radar];\n }\n\n option.radar.push(polarOpt);\n } else {\n polarNotRadar.push(polarOpt);\n }\n });\n option.polar = polarNotRadar;\n }\n\n zrUtil.each(option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'radar' && seriesOpt.polarIndex) {\n seriesOpt.radarIndex = seriesOpt.polarIndex;\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _layout = require(\"../../util/layout\");\n\nvar getLayoutRect = _layout.getLayoutRect;\nvar layoutBox = _layout.box;\nvar positionElement = _layout.positionElement;\n\nvar formatUtil = require(\"../../util/format\");\n\nvar graphic = require(\"../../util/graphic\");\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 * Layout list like component.\n * It will box layout each items in group of component and then position the whole group in the viewport\n * @param {module:zrender/group/Group} group\n * @param {module:echarts/model/Component} componentModel\n * @param {module:echarts/ExtensionAPI}\n */\nfunction layout(group, componentModel, api) {\n var boxLayoutParams = componentModel.getBoxLayoutParams();\n var padding = componentModel.get('padding');\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var rect = getLayoutRect(boxLayoutParams, viewportSize, padding);\n layoutBox(componentModel.get('orient'), group, componentModel.get('itemGap'), rect.width, rect.height);\n positionElement(group, boxLayoutParams, viewportSize, padding);\n}\n\nfunction makeBackground(rect, componentModel) {\n var padding = formatUtil.normalizeCssArray(componentModel.get('padding'));\n var style = componentModel.getItemStyle(['color', 'opacity']);\n style.fill = componentModel.get('backgroundColor');\n var rect = new graphic.Rect({\n shape: {\n x: rect.x - padding[3],\n y: rect.y - padding[0],\n width: rect.width + padding[1] + padding[3],\n height: rect.height + padding[0] + padding[2],\n r: componentModel.get('borderRadius')\n },\n style: style,\n silent: true,\n z2: -1\n }); // FIXME\n // `subPixelOptimizeRect` may bring some gap between edge of viewpart\n // and background rect when setting like `left: 0`, `top: 0`.\n // graphic.subPixelOptimizeRect(rect);\n\n return rect;\n}\n\nexports.layout = layout;\nexports.makeBackground = makeBackground;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar View = require(\"../../coord/View\");\n\nvar _layout = require(\"../../util/layout\");\n\nvar getLayoutRect = _layout.getLayoutRect;\n\nvar bbox = require(\"zrender/lib/core/bbox\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// FIXME Where to create the simple view coordinate system\nfunction getViewRect(seriesModel, api, aspect) {\n var option = seriesModel.getBoxLayoutParams();\n option.aspect = aspect;\n return getLayoutRect(option, {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n\nfunction _default(ecModel, api) {\n var viewList = [];\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var coordSysType = seriesModel.get('coordinateSystem');\n\n if (!coordSysType || coordSysType === 'view') {\n var data = seriesModel.getData();\n var positions = data.mapArray(function (idx) {\n var itemModel = data.getItemModel(idx);\n return [+itemModel.get('x'), +itemModel.get('y')];\n });\n var min = [];\n var max = [];\n bbox.fromPoints(positions, min, max); // If width or height is 0\n\n if (max[0] - min[0] === 0) {\n max[0] += 1;\n min[0] -= 1;\n }\n\n if (max[1] - min[1] === 0) {\n max[1] += 1;\n min[1] -= 1;\n }\n\n var aspect = (max[0] - min[0]) / (max[1] - min[1]); // FIXME If get view rect after data processed?\n\n var viewRect = getViewRect(seriesModel, api, aspect); // Position may be NaN, use view rect instead\n\n if (isNaN(aspect)) {\n min = [viewRect.x, viewRect.y];\n max = [viewRect.x + viewRect.width, viewRect.y + viewRect.height];\n }\n\n var bbWidth = max[0] - min[0];\n var bbHeight = max[1] - min[1];\n var viewWidth = viewRect.width;\n var viewHeight = viewRect.height;\n var viewCoordSys = seriesModel.coordinateSystem = new View();\n viewCoordSys.zoomLimit = seriesModel.get('scaleLimit');\n viewCoordSys.setBoundingRect(min[0], min[1], bbWidth, bbHeight);\n viewCoordSys.setViewRect(viewRect.x, viewRect.y, viewWidth, viewHeight); // Update roam info\n\n viewCoordSys.setCenter(seriesModel.get('center'));\n viewCoordSys.setZoom(seriesModel.get('zoom'));\n viewList.push(viewCoordSys);\n }\n });\n return viewList;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar BrushController = require(\"../../helper/BrushController\");\n\nvar BrushTargetManager = require(\"../../helper/BrushTargetManager\");\n\nvar history = require(\"../../dataZoom/history\");\n\nvar sliderMove = require(\"../../helper/sliderMove\");\n\nvar lang = require(\"../../../lang\");\n\nvar featureManager = require(\"../featureManager\");\n\nrequire(\"../../dataZoomSelect\");\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// Use dataZoomSelect\nvar dataZoomLang = lang.toolbox.dataZoom;\nvar each = zrUtil.each; // Spectial component id start with \\0ec\\0, see echarts/model/Global.js~hasInnerId\n\nvar DATA_ZOOM_ID_BASE = '\\0_ec_\\0toolbox-dataZoom_';\n\nfunction DataZoom(model, ecModel, api) {\n /**\n * @private\n * @type {module:echarts/component/helper/BrushController}\n */\n (this._brushController = new BrushController(api.getZr())).on('brush', zrUtil.bind(this._onBrush, this)).mount();\n /**\n * @private\n * @type {boolean}\n */\n\n this._isZoomActive;\n}\n\nDataZoom.defaultOption = {\n show: true,\n filterMode: 'filter',\n // Icon group\n icon: {\n zoom: 'M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1',\n back: 'M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26'\n },\n // `zoom`, `back`\n title: zrUtil.clone(dataZoomLang.title),\n brushStyle: {\n borderWidth: 0,\n color: 'rgba(0,0,0,0.2)'\n }\n};\nvar proto = DataZoom.prototype;\n\nproto.render = function (featureModel, ecModel, api, payload) {\n this.model = featureModel;\n this.ecModel = ecModel;\n this.api = api;\n updateZoomBtnStatus(featureModel, ecModel, this, payload, api);\n updateBackBtnStatus(featureModel, ecModel);\n};\n\nproto.onclick = function (ecModel, api, type) {\n handlers[type].call(this);\n};\n\nproto.remove = function (ecModel, api) {\n this._brushController.unmount();\n};\n\nproto.dispose = function (ecModel, api) {\n this._brushController.dispose();\n};\n/**\n * @private\n */\n\n\nvar handlers = {\n zoom: function () {\n var nextActive = !this._isZoomActive;\n this.api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'dataZoomSelect',\n dataZoomSelectActive: nextActive\n });\n },\n back: function () {\n this._dispatchZoomAction(history.pop(this.ecModel));\n }\n};\n/**\n * @private\n */\n\nproto._onBrush = function (areas, opt) {\n if (!opt.isEnd || !areas.length) {\n return;\n }\n\n var snapshot = {};\n var ecModel = this.ecModel;\n\n this._brushController.updateCovers([]); // remove cover\n\n\n var brushTargetManager = new BrushTargetManager(retrieveAxisSetting(this.model.option), ecModel, {\n include: ['grid']\n });\n brushTargetManager.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) {\n if (coordSys.type !== 'cartesian2d') {\n return;\n }\n\n var brushType = area.brushType;\n\n if (brushType === 'rect') {\n setBatch('x', coordSys, coordRange[0]);\n setBatch('y', coordSys, coordRange[1]);\n } else {\n setBatch({\n lineX: 'x',\n lineY: 'y'\n }[brushType], coordSys, coordRange);\n }\n });\n history.push(ecModel, snapshot);\n\n this._dispatchZoomAction(snapshot);\n\n function setBatch(dimName, coordSys, minMax) {\n var axis = coordSys.getAxis(dimName);\n var axisModel = axis.model;\n var dataZoomModel = findDataZoom(dimName, axisModel, ecModel); // Restrict range.\n\n var minMaxSpan = dataZoomModel.findRepresentativeAxisProxy(axisModel).getMinMaxSpan();\n\n if (minMaxSpan.minValueSpan != null || minMaxSpan.maxValueSpan != null) {\n minMax = sliderMove(0, minMax.slice(), axis.scale.getExtent(), 0, minMaxSpan.minValueSpan, minMaxSpan.maxValueSpan);\n }\n\n dataZoomModel && (snapshot[dataZoomModel.id] = {\n dataZoomId: dataZoomModel.id,\n startValue: minMax[0],\n endValue: minMax[1]\n });\n }\n\n function findDataZoom(dimName, axisModel, ecModel) {\n var found;\n ecModel.eachComponent({\n mainType: 'dataZoom',\n subType: 'select'\n }, function (dzModel) {\n var has = dzModel.getAxisModel(dimName, axisModel.componentIndex);\n has && (found = dzModel);\n });\n return found;\n }\n};\n/**\n * @private\n */\n\n\nproto._dispatchZoomAction = function (snapshot) {\n var batch = []; // Convert from hash map to array.\n\n each(snapshot, function (batchItem, dataZoomId) {\n batch.push(zrUtil.clone(batchItem));\n });\n batch.length && this.api.dispatchAction({\n type: 'dataZoom',\n from: this.uid,\n batch: batch\n });\n};\n\nfunction retrieveAxisSetting(option) {\n var setting = {}; // Compatible with previous setting: null => all axis, false => no axis.\n\n zrUtil.each(['xAxisIndex', 'yAxisIndex'], function (name) {\n setting[name] = option[name];\n setting[name] == null && (setting[name] = 'all');\n (setting[name] === false || setting[name] === 'none') && (setting[name] = []);\n });\n return setting;\n}\n\nfunction updateBackBtnStatus(featureModel, ecModel) {\n featureModel.setIconStatus('back', history.count(ecModel) > 1 ? 'emphasis' : 'normal');\n}\n\nfunction updateZoomBtnStatus(featureModel, ecModel, view, payload, api) {\n var zoomActive = view._isZoomActive;\n\n if (payload && payload.type === 'takeGlobalCursor') {\n zoomActive = payload.key === 'dataZoomSelect' ? payload.dataZoomSelectActive : false;\n }\n\n view._isZoomActive = zoomActive;\n featureModel.setIconStatus('zoom', zoomActive ? 'emphasis' : 'normal');\n var brushTargetManager = new BrushTargetManager(retrieveAxisSetting(featureModel.option), ecModel, {\n include: ['grid']\n });\n\n view._brushController.setPanels(brushTargetManager.makePanelOpts(api, function (targetInfo) {\n return targetInfo.xAxisDeclared && !targetInfo.yAxisDeclared ? 'lineX' : !targetInfo.xAxisDeclared && targetInfo.yAxisDeclared ? 'lineY' : 'rect';\n })).enableBrush(zoomActive ? {\n brushType: 'auto',\n brushStyle: featureModel.getModel('brushStyle').getItemStyle()\n } : false);\n}\n\nfeatureManager.register('dataZoom', DataZoom); // Create special dataZoom option for select\n// FIXME consider the case of merge option, where axes options are not exists.\n\necharts.registerPreprocessor(function (option) {\n if (!option) {\n return;\n }\n\n var dataZoomOpts = option.dataZoom || (option.dataZoom = []);\n\n if (!zrUtil.isArray(dataZoomOpts)) {\n option.dataZoom = dataZoomOpts = [dataZoomOpts];\n }\n\n var toolboxOpt = option.toolbox;\n\n if (toolboxOpt) {\n // Assume there is only one toolbox\n if (zrUtil.isArray(toolboxOpt)) {\n toolboxOpt = toolboxOpt[0];\n }\n\n if (toolboxOpt && toolboxOpt.feature) {\n var dataZoomOpt = toolboxOpt.feature.dataZoom; // FIXME: If add dataZoom when setOption in merge mode,\n // no axis info to be added. See `test/dataZoom-extreme.html`\n\n addForAxis('xAxis', dataZoomOpt);\n addForAxis('yAxis', dataZoomOpt);\n }\n }\n\n function addForAxis(axisName, dataZoomOpt) {\n if (!dataZoomOpt) {\n return;\n } // Try not to modify model, because it is not merged yet.\n\n\n var axisIndicesName = axisName + 'Index';\n var givenAxisIndices = dataZoomOpt[axisIndicesName];\n\n if (givenAxisIndices != null && givenAxisIndices !== 'all' && !zrUtil.isArray(givenAxisIndices)) {\n givenAxisIndices = givenAxisIndices === false || givenAxisIndices === 'none' ? [] : [givenAxisIndices];\n }\n\n forEachComponent(axisName, function (axisOpt, axisIndex) {\n if (givenAxisIndices != null && givenAxisIndices !== 'all' && zrUtil.indexOf(givenAxisIndices, axisIndex) === -1) {\n return;\n }\n\n var newOpt = {\n type: 'select',\n $fromToolbox: true,\n // Default to be filter\n filterMode: dataZoomOpt.filterMode || 'filter',\n // Id for merge mapping.\n id: DATA_ZOOM_ID_BASE + axisName + axisIndex\n }; // FIXME\n // Only support one axis now.\n\n newOpt[axisIndicesName] = axisIndex;\n dataZoomOpts.push(newOpt);\n });\n }\n\n function forEachComponent(mainType, cb) {\n var opts = option[mainType];\n\n if (!zrUtil.isArray(opts)) {\n opts = opts ? [opts] : [];\n }\n\n each(opts, cb);\n }\n});\nvar _default = DataZoom;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar ComponentView = require(\"../../view/Component\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = ComponentView.extend({\n type: 'dataZoom',\n render: function (dataZoomModel, ecModel, api, payload) {\n this.dataZoomModel = dataZoomModel;\n this.ecModel = ecModel;\n this.api = api;\n },\n\n /**\n * Find the first target coordinate system.\n *\n * @protected\n * @return {Object} {\n * grid: [\n * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1},\n * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0},\n * ...\n * ], // cartesians must not be null/undefined.\n * polar: [\n * {model: coord0, axisModels: [axis4], coordIndex: 0},\n * ...\n * ], // polars must not be null/undefined.\n * singleAxis: [\n * {model: coord0, axisModels: [], coordIndex: 0}\n * ]\n */\n getTargetCoordInfo: function () {\n var dataZoomModel = this.dataZoomModel;\n var ecModel = this.ecModel;\n var coordSysLists = {};\n dataZoomModel.eachTargetAxis(function (dimNames, axisIndex) {\n var axisModel = ecModel.getComponent(dimNames.axis, axisIndex);\n\n if (axisModel) {\n var coordModel = axisModel.getCoordSysModel();\n coordModel && save(coordModel, axisModel, coordSysLists[coordModel.mainType] || (coordSysLists[coordModel.mainType] = []), coordModel.componentIndex);\n }\n }, this);\n\n function save(coordModel, axisModel, store, coordIndex) {\n var item;\n\n for (var i = 0; i < store.length; i++) {\n if (store[i].model === coordModel) {\n item = store[i];\n break;\n }\n }\n\n if (!item) {\n store.push(item = {\n model: coordModel,\n axisModels: [],\n coordIndex: coordIndex\n });\n }\n\n item.axisModels.push(axisModel);\n }\n\n return coordSysLists;\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./marker/MarkAreaModel\");\n\nrequire(\"./marker/MarkAreaView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerPreprocessor(function (opt) {\n // Make sure markArea component is enabled\n opt.markArea = opt.markArea || {};\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar vector = require(\"zrender/lib/core/vector\");\n\nvar symbolUtil = require(\"../../util/symbol\");\n\nvar LinePath = require(\"./LinePath\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _number = require(\"../../util/number\");\n\nvar round = _number.round;\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 * @module echarts/chart/helper/Line\n */\nvar SYMBOL_CATEGORIES = ['fromSymbol', 'toSymbol'];\n\nfunction makeSymbolTypeKey(symbolCategory) {\n return '_' + symbolCategory + 'Type';\n}\n/**\n * @inner\n */\n\n\nfunction createSymbol(name, lineData, idx) {\n var symbolType = lineData.getItemVisual(idx, name);\n\n if (!symbolType || symbolType === 'none') {\n return;\n }\n\n var color = lineData.getItemVisual(idx, 'color');\n var symbolSize = lineData.getItemVisual(idx, name + 'Size');\n var symbolRotate = lineData.getItemVisual(idx, name + 'Rotate');\n\n if (!zrUtil.isArray(symbolSize)) {\n symbolSize = [symbolSize, symbolSize];\n }\n\n var symbolPath = symbolUtil.createSymbol(symbolType, -symbolSize[0] / 2, -symbolSize[1] / 2, symbolSize[0], symbolSize[1], color); // rotate by default if symbolRotate is not specified or NaN\n\n symbolPath.__specifiedRotation = symbolRotate == null || isNaN(symbolRotate) ? void 0 : +symbolRotate * Math.PI / 180 || 0;\n symbolPath.name = name;\n return symbolPath;\n}\n\nfunction createLine(points) {\n var line = new LinePath({\n name: 'line',\n subPixelOptimize: true\n });\n setLinePoints(line.shape, points);\n return line;\n}\n\nfunction setLinePoints(targetShape, points) {\n targetShape.x1 = points[0][0];\n targetShape.y1 = points[0][1];\n targetShape.x2 = points[1][0];\n targetShape.y2 = points[1][1];\n targetShape.percent = 1;\n var cp1 = points[2];\n\n if (cp1) {\n targetShape.cpx1 = cp1[0];\n targetShape.cpy1 = cp1[1];\n } else {\n targetShape.cpx1 = NaN;\n targetShape.cpy1 = NaN;\n }\n}\n\nfunction updateSymbolAndLabelBeforeLineUpdate() {\n var lineGroup = this;\n var symbolFrom = lineGroup.childOfName('fromSymbol');\n var symbolTo = lineGroup.childOfName('toSymbol');\n var label = lineGroup.childOfName('label'); // Quick reject\n\n if (!symbolFrom && !symbolTo && label.ignore) {\n return;\n }\n\n var invScale = 1;\n var parentNode = this.parent;\n\n while (parentNode) {\n if (parentNode.scale) {\n invScale /= parentNode.scale[0];\n }\n\n parentNode = parentNode.parent;\n }\n\n var line = lineGroup.childOfName('line'); // If line not changed\n // FIXME Parent scale changed\n\n if (!this.__dirty && !line.__dirty) {\n return;\n }\n\n var percent = line.shape.percent;\n var fromPos = line.pointAt(0);\n var toPos = line.pointAt(percent);\n var d = vector.sub([], toPos, fromPos);\n vector.normalize(d, d);\n\n if (symbolFrom) {\n symbolFrom.attr('position', fromPos); // Fix #12388\n // when symbol is set to be 'arrow' in markLine,\n // symbolRotate value will be ignored, and compulsively use tangent angle.\n // rotate by default if symbol rotation is not specified\n\n var specifiedRotation = symbolFrom.__specifiedRotation;\n\n if (specifiedRotation == null) {\n var tangent = line.tangentAt(0);\n symbolFrom.attr('rotation', Math.PI / 2 - Math.atan2(tangent[1], tangent[0]));\n } else {\n symbolFrom.attr('rotation', specifiedRotation);\n }\n\n symbolFrom.attr('scale', [invScale * percent, invScale * percent]);\n }\n\n if (symbolTo) {\n symbolTo.attr('position', toPos); // Fix #12388\n // when symbol is set to be 'arrow' in markLine,\n // symbolRotate value will be ignored, and compulsively use tangent angle.\n // rotate by default if symbol rotation is not specified\n\n var specifiedRotation = symbolTo.__specifiedRotation;\n\n if (specifiedRotation == null) {\n var tangent = line.tangentAt(1);\n symbolTo.attr('rotation', -Math.PI / 2 - Math.atan2(tangent[1], tangent[0]));\n } else {\n symbolTo.attr('rotation', specifiedRotation);\n }\n\n symbolTo.attr('scale', [invScale * percent, invScale * percent]);\n }\n\n if (!label.ignore) {\n label.attr('position', toPos);\n var textPosition;\n var textAlign;\n var textVerticalAlign;\n var textOrigin;\n var distance = label.__labelDistance;\n var distanceX = distance[0] * invScale;\n var distanceY = distance[1] * invScale;\n var halfPercent = percent / 2;\n var tangent = line.tangentAt(halfPercent);\n var n = [tangent[1], -tangent[0]];\n var cp = line.pointAt(halfPercent);\n\n if (n[1] > 0) {\n n[0] = -n[0];\n n[1] = -n[1];\n }\n\n var dir = tangent[0] < 0 ? -1 : 1;\n\n if (label.__position !== 'start' && label.__position !== 'end') {\n var rotation = -Math.atan2(tangent[1], tangent[0]);\n\n if (toPos[0] < fromPos[0]) {\n rotation = Math.PI + rotation;\n }\n\n label.attr('rotation', rotation);\n }\n\n var dy;\n\n switch (label.__position) {\n case 'insideStartTop':\n case 'insideMiddleTop':\n case 'insideEndTop':\n case 'middle':\n dy = -distanceY;\n textVerticalAlign = 'bottom';\n break;\n\n case 'insideStartBottom':\n case 'insideMiddleBottom':\n case 'insideEndBottom':\n dy = distanceY;\n textVerticalAlign = 'top';\n break;\n\n default:\n dy = 0;\n textVerticalAlign = 'middle';\n }\n\n switch (label.__position) {\n case 'end':\n textPosition = [d[0] * distanceX + toPos[0], d[1] * distanceY + toPos[1]];\n textAlign = d[0] > 0.8 ? 'left' : d[0] < -0.8 ? 'right' : 'center';\n textVerticalAlign = d[1] > 0.8 ? 'top' : d[1] < -0.8 ? 'bottom' : 'middle';\n break;\n\n case 'start':\n textPosition = [-d[0] * distanceX + fromPos[0], -d[1] * distanceY + fromPos[1]];\n textAlign = d[0] > 0.8 ? 'right' : d[0] < -0.8 ? 'left' : 'center';\n textVerticalAlign = d[1] > 0.8 ? 'bottom' : d[1] < -0.8 ? 'top' : 'middle';\n break;\n\n case 'insideStartTop':\n case 'insideStart':\n case 'insideStartBottom':\n textPosition = [distanceX * dir + fromPos[0], fromPos[1] + dy];\n textAlign = tangent[0] < 0 ? 'right' : 'left';\n textOrigin = [-distanceX * dir, -dy];\n break;\n\n case 'insideMiddleTop':\n case 'insideMiddle':\n case 'insideMiddleBottom':\n case 'middle':\n textPosition = [cp[0], cp[1] + dy];\n textAlign = 'center';\n textOrigin = [0, -dy];\n break;\n\n case 'insideEndTop':\n case 'insideEnd':\n case 'insideEndBottom':\n textPosition = [-distanceX * dir + toPos[0], toPos[1] + dy];\n textAlign = tangent[0] >= 0 ? 'right' : 'left';\n textOrigin = [distanceX * dir, -dy];\n break;\n }\n\n label.attr({\n style: {\n // Use the user specified text align and baseline first\n textVerticalAlign: label.__verticalAlign || textVerticalAlign,\n textAlign: label.__textAlign || textAlign\n },\n position: textPosition,\n scale: [invScale, invScale],\n origin: textOrigin\n });\n }\n}\n/**\n * @constructor\n * @extends {module:zrender/graphic/Group}\n * @alias {module:echarts/chart/helper/Line}\n */\n\n\nfunction Line(lineData, idx, seriesScope) {\n graphic.Group.call(this);\n\n this._createLine(lineData, idx, seriesScope);\n}\n\nvar lineProto = Line.prototype; // Update symbol position and rotation\n\nlineProto.beforeUpdate = updateSymbolAndLabelBeforeLineUpdate;\n\nlineProto._createLine = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var linePoints = lineData.getItemLayout(idx);\n var line = createLine(linePoints);\n line.shape.percent = 0;\n graphic.initProps(line, {\n shape: {\n percent: 1\n }\n }, seriesModel, idx);\n this.add(line);\n var label = new graphic.Text({\n name: 'label',\n // FIXME\n // Temporary solution for `focusNodeAdjacency`.\n // line label do not use the opacity of lineStyle.\n lineLabelOriginalOpacity: 1\n });\n this.add(label);\n zrUtil.each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = createSymbol(symbolCategory, lineData, idx); // symbols must added after line to make sure\n // it will be updated after line#update.\n // Or symbol position and rotation update in line#beforeUpdate will be one frame slow\n\n this.add(symbol);\n this[makeSymbolTypeKey(symbolCategory)] = lineData.getItemVisual(idx, symbolCategory);\n }, this);\n\n this._updateCommonStl(lineData, idx, seriesScope);\n};\n\nlineProto.updateData = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childOfName('line');\n var linePoints = lineData.getItemLayout(idx);\n var target = {\n shape: {}\n };\n setLinePoints(target.shape, linePoints);\n graphic.updateProps(line, target, seriesModel, idx);\n zrUtil.each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbolType = lineData.getItemVisual(idx, symbolCategory);\n var key = makeSymbolTypeKey(symbolCategory); // Symbol changed\n\n if (this[key] !== symbolType) {\n this.remove(this.childOfName(symbolCategory));\n var symbol = createSymbol(symbolCategory, lineData, idx);\n this.add(symbol);\n }\n\n this[key] = symbolType;\n }, this);\n\n this._updateCommonStl(lineData, idx, seriesScope);\n};\n\nlineProto._updateCommonStl = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childOfName('line');\n var lineStyle = seriesScope && seriesScope.lineStyle;\n var hoverLineStyle = seriesScope && seriesScope.hoverLineStyle;\n var labelModel = seriesScope && seriesScope.labelModel;\n var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel; // Optimization for large dataset\n\n if (!seriesScope || lineData.hasItemOption) {\n var itemModel = lineData.getItemModel(idx);\n lineStyle = itemModel.getModel('lineStyle').getLineStyle();\n hoverLineStyle = itemModel.getModel('emphasis.lineStyle').getLineStyle();\n labelModel = itemModel.getModel('label');\n hoverLabelModel = itemModel.getModel('emphasis.label');\n }\n\n var visualColor = lineData.getItemVisual(idx, 'color');\n var visualOpacity = zrUtil.retrieve3(lineData.getItemVisual(idx, 'opacity'), lineStyle.opacity, 1);\n line.useStyle(zrUtil.defaults({\n strokeNoScale: true,\n fill: 'none',\n stroke: visualColor,\n opacity: visualOpacity\n }, lineStyle));\n line.hoverStyle = hoverLineStyle; // Update symbol\n\n zrUtil.each(SYMBOL_CATEGORIES, function (symbolCategory) {\n var symbol = this.childOfName(symbolCategory);\n\n if (symbol) {\n symbol.setColor(visualColor);\n symbol.setStyle({\n opacity: visualOpacity\n });\n }\n }, this);\n var showLabel = labelModel.getShallow('show');\n var hoverShowLabel = hoverLabelModel.getShallow('show');\n var label = this.childOfName('label');\n var defaultLabelColor;\n var baseText; // FIXME: the logic below probably should be merged to `graphic.setLabelStyle`.\n\n if (showLabel || hoverShowLabel) {\n defaultLabelColor = visualColor || '#000';\n baseText = seriesModel.getFormattedLabel(idx, 'normal', lineData.dataType);\n\n if (baseText == null) {\n var rawVal = seriesModel.getRawValue(idx);\n baseText = rawVal == null ? lineData.getName(idx) : isFinite(rawVal) ? round(rawVal) : rawVal;\n }\n }\n\n var normalText = showLabel ? baseText : null;\n var emphasisText = hoverShowLabel ? zrUtil.retrieve2(seriesModel.getFormattedLabel(idx, 'emphasis', lineData.dataType), baseText) : null;\n var labelStyle = label.style; // Always set `textStyle` even if `normalStyle.text` is null, because default\n // values have to be set on `normalStyle`.\n\n if (normalText != null || emphasisText != null) {\n graphic.setTextStyle(label.style, labelModel, {\n text: normalText\n }, {\n autoColor: defaultLabelColor\n });\n label.__textAlign = labelStyle.textAlign;\n label.__verticalAlign = labelStyle.textVerticalAlign; // 'start', 'middle', 'end'\n\n label.__position = labelModel.get('position') || 'middle';\n var distance = labelModel.get('distance');\n\n if (!zrUtil.isArray(distance)) {\n distance = [distance, distance];\n }\n\n label.__labelDistance = distance;\n }\n\n if (emphasisText != null) {\n // Only these properties supported in this emphasis style here.\n label.hoverStyle = {\n text: emphasisText,\n textFill: hoverLabelModel.getTextColor(true),\n // For merging hover style to normal style, do not use\n // `hoverLabelModel.getFont()` here.\n fontStyle: hoverLabelModel.getShallow('fontStyle'),\n fontWeight: hoverLabelModel.getShallow('fontWeight'),\n fontSize: hoverLabelModel.getShallow('fontSize'),\n fontFamily: hoverLabelModel.getShallow('fontFamily')\n };\n } else {\n label.hoverStyle = {\n text: null\n };\n }\n\n label.ignore = !showLabel && !hoverShowLabel;\n graphic.setHoverStyle(this);\n};\n\nlineProto.highlight = function () {\n this.trigger('emphasis');\n};\n\nlineProto.downplay = function () {\n this.trigger('normal');\n};\n\nlineProto.updateLayout = function (lineData, idx) {\n this.setLinePoints(lineData.getItemLayout(idx));\n};\n\nlineProto.setLinePoints = function (points) {\n var linePath = this.childOfName('line');\n setLinePoints(linePath.shape, points);\n linePath.dirty();\n};\n\nzrUtil.inherits(Line, graphic.Group);\nvar _default = Line;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar modelUtil = require(\"../util/model\");\n\nvar graphicUtil = require(\"../util/graphic\");\n\nvar layoutUtil = require(\"../util/layout\");\n\nvar _number = require(\"../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _nonShapeGraphicElements = {\n // Reserved but not supported in graphic component.\n path: null,\n compoundPath: null,\n // Supported in graphic component.\n group: graphicUtil.Group,\n image: graphicUtil.Image,\n text: graphicUtil.Text\n}; // -------------\n// Preprocessor\n// -------------\n\necharts.registerPreprocessor(function (option) {\n var graphicOption = option.graphic; // Convert\n // {graphic: [{left: 10, type: 'circle'}, ...]}\n // or\n // {graphic: {left: 10, type: 'circle'}}\n // to\n // {graphic: [{elements: [{left: 10, type: 'circle'}, ...]}]}\n\n if (zrUtil.isArray(graphicOption)) {\n if (!graphicOption[0] || !graphicOption[0].elements) {\n option.graphic = [{\n elements: graphicOption\n }];\n } else {\n // Only one graphic instance can be instantiated. (We dont\n // want that too many views are created in echarts._viewMap)\n option.graphic = [option.graphic[0]];\n }\n } else if (graphicOption && !graphicOption.elements) {\n option.graphic = [{\n elements: [graphicOption]\n }];\n }\n}); // ------\n// Model\n// ------\n\nvar GraphicModel = echarts.extendComponentModel({\n type: 'graphic',\n defaultOption: {\n // Extra properties for each elements:\n //\n // left/right/top/bottom: (like 12, '22%', 'center', default undefined)\n // If left/rigth is set, shape.x/shape.cx/position will not be used.\n // If top/bottom is set, shape.y/shape.cy/position will not be used.\n // This mechanism is useful when you want to position a group/element\n // against the right side or the center of this container.\n //\n // width/height: (can only be pixel value, default 0)\n // Only be used to specify contianer(group) size, if needed. And\n // can not be percentage value (like '33%'). See the reason in the\n // layout algorithm below.\n //\n // bounding: (enum: 'all' (default) | 'raw')\n // Specify how to calculate boundingRect when locating.\n // 'all': Get uioned and transformed boundingRect\n // from both itself and its descendants.\n // This mode simplies confining a group of elements in the bounding\n // of their ancester container (e.g., using 'right: 0').\n // 'raw': Only use the boundingRect of itself and before transformed.\n // This mode is similar to css behavior, which is useful when you\n // want an element to be able to overflow its container. (Consider\n // a rotated circle needs to be located in a corner.)\n // info: custom info. enables user to mount some info on elements and use them\n // in event handlers. Update them only when user specified, otherwise, remain.\n // Note: elements is always behind its ancestors in this elements array.\n elements: [],\n parentId: null\n },\n\n /**\n * Save el options for the sake of the performance (only update modified graphics).\n * The order is the same as those in option. (ancesters -> descendants)\n *\n * @private\n * @type {Array.}\n */\n _elOptionsToUpdate: null,\n\n /**\n * @override\n */\n mergeOption: function (option) {\n // Prevent default merge to elements\n var elements = this.option.elements;\n this.option.elements = null;\n GraphicModel.superApply(this, 'mergeOption', arguments);\n this.option.elements = elements;\n },\n\n /**\n * @override\n */\n optionUpdated: function (newOption, isInit) {\n var thisOption = this.option;\n var newList = (isInit ? thisOption : newOption).elements;\n var existList = thisOption.elements = isInit ? [] : thisOption.elements;\n var flattenedList = [];\n\n this._flatten(newList, flattenedList);\n\n var mappingResult = modelUtil.mappingToExists(existList, flattenedList);\n modelUtil.makeIdAndName(mappingResult); // Clear elOptionsToUpdate\n\n var elOptionsToUpdate = this._elOptionsToUpdate = [];\n zrUtil.each(mappingResult, function (resultItem, index) {\n var newElOption = resultItem.option;\n\n if (!newElOption) {\n return;\n }\n\n elOptionsToUpdate.push(newElOption);\n setKeyInfoToNewElOption(resultItem, newElOption);\n mergeNewElOptionToExist(existList, index, newElOption);\n setLayoutInfoToExist(existList[index], newElOption);\n }, this); // Clean\n\n for (var i = existList.length - 1; i >= 0; i--) {\n if (existList[i] == null) {\n existList.splice(i, 1);\n } else {\n // $action should be volatile, otherwise option gotten from\n // `getOption` will contain unexpected $action.\n delete existList[i].$action;\n }\n }\n },\n\n /**\n * Convert\n * [{\n * type: 'group',\n * id: 'xx',\n * children: [{type: 'circle'}, {type: 'polygon'}]\n * }]\n * to\n * [\n * {type: 'group', id: 'xx'},\n * {type: 'circle', parentId: 'xx'},\n * {type: 'polygon', parentId: 'xx'}\n * ]\n *\n * @private\n * @param {Array.} optionList option list\n * @param {Array.} result result of flatten\n * @param {Object} parentOption parent option\n */\n _flatten: function (optionList, result, parentOption) {\n zrUtil.each(optionList, function (option) {\n if (!option) {\n return;\n }\n\n if (parentOption) {\n option.parentOption = parentOption;\n }\n\n result.push(option);\n var children = option.children;\n\n if (option.type === 'group' && children) {\n this._flatten(children, result, option);\n } // Deleting for JSON output, and for not affecting group creation.\n\n\n delete option.children;\n }, this);\n },\n // FIXME\n // Pass to view using payload? setOption has a payload?\n useElOptionsToUpdate: function () {\n var els = this._elOptionsToUpdate; // Clear to avoid render duplicately when zooming.\n\n this._elOptionsToUpdate = null;\n return els;\n }\n}); // -----\n// View\n// -----\n\necharts.extendComponentView({\n type: 'graphic',\n\n /**\n * @override\n */\n init: function (ecModel, api) {\n /**\n * @private\n * @type {module:zrender/core/util.HashMap}\n */\n this._elMap = zrUtil.createHashMap();\n /**\n * @private\n * @type {module:echarts/graphic/GraphicModel}\n */\n\n this._lastGraphicModel;\n },\n\n /**\n * @override\n */\n render: function (graphicModel, ecModel, api) {\n // Having leveraged between use cases and algorithm complexity, a very\n // simple layout mechanism is used:\n // The size(width/height) can be determined by itself or its parent (not\n // implemented yet), but can not by its children. (Top-down travel)\n // The location(x/y) can be determined by the bounding rect of itself\n // (can including its descendants or not) and the size of its parent.\n // (Bottom-up travel)\n // When `chart.clear()` or `chart.setOption({...}, true)` with the same id,\n // view will be reused.\n if (graphicModel !== this._lastGraphicModel) {\n this._clear();\n }\n\n this._lastGraphicModel = graphicModel;\n\n this._updateElements(graphicModel);\n\n this._relocate(graphicModel, api);\n },\n\n /**\n * Update graphic elements.\n *\n * @private\n * @param {Object} graphicModel graphic model\n */\n _updateElements: function (graphicModel) {\n var elOptionsToUpdate = graphicModel.useElOptionsToUpdate();\n\n if (!elOptionsToUpdate) {\n return;\n }\n\n var elMap = this._elMap;\n var rootGroup = this.group; // Top-down tranverse to assign graphic settings to each elements.\n\n zrUtil.each(elOptionsToUpdate, function (elOption) {\n var $action = elOption.$action;\n var id = elOption.id;\n var existEl = elMap.get(id);\n var parentId = elOption.parentId;\n var targetElParent = parentId != null ? elMap.get(parentId) : rootGroup;\n var elOptionStyle = elOption.style;\n\n if (elOption.type === 'text' && elOptionStyle) {\n // In top/bottom mode, textVerticalAlign should not be used, which cause\n // inaccurately locating.\n if (elOption.hv && elOption.hv[1]) {\n elOptionStyle.textVerticalAlign = elOptionStyle.textBaseline = null;\n } // Compatible with previous setting: both support fill and textFill,\n // stroke and textStroke.\n\n\n !elOptionStyle.hasOwnProperty('textFill') && elOptionStyle.fill && (elOptionStyle.textFill = elOptionStyle.fill);\n !elOptionStyle.hasOwnProperty('textStroke') && elOptionStyle.stroke && (elOptionStyle.textStroke = elOptionStyle.stroke);\n } // Remove unnecessary props to avoid potential problems.\n\n\n var elOptionCleaned = getCleanedElOption(elOption); // For simple, do not support parent change, otherwise reorder is needed.\n\n if (!$action || $action === 'merge') {\n existEl ? existEl.attr(elOptionCleaned) : createEl(id, targetElParent, elOptionCleaned, elMap);\n } else if ($action === 'replace') {\n removeEl(existEl, elMap);\n createEl(id, targetElParent, elOptionCleaned, elMap);\n } else if ($action === 'remove') {\n removeEl(existEl, elMap);\n }\n\n var el = elMap.get(id);\n\n if (el) {\n el.__ecGraphicWidthOption = elOption.width;\n el.__ecGraphicHeightOption = elOption.height;\n setEventData(el, graphicModel, elOption);\n }\n });\n },\n\n /**\n * Locate graphic elements.\n *\n * @private\n * @param {Object} graphicModel graphic model\n * @param {module:echarts/ExtensionAPI} api extension API\n */\n _relocate: function (graphicModel, api) {\n var elOptions = graphicModel.option.elements;\n var rootGroup = this.group;\n var elMap = this._elMap;\n var apiWidth = api.getWidth();\n var apiHeight = api.getHeight(); // Top-down to calculate percentage width/height of group\n\n for (var i = 0; i < elOptions.length; i++) {\n var elOption = elOptions[i];\n var el = elMap.get(elOption.id);\n\n if (!el || !el.isGroup) {\n continue;\n }\n\n var parentEl = el.parent;\n var isParentRoot = parentEl === rootGroup; // Like 'position:absolut' in css, default 0.\n\n el.__ecGraphicWidth = parsePercent(el.__ecGraphicWidthOption, isParentRoot ? apiWidth : parentEl.__ecGraphicWidth) || 0;\n el.__ecGraphicHeight = parsePercent(el.__ecGraphicHeightOption, isParentRoot ? apiHeight : parentEl.__ecGraphicHeight) || 0;\n } // Bottom-up tranvese all elements (consider ec resize) to locate elements.\n\n\n for (var i = elOptions.length - 1; i >= 0; i--) {\n var elOption = elOptions[i];\n var el = elMap.get(elOption.id);\n\n if (!el) {\n continue;\n }\n\n var parentEl = el.parent;\n var containerInfo = parentEl === rootGroup ? {\n width: apiWidth,\n height: apiHeight\n } : {\n width: parentEl.__ecGraphicWidth,\n height: parentEl.__ecGraphicHeight\n }; // PENDING\n // Currently, when `bounding: 'all'`, the union bounding rect of the group\n // does not include the rect of [0, 0, group.width, group.height], which\n // is probably weird for users. Should we make a break change for it?\n\n layoutUtil.positionElement(el, elOption, containerInfo, null, {\n hv: elOption.hv,\n boundingMode: elOption.bounding\n });\n }\n },\n\n /**\n * Clear all elements.\n *\n * @private\n */\n _clear: function () {\n var elMap = this._elMap;\n elMap.each(function (el) {\n removeEl(el, elMap);\n });\n this._elMap = zrUtil.createHashMap();\n },\n\n /**\n * @override\n */\n dispose: function () {\n this._clear();\n }\n});\n\nfunction createEl(id, targetElParent, elOption, elMap) {\n var graphicType = elOption.type;\n var Clz = _nonShapeGraphicElements.hasOwnProperty(graphicType) // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n ? _nonShapeGraphicElements[graphicType] : graphicUtil.getShapeClass(graphicType);\n var el = new Clz(elOption);\n targetElParent.add(el);\n elMap.set(id, el);\n el.__ecGraphicId = id;\n}\n\nfunction removeEl(existEl, elMap) {\n var existElParent = existEl && existEl.parent;\n\n if (existElParent) {\n existEl.type === 'group' && existEl.traverse(function (el) {\n removeEl(el, elMap);\n });\n elMap.removeKey(existEl.__ecGraphicId);\n existElParent.remove(existEl);\n }\n} // Remove unnecessary props to avoid potential problems.\n\n\nfunction getCleanedElOption(elOption) {\n elOption = zrUtil.extend({}, elOption);\n zrUtil.each(['id', 'parentId', '$action', 'hv', 'bounding'].concat(layoutUtil.LOCATION_PARAMS), function (name) {\n delete elOption[name];\n });\n return elOption;\n}\n\nfunction isSetLoc(obj, props) {\n var isSet;\n zrUtil.each(props, function (prop) {\n obj[prop] != null && obj[prop] !== 'auto' && (isSet = true);\n });\n return isSet;\n}\n\nfunction setKeyInfoToNewElOption(resultItem, newElOption) {\n var existElOption = resultItem.exist; // Set id and type after id assigned.\n\n newElOption.id = resultItem.keyInfo.id;\n !newElOption.type && existElOption && (newElOption.type = existElOption.type); // Set parent id if not specified\n\n if (newElOption.parentId == null) {\n var newElParentOption = newElOption.parentOption;\n\n if (newElParentOption) {\n newElOption.parentId = newElParentOption.id;\n } else if (existElOption) {\n newElOption.parentId = existElOption.parentId;\n }\n } // Clear\n\n\n newElOption.parentOption = null;\n}\n\nfunction mergeNewElOptionToExist(existList, index, newElOption) {\n // Update existing options, for `getOption` feature.\n var newElOptCopy = zrUtil.extend({}, newElOption);\n var existElOption = existList[index];\n var $action = newElOption.$action || 'merge';\n\n if ($action === 'merge') {\n if (existElOption) {\n // We can ensure that newElOptCopy and existElOption are not\n // the same object, so `merge` will not change newElOptCopy.\n zrUtil.merge(existElOption, newElOptCopy, true); // Rigid body, use ignoreSize.\n\n layoutUtil.mergeLayoutParam(existElOption, newElOptCopy, {\n ignoreSize: true\n }); // Will be used in render.\n\n layoutUtil.copyLayoutParams(newElOption, existElOption);\n } else {\n existList[index] = newElOptCopy;\n }\n } else if ($action === 'replace') {\n existList[index] = newElOptCopy;\n } else if ($action === 'remove') {\n // null will be cleaned later.\n existElOption && (existList[index] = null);\n }\n}\n\nfunction setLayoutInfoToExist(existItem, newElOption) {\n if (!existItem) {\n return;\n }\n\n existItem.hv = newElOption.hv = [// Rigid body, dont care `width`.\n isSetLoc(newElOption, ['left', 'right']), // Rigid body, dont care `height`.\n isSetLoc(newElOption, ['top', 'bottom'])]; // Give default group size. Otherwise layout error may occur.\n\n if (existItem.type === 'group') {\n existItem.width == null && (existItem.width = newElOption.width = 0);\n existItem.height == null && (existItem.height = newElOption.height = 0);\n }\n}\n\nfunction setEventData(el, graphicModel, elOption) {\n var eventData = el.eventData; // Simple optimize for large amount of elements that no need event.\n\n if (!el.silent && !el.ignore && !eventData) {\n eventData = el.eventData = {\n componentType: 'graphic',\n componentIndex: graphicModel.componentIndex,\n name: el.name\n };\n } // `elOption.info` enables user to mount some info on\n // elements and use them in event handlers.\n\n\n if (eventData) {\n eventData.info = el.info;\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\nrequire(\"./dataZoom/typeDefaulter\");\n\nrequire(\"./dataZoom/DataZoomModel\");\n\nrequire(\"./dataZoom/DataZoomView\");\n\nrequire(\"./dataZoom/InsideZoomModel\");\n\nrequire(\"./dataZoom/InsideZoomView\");\n\nrequire(\"./dataZoom/dataZoomProcessor\");\n\nrequire(\"./dataZoom/dataZoomAction\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar vec2 = require(\"zrender/lib/core/vector\");\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 * Line path for bezier and straight line draw\n */\nvar straightLineProto = graphic.Line.prototype;\nvar bezierCurveProto = graphic.BezierCurve.prototype;\n\nfunction isLine(shape) {\n return isNaN(+shape.cpx1) || isNaN(+shape.cpy1);\n}\n\nvar _default = graphic.extendShape({\n type: 'ec-line',\n style: {\n stroke: '#000',\n fill: null\n },\n shape: {\n x1: 0,\n y1: 0,\n x2: 0,\n y2: 0,\n percent: 1,\n cpx1: null,\n cpy1: null\n },\n buildPath: function (ctx, shape) {\n this[isLine(shape) ? '_buildPathLine' : '_buildPathCurve'](ctx, shape);\n },\n _buildPathLine: straightLineProto.buildPath,\n _buildPathCurve: bezierCurveProto.buildPath,\n pointAt: function (t) {\n return this[isLine(this.shape) ? '_pointAtLine' : '_pointAtCurve'](t);\n },\n _pointAtLine: straightLineProto.pointAt,\n _pointAtCurve: bezierCurveProto.pointAt,\n tangentAt: function (t) {\n var shape = this.shape;\n var p = isLine(shape) ? [shape.x2 - shape.x1, shape.y2 - shape.y1] : this._tangentAtCurve(t);\n return vec2.normalize(p, p);\n },\n _tangentAtCurve: bezierCurveProto.tangentAt\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar layout = require(\"../../util/layout\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _model = require(\"../../util/model\");\n\nvar groupData = _model.groupData;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel, api, payload) {\n ecModel.eachSeriesByType('sankey', function (seriesModel) {\n var nodeWidth = seriesModel.get('nodeWidth');\n var nodeGap = seriesModel.get('nodeGap');\n var layoutInfo = getViewRect(seriesModel, api);\n seriesModel.layoutInfo = layoutInfo;\n var width = layoutInfo.width;\n var height = layoutInfo.height;\n var graph = seriesModel.getGraph();\n var nodes = graph.nodes;\n var edges = graph.edges;\n computeNodeValues(nodes);\n var filteredNodes = zrUtil.filter(nodes, function (node) {\n return node.getLayout().value === 0;\n });\n var iterations = filteredNodes.length !== 0 ? 0 : seriesModel.get('layoutIterations');\n var orient = seriesModel.get('orient');\n var nodeAlign = seriesModel.get('nodeAlign');\n layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign);\n });\n}\n/**\n * Get the layout position of the whole view\n *\n * @param {module:echarts/model/Series} seriesModel the model object of sankey series\n * @param {module:echarts/ExtensionAPI} api provide the API list that the developer can call\n * @return {module:zrender/core/BoundingRect} size of rect to draw the sankey view\n */\n\n\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n\nfunction layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign) {\n computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign);\n computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient);\n computeEdgeDepths(nodes, orient);\n}\n/**\n * Compute the value of each node by summing the associated edge's value\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n */\n\n\nfunction computeNodeValues(nodes) {\n zrUtil.each(nodes, function (node) {\n var value1 = sum(node.outEdges, getEdgeValue);\n var value2 = sum(node.inEdges, getEdgeValue);\n var nodeRawValue = node.getValue() || 0;\n var value = Math.max(value1, value2, nodeRawValue);\n node.setLayout({\n value: value\n }, true);\n });\n}\n/**\n * Compute the x-position for each node.\n *\n * Here we use Kahn algorithm to detect cycle when we traverse\n * the node to computer the initial x position.\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n * @param {number} nodeWidth the dx of the node\n * @param {number} width the whole width of the area to draw the view\n */\n\n\nfunction computeNodeBreadths(nodes, edges, nodeWidth, width, height, orient, nodeAlign) {\n // Used to mark whether the edge is deleted. if it is deleted,\n // the value is 0, otherwise it is 1.\n var remainEdges = []; // Storage each node's indegree.\n\n var indegreeArr = []; //Used to storage the node with indegree is equal to 0.\n\n var zeroIndegrees = [];\n var nextTargetNode = [];\n var x = 0;\n var kx = 0;\n\n for (var i = 0; i < edges.length; i++) {\n remainEdges[i] = 1;\n }\n\n for (i = 0; i < nodes.length; i++) {\n indegreeArr[i] = nodes[i].inEdges.length;\n\n if (indegreeArr[i] === 0) {\n zeroIndegrees.push(nodes[i]);\n }\n }\n\n var maxNodeDepth = -1; // Traversing nodes using topological sorting to calculate the\n // horizontal(if orient === 'horizontal') or vertical(if orient === 'vertical')\n // position of the nodes.\n\n while (zeroIndegrees.length) {\n for (var idx = 0; idx < zeroIndegrees.length; idx++) {\n var node = zeroIndegrees[idx];\n var item = node.hostGraph.data.getRawDataItem(node.dataIndex);\n var isItemDepth = item.depth != null && item.depth >= 0;\n\n if (isItemDepth && item.depth > maxNodeDepth) {\n maxNodeDepth = item.depth;\n }\n\n node.setLayout({\n depth: isItemDepth ? item.depth : x\n }, true);\n orient === 'vertical' ? node.setLayout({\n dy: nodeWidth\n }, true) : node.setLayout({\n dx: nodeWidth\n }, true);\n\n for (var edgeIdx = 0; edgeIdx < node.outEdges.length; edgeIdx++) {\n var edge = node.outEdges[edgeIdx];\n var indexEdge = edges.indexOf(edge);\n remainEdges[indexEdge] = 0;\n var targetNode = edge.node2;\n var nodeIndex = nodes.indexOf(targetNode);\n\n if (--indegreeArr[nodeIndex] === 0 && nextTargetNode.indexOf(targetNode) < 0) {\n nextTargetNode.push(targetNode);\n }\n }\n }\n\n ++x;\n zeroIndegrees = nextTargetNode;\n nextTargetNode = [];\n }\n\n for (i = 0; i < remainEdges.length; i++) {\n if (remainEdges[i] === 1) {\n throw new Error('Sankey is a DAG, the original data has cycle!');\n }\n }\n\n var maxDepth = maxNodeDepth > x - 1 ? maxNodeDepth : x - 1;\n\n if (nodeAlign && nodeAlign !== 'left') {\n adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth);\n }\n\n var kx = orient === 'vertical' ? (height - nodeWidth) / maxDepth : (width - nodeWidth) / maxDepth;\n scaleNodeBreadths(nodes, kx, orient);\n}\n\nfunction isNodeDepth(node) {\n var item = node.hostGraph.data.getRawDataItem(node.dataIndex);\n return item.depth != null && item.depth >= 0;\n}\n\nfunction adjustNodeWithNodeAlign(nodes, nodeAlign, orient, maxDepth) {\n if (nodeAlign === 'right') {\n var nextSourceNode = [];\n var remainNodes = nodes;\n var nodeHeight = 0;\n\n while (remainNodes.length) {\n for (var i = 0; i < remainNodes.length; i++) {\n var node = remainNodes[i];\n node.setLayout({\n skNodeHeight: nodeHeight\n }, true);\n\n for (var j = 0; j < node.inEdges.length; j++) {\n var edge = node.inEdges[j];\n\n if (nextSourceNode.indexOf(edge.node1) < 0) {\n nextSourceNode.push(edge.node1);\n }\n }\n }\n\n remainNodes = nextSourceNode;\n nextSourceNode = [];\n ++nodeHeight;\n }\n\n zrUtil.each(nodes, function (node) {\n if (!isNodeDepth(node)) {\n node.setLayout({\n depth: Math.max(0, maxDepth - node.getLayout().skNodeHeight)\n }, true);\n }\n });\n } else if (nodeAlign === 'justify') {\n moveSinksRight(nodes, maxDepth);\n }\n}\n/**\n * All the node without outEgdes are assigned maximum x-position and\n * be aligned in the last column.\n *\n * @param {module:echarts/data/Graph~Node} nodes. node of sankey view.\n * @param {number} maxDepth. use to assign to node without outEdges as x-position.\n */\n\n\nfunction moveSinksRight(nodes, maxDepth) {\n zrUtil.each(nodes, function (node) {\n if (!isNodeDepth(node) && !node.outEdges.length) {\n node.setLayout({\n depth: maxDepth\n }, true);\n }\n });\n}\n/**\n * Scale node x-position to the width\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n * @param {number} kx multiple used to scale nodes\n */\n\n\nfunction scaleNodeBreadths(nodes, kx, orient) {\n zrUtil.each(nodes, function (node) {\n var nodeDepth = node.getLayout().depth * kx;\n orient === 'vertical' ? node.setLayout({\n y: nodeDepth\n }, true) : node.setLayout({\n x: nodeDepth\n }, true);\n });\n}\n/**\n * Using Gauss-Seidel iterations method to compute the node depth(y-position)\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n * @param {module:echarts/data/Graph~Edge} edges edge of sankey view\n * @param {number} height the whole height of the area to draw the view\n * @param {number} nodeGap the vertical distance between two nodes\n * in the same column.\n * @param {number} iterations the number of iterations for the algorithm\n */\n\n\nfunction computeNodeDepths(nodes, edges, height, width, nodeGap, iterations, orient) {\n var nodesByBreadth = prepareNodesByBreadth(nodes, orient);\n initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n\n for (var alpha = 1; iterations > 0; iterations--) {\n // 0.99 is a experience parameter, ensure that each iterations of\n // changes as small as possible.\n alpha *= 0.99;\n relaxRightToLeft(nodesByBreadth, alpha, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n relaxLeftToRight(nodesByBreadth, alpha, orient);\n resolveCollisions(nodesByBreadth, nodeGap, height, width, orient);\n }\n}\n\nfunction prepareNodesByBreadth(nodes, orient) {\n var nodesByBreadth = [];\n var keyAttr = orient === 'vertical' ? 'y' : 'x';\n var groupResult = groupData(nodes, function (node) {\n return node.getLayout()[keyAttr];\n });\n groupResult.keys.sort(function (a, b) {\n return a - b;\n });\n zrUtil.each(groupResult.keys, function (key) {\n nodesByBreadth.push(groupResult.buckets.get(key));\n });\n return nodesByBreadth;\n}\n/**\n * Compute the original y-position for each node\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n * @param {Array.>} nodesByBreadth\n * group by the array of all sankey nodes based on the nodes x-position.\n * @param {module:echarts/data/Graph~Edge} edges edge of sankey view\n * @param {number} height the whole height of the area to draw the view\n * @param {number} nodeGap the vertical distance between two nodes\n */\n\n\nfunction initializeNodeDepth(nodesByBreadth, edges, height, width, nodeGap, orient) {\n var minKy = Infinity;\n zrUtil.each(nodesByBreadth, function (nodes) {\n var n = nodes.length;\n var sum = 0;\n zrUtil.each(nodes, function (node) {\n sum += node.getLayout().value;\n });\n var ky = orient === 'vertical' ? (width - (n - 1) * nodeGap) / sum : (height - (n - 1) * nodeGap) / sum;\n\n if (ky < minKy) {\n minKy = ky;\n }\n });\n zrUtil.each(nodesByBreadth, function (nodes) {\n zrUtil.each(nodes, function (node, i) {\n var nodeDy = node.getLayout().value * minKy;\n\n if (orient === 'vertical') {\n node.setLayout({\n x: i\n }, true);\n node.setLayout({\n dx: nodeDy\n }, true);\n } else {\n node.setLayout({\n y: i\n }, true);\n node.setLayout({\n dy: nodeDy\n }, true);\n }\n });\n });\n zrUtil.each(edges, function (edge) {\n var edgeDy = +edge.getValue() * minKy;\n edge.setLayout({\n dy: edgeDy\n }, true);\n });\n}\n/**\n * Resolve the collision of initialized depth (y-position)\n *\n * @param {Array.>} nodesByBreadth\n * group by the array of all sankey nodes based on the nodes x-position.\n * @param {number} nodeGap the vertical distance between two nodes\n * @param {number} height the whole height of the area to draw the view\n */\n\n\nfunction resolveCollisions(nodesByBreadth, nodeGap, height, width, orient) {\n var keyAttr = orient === 'vertical' ? 'x' : 'y';\n zrUtil.each(nodesByBreadth, function (nodes) {\n nodes.sort(function (a, b) {\n return a.getLayout()[keyAttr] - b.getLayout()[keyAttr];\n });\n var nodeX;\n var node;\n var dy;\n var y0 = 0;\n var n = nodes.length;\n var nodeDyAttr = orient === 'vertical' ? 'dx' : 'dy';\n\n for (var i = 0; i < n; i++) {\n node = nodes[i];\n dy = y0 - node.getLayout()[keyAttr];\n\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] + dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n }\n\n y0 = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap;\n }\n\n var viewWidth = orient === 'vertical' ? width : height; // If the bottommost node goes outside the bounds, push it back up\n\n dy = y0 - nodeGap - viewWidth;\n\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] - dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n y0 = nodeX;\n\n for (i = n - 2; i >= 0; --i) {\n node = nodes[i];\n dy = node.getLayout()[keyAttr] + node.getLayout()[nodeDyAttr] + nodeGap - y0;\n\n if (dy > 0) {\n nodeX = node.getLayout()[keyAttr] - dy;\n orient === 'vertical' ? node.setLayout({\n x: nodeX\n }, true) : node.setLayout({\n y: nodeX\n }, true);\n }\n\n y0 = node.getLayout()[keyAttr];\n }\n }\n });\n}\n/**\n * Change the y-position of the nodes, except most the right side nodes\n *\n * @param {Array.>} nodesByBreadth\n * group by the array of all sankey nodes based on the node x-position.\n * @param {number} alpha parameter used to adjust the nodes y-position\n */\n\n\nfunction relaxRightToLeft(nodesByBreadth, alpha, orient) {\n zrUtil.each(nodesByBreadth.slice().reverse(), function (nodes) {\n zrUtil.each(nodes, function (node) {\n if (node.outEdges.length) {\n var y = sum(node.outEdges, weightedTarget, orient) / sum(node.outEdges, getEdgeValue, orient);\n\n if (isNaN(y)) {\n var len = node.outEdges.length;\n y = len ? sum(node.outEdges, centerTarget, orient) / len : 0;\n }\n\n if (orient === 'vertical') {\n var nodeX = node.getLayout().x + (y - center(node, orient)) * alpha;\n node.setLayout({\n x: nodeX\n }, true);\n } else {\n var nodeY = node.getLayout().y + (y - center(node, orient)) * alpha;\n node.setLayout({\n y: nodeY\n }, true);\n }\n }\n });\n });\n}\n\nfunction weightedTarget(edge, orient) {\n return center(edge.node2, orient) * edge.getValue();\n}\n\nfunction centerTarget(edge, orient) {\n return center(edge.node2, orient);\n}\n\nfunction weightedSource(edge, orient) {\n return center(edge.node1, orient) * edge.getValue();\n}\n\nfunction centerSource(edge, orient) {\n return center(edge.node1, orient);\n}\n\nfunction center(node, orient) {\n return orient === 'vertical' ? node.getLayout().x + node.getLayout().dx / 2 : node.getLayout().y + node.getLayout().dy / 2;\n}\n\nfunction getEdgeValue(edge) {\n return edge.getValue();\n}\n\nfunction sum(array, cb, orient) {\n var sum = 0;\n var len = array.length;\n var i = -1;\n\n while (++i < len) {\n var value = +cb.call(array, array[i], orient);\n\n if (!isNaN(value)) {\n sum += value;\n }\n }\n\n return sum;\n}\n/**\n * Change the y-position of the nodes, except most the left side nodes\n *\n * @param {Array.>} nodesByBreadth\n * group by the array of all sankey nodes based on the node x-position.\n * @param {number} alpha parameter used to adjust the nodes y-position\n */\n\n\nfunction relaxLeftToRight(nodesByBreadth, alpha, orient) {\n zrUtil.each(nodesByBreadth, function (nodes) {\n zrUtil.each(nodes, function (node) {\n if (node.inEdges.length) {\n var y = sum(node.inEdges, weightedSource, orient) / sum(node.inEdges, getEdgeValue, orient);\n\n if (isNaN(y)) {\n var len = node.inEdges.length;\n y = len ? sum(node.inEdges, centerSource, orient) / len : 0;\n }\n\n if (orient === 'vertical') {\n var nodeX = node.getLayout().x + (y - center(node, orient)) * alpha;\n node.setLayout({\n x: nodeX\n }, true);\n } else {\n var nodeY = node.getLayout().y + (y - center(node, orient)) * alpha;\n node.setLayout({\n y: nodeY\n }, true);\n }\n }\n });\n });\n}\n/**\n * Compute the depth(y-position) of each edge\n *\n * @param {module:echarts/data/Graph~Node} nodes node of sankey view\n */\n\n\nfunction computeEdgeDepths(nodes, orient) {\n var keyAttr = orient === 'vertical' ? 'x' : 'y';\n zrUtil.each(nodes, function (node) {\n node.outEdges.sort(function (a, b) {\n return a.node2.getLayout()[keyAttr] - b.node2.getLayout()[keyAttr];\n });\n node.inEdges.sort(function (a, b) {\n return a.node1.getLayout()[keyAttr] - b.node1.getLayout()[keyAttr];\n });\n });\n zrUtil.each(nodes, function (node) {\n var sy = 0;\n var ty = 0;\n zrUtil.each(node.outEdges, function (edge) {\n edge.setLayout({\n sy: sy\n }, true);\n sy += edge.getLayout().dy;\n });\n zrUtil.each(node.inEdges, function (edge) {\n edge.setLayout({\n ty: ty\n }, true);\n ty += edge.getLayout().dy;\n });\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Text = require(\"zrender/lib/graphic/Text\");\n\nvar graphicUtil = require(\"../../util/graphic\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// import Group from 'zrender/src/container/Group';\nfunction makeStyleCoord(out, zr, zrX, zrY) {\n out[0] = zrX;\n out[1] = zrY;\n out[2] = out[0] / zr.getWidth(); // The ratio of left to width\n\n out[3] = out[1] / zr.getHeight(); // The ratio of top to height\n}\n/**\n * @alias module:echarts/component/tooltip/TooltipRichContent\n * @constructor\n */\n\n\nfunction TooltipRichContent(api) {\n var zr = this._zr = api.getZr();\n this._styleCoord = [0, 0, 0, 0]; // [left, top, left/width, top/height]\n\n makeStyleCoord(this._styleCoord, zr, api.getWidth() / 2, api.getHeight() / 2);\n this._show = false;\n /**\n * @private\n */\n\n this._hideTimeout;\n}\n\nTooltipRichContent.prototype = {\n constructor: TooltipRichContent,\n\n /**\n * @private\n * @type {boolean}\n */\n _enterable: true,\n\n /**\n * Update when tooltip is rendered\n */\n update: function (tooltipModel) {\n var alwaysShowContent = tooltipModel.get('alwaysShowContent');\n alwaysShowContent && this._moveTooltipIfResized();\n },\n\n /**\n * when `alwaysShowContent` is true,\n * we should move the tooltip after chart resized\n */\n _moveTooltipIfResized: function () {\n var ratioX = this._styleCoord[2]; // The ratio of left to width\n\n var ratioY = this._styleCoord[3]; // The ratio of top to height\n\n var realX = ratioX * this._zr.getWidth();\n\n var realY = ratioY * this._zr.getHeight();\n\n this.moveTo(realX, realY);\n },\n show: function (tooltipModel) {\n if (this._hideTimeout) {\n clearTimeout(this._hideTimeout);\n }\n\n this.el.attr('show', true);\n this._show = true;\n },\n\n /**\n * Set tooltip content\n *\n * @param {string} content rich text string of content\n * @param {Object} markerRich rich text style\n * @param {Object} tooltipModel tooltip model\n */\n setContent: function (content, markerRich, tooltipModel) {\n if (this.el) {\n this._zr.remove(this.el);\n }\n\n var markers = {};\n var text = content;\n var prefix = '{marker';\n var suffix = '|}';\n var startId = text.indexOf(prefix);\n\n while (startId >= 0) {\n var endId = text.indexOf(suffix);\n var name = text.substr(startId + prefix.length, endId - startId - prefix.length);\n\n if (name.indexOf('sub') > -1) {\n markers['marker' + name] = {\n textWidth: 4,\n textHeight: 4,\n textBorderRadius: 2,\n textBackgroundColor: markerRich[name],\n // TODO: textOffset is not implemented for rich text\n textOffset: [3, 0]\n };\n } else {\n markers['marker' + name] = {\n textWidth: 10,\n textHeight: 10,\n textBorderRadius: 5,\n textBackgroundColor: markerRich[name]\n };\n }\n\n text = text.substr(endId + 1);\n startId = text.indexOf('{marker');\n }\n\n var textStyleModel = tooltipModel.getModel('textStyle');\n var fontSize = textStyleModel.get('fontSize');\n var lineHeight = tooltipModel.get('textLineHeight');\n\n if (lineHeight == null) {\n lineHeight = Math.round(fontSize * 3 / 2);\n }\n\n this.el = new Text({\n style: graphicUtil.setTextStyle({}, textStyleModel, {\n rich: markers,\n text: content,\n textBackgroundColor: tooltipModel.get('backgroundColor'),\n textBorderRadius: tooltipModel.get('borderRadius'),\n textFill: tooltipModel.get('textStyle.color'),\n textPadding: tooltipModel.get('padding'),\n textLineHeight: lineHeight\n }),\n z: tooltipModel.get('z')\n });\n\n this._zr.add(this.el);\n\n var self = this;\n this.el.on('mouseover', function () {\n // clear the timeout in hideLater and keep showing tooltip\n if (self._enterable) {\n clearTimeout(self._hideTimeout);\n self._show = true;\n }\n\n self._inContent = true;\n });\n this.el.on('mouseout', function () {\n if (self._enterable) {\n if (self._show) {\n self.hideLater(self._hideDelay);\n }\n }\n\n self._inContent = false;\n });\n },\n setEnterable: function (enterable) {\n this._enterable = enterable;\n },\n getSize: function () {\n var bounding = this.el.getBoundingRect();\n return [bounding.width, bounding.height];\n },\n moveTo: function (x, y) {\n if (this.el) {\n var styleCoord = this._styleCoord;\n makeStyleCoord(styleCoord, this._zr, x, y);\n this.el.attr('position', [styleCoord[0], styleCoord[1]]);\n }\n },\n hide: function () {\n if (this.el) {\n this.el.hide();\n }\n\n this._show = false;\n },\n hideLater: function (time) {\n if (this._show && !(this._inContent && this._enterable)) {\n if (time) {\n this._hideDelay = time; // Set show false to avoid invoke hideLater multiple times\n\n this._show = false;\n this._hideTimeout = setTimeout(zrUtil.bind(this.hide, this), time);\n } else {\n this.hide();\n }\n }\n },\n isShow: function () {\n return this._show;\n },\n dispose: function () {\n clearTimeout(this._hideTimeout);\n\n if (this.el) {\n this._zr.remove(this.el);\n }\n },\n getOuterSize: function () {\n var size = this.getSize();\n return {\n width: size[0],\n height: size[1]\n };\n }\n};\nvar _default = TooltipRichContent;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar SymbolDraw = require(\"../../chart/helper/SymbolDraw\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar List = require(\"../../data/List\");\n\nvar markerHelper = require(\"./markerHelper\");\n\nvar MarkerView = require(\"./MarkerView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction updateMarkerLayout(mpData, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n mpData.each(function (idx) {\n var itemModel = mpData.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get('x'), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get('y'), api.getHeight());\n\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n } // Chart like bar may have there own marker positioning logic\n else if (seriesModel.getMarkerPosition) {\n // Use the getMarkerPoisition\n point = seriesModel.getMarkerPosition(mpData.getValues(mpData.dimensions, idx));\n } else if (coordSys) {\n var x = mpData.get(coordSys.dimensions[0], idx);\n var y = mpData.get(coordSys.dimensions[1], idx);\n point = coordSys.dataToPoint([x, y]);\n } // Use x, y if has any\n\n\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n\n mpData.setItemLayout(idx, point);\n });\n}\n\nvar _default = MarkerView.extend({\n type: 'markPoint',\n // updateLayout: function (markPointModel, ecModel, api) {\n // ecModel.eachSeries(function (seriesModel) {\n // var mpModel = seriesModel.markPointModel;\n // if (mpModel) {\n // updateMarkerLayout(mpModel.getData(), seriesModel, api);\n // this.markerGroupMap.get(seriesModel.id).updateLayout(mpModel);\n // }\n // }, this);\n // },\n updateTransform: function (markPointModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var mpModel = seriesModel.markPointModel;\n\n if (mpModel) {\n updateMarkerLayout(mpModel.getData(), seriesModel, api);\n this.markerGroupMap.get(seriesModel.id).updateLayout(mpModel);\n }\n }, this);\n },\n renderSeries: function (seriesModel, mpModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var symbolDrawMap = this.markerGroupMap;\n var symbolDraw = symbolDrawMap.get(seriesId) || symbolDrawMap.set(seriesId, new SymbolDraw());\n var mpData = createList(coordSys, seriesModel, mpModel); // FIXME\n\n mpModel.setData(mpData);\n updateMarkerLayout(mpModel.getData(), seriesModel, api);\n mpData.each(function (idx) {\n var itemModel = mpData.getItemModel(idx);\n var symbol = itemModel.getShallow('symbol');\n var symbolSize = itemModel.getShallow('symbolSize');\n var symbolRotate = itemModel.getShallow('symbolRotate');\n var isFnSymbol = zrUtil.isFunction(symbol);\n var isFnSymbolSize = zrUtil.isFunction(symbolSize);\n var isFnSymbolRotate = zrUtil.isFunction(symbolRotate);\n\n if (isFnSymbol || isFnSymbolSize || isFnSymbolRotate) {\n var rawIdx = mpModel.getRawValue(idx);\n var dataParams = mpModel.getDataParams(idx);\n\n if (isFnSymbol) {\n symbol = symbol(rawIdx, dataParams);\n }\n\n if (isFnSymbolSize) {\n // FIXME 这里不兼容 ECharts 2.x,2.x 貌似参数是整个数据?\n symbolSize = symbolSize(rawIdx, dataParams);\n }\n\n if (isFnSymbolRotate) {\n symbolRotate = symbolRotate(rawIdx, dataParams);\n }\n }\n\n mpData.setItemVisual(idx, {\n symbol: symbol,\n symbolSize: symbolSize,\n symbolRotate: symbolRotate,\n color: itemModel.get('itemStyle.color') || seriesData.getVisual('color')\n });\n }); // TODO Text are wrong\n\n symbolDraw.updateData(mpData);\n this.group.add(symbolDraw.group); // Set host model for tooltip\n // FIXME\n\n mpData.eachItemGraphicEl(function (el) {\n el.traverse(function (child) {\n child.dataModel = mpModel;\n });\n });\n symbolDraw.__keep = true;\n symbolDraw.group.silent = mpModel.get('silent') || seriesModel.get('silent');\n }\n});\n/**\n * @inner\n * @param {module:echarts/coord/*} [coordSys]\n * @param {module:echarts/model/Series} seriesModel\n * @param {module:echarts/model/Model} mpModel\n */\n\n\nfunction createList(coordSys, seriesModel, mpModel) {\n var coordDimsInfos;\n\n if (coordSys) {\n coordDimsInfos = zrUtil.map(coordSys && coordSys.dimensions, function (coordDim) {\n var info = seriesModel.getData().getDimensionInfo(seriesModel.getData().mapDimension(coordDim)) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n\n return zrUtil.defaults({\n name: coordDim\n }, info);\n });\n } else {\n coordDimsInfos = [{\n name: 'value',\n type: 'float'\n }];\n }\n\n var mpData = new List(coordDimsInfos, mpModel);\n var dataOpt = zrUtil.map(mpModel.get('data'), zrUtil.curry(markerHelper.dataTransform, seriesModel));\n\n if (coordSys) {\n dataOpt = zrUtil.filter(dataOpt, zrUtil.curry(markerHelper.dataFilter, coordSys));\n }\n\n mpData.initData(dataOpt, null, coordSys ? markerHelper.dimValueGetter : function (item) {\n return item.value;\n });\n return mpData;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar ComponentModel = require(\"../../model/Component\");\n\nvar _layout = require(\"../../util/layout\");\n\nvar getLayoutParams = _layout.getLayoutParams;\nvar sizeCalculable = _layout.sizeCalculable;\nvar mergeLayoutParam = _layout.mergeLayoutParam;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar CalendarModel = ComponentModel.extend({\n type: 'calendar',\n\n /**\n * @type {module:echarts/coord/calendar/Calendar}\n */\n coordinateSystem: null,\n defaultOption: {\n zlevel: 0,\n z: 2,\n left: 80,\n top: 60,\n cellSize: 20,\n // horizontal vertical\n orient: 'horizontal',\n // month separate line style\n splitLine: {\n show: true,\n lineStyle: {\n color: '#000',\n width: 1,\n type: 'solid'\n }\n },\n // rect style temporarily unused emphasis\n itemStyle: {\n color: '#fff',\n borderWidth: 1,\n borderColor: '#ccc'\n },\n // week text style\n dayLabel: {\n show: true,\n // a week first day\n firstDay: 0,\n // start end\n position: 'start',\n margin: '50%',\n // 50% of cellSize\n nameMap: 'en',\n color: '#000'\n },\n // month text style\n monthLabel: {\n show: true,\n // start end\n position: 'start',\n margin: 5,\n // center or left\n align: 'center',\n // cn en []\n nameMap: 'en',\n formatter: null,\n color: '#000'\n },\n // year text style\n yearLabel: {\n show: true,\n // top bottom left right\n position: null,\n margin: 30,\n formatter: null,\n color: '#ccc',\n fontFamily: 'sans-serif',\n fontWeight: 'bolder',\n fontSize: 20\n }\n },\n\n /**\n * @override\n */\n init: function (option, parentModel, ecModel, extraOpt) {\n var inputPositionParams = getLayoutParams(option);\n CalendarModel.superApply(this, 'init', arguments);\n mergeAndNormalizeLayoutParams(option, inputPositionParams);\n },\n\n /**\n * @override\n */\n mergeOption: function (option, extraOpt) {\n CalendarModel.superApply(this, 'mergeOption', arguments);\n mergeAndNormalizeLayoutParams(this.option, option);\n }\n});\n\nfunction mergeAndNormalizeLayoutParams(target, raw) {\n // Normalize cellSize\n var cellSize = target.cellSize;\n\n if (!zrUtil.isArray(cellSize)) {\n cellSize = target.cellSize = [cellSize, cellSize];\n } else if (cellSize.length === 1) {\n cellSize[1] = cellSize[0];\n }\n\n var ignoreSize = zrUtil.map([0, 1], function (hvIdx) {\n // If user have set `width` or both `left` and `right`, cellSize\n // will be automatically set to 'auto', otherwise the default\n // setting of cellSize will make `width` setting not work.\n if (sizeCalculable(raw, hvIdx)) {\n cellSize[hvIdx] = 'auto';\n }\n\n return cellSize[hvIdx] != null && cellSize[hvIdx] !== 'auto';\n });\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: ignoreSize\n });\n}\n\nvar _default = CalendarModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\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 * @payload\n * @property {string} parallelAxisId\n * @property {Array.>} intervals\n */\nvar actionInfo = {\n type: 'axisAreaSelect',\n event: 'axisAreaSelected' // update: 'updateVisual'\n\n};\necharts.registerAction(actionInfo, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'parallelAxis',\n query: payload\n }, function (parallelAxisModel) {\n parallelAxisModel.axis.model.setActiveIntervals(payload.intervals);\n });\n});\n/**\n * @payload\n */\n\necharts.registerAction('parallelAxisExpand', function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'parallel',\n query: payload\n }, function (parallelModel) {\n parallelModel.setAxisExpand(payload);\n });\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Parallel = require(\"./Parallel\");\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\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 * Parallel coordinate system creater.\n */\nfunction create(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n }); // Inject the coordinateSystems into seriesModel\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'parallel') {\n var parallelModel = ecModel.queryComponents({\n mainType: 'parallel',\n index: seriesModel.get('parallelIndex'),\n id: seriesModel.get('parallelId')\n })[0];\n seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n }\n });\n return coordSysList;\n}\n\nCoordinateSystem.register('parallel', {\n create: create\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Model = require(\"../../model/Model\");\n\nvar _model = require(\"../../util/model\");\n\nvar isNameSpecified = _model.isNameSpecified;\n\nvar lang = require(\"../../lang\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar langSelector = lang.legend.selector;\nvar defaultSelectorOption = {\n all: {\n type: 'all',\n title: zrUtil.clone(langSelector.all)\n },\n inverse: {\n type: 'inverse',\n title: zrUtil.clone(langSelector.inverse)\n }\n};\nvar LegendModel = echarts.extendComponentModel({\n type: 'legend.plain',\n dependencies: ['series'],\n layoutMode: {\n type: 'box',\n // legend.width/height are maxWidth/maxHeight actually,\n // whereas realy width/height is calculated by its content.\n // (Setting {left: 10, right: 10} does not make sense).\n // So consider the case:\n // `setOption({legend: {left: 10});`\n // then `setOption({legend: {right: 10});`\n // The previous `left` should be cleared by setting `ignoreSize`.\n ignoreSize: true\n },\n init: function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n option.selected = option.selected || {};\n\n this._updateSelector(option);\n },\n mergeOption: function (option) {\n LegendModel.superCall(this, 'mergeOption', option);\n\n this._updateSelector(option);\n },\n _updateSelector: function (option) {\n var selector = option.selector;\n\n if (selector === true) {\n selector = option.selector = ['all', 'inverse'];\n }\n\n if (zrUtil.isArray(selector)) {\n zrUtil.each(selector, function (item, index) {\n zrUtil.isString(item) && (item = {\n type: item\n });\n selector[index] = zrUtil.merge(item, defaultSelectorOption[item.type]);\n });\n }\n },\n optionUpdated: function () {\n this._updateData(this.ecModel);\n\n var legendData = this._data; // If selectedMode is single, try to select one\n\n if (legendData[0] && this.get('selectedMode') === 'single') {\n var hasSelected = false; // If has any selected in option.selected\n\n for (var i = 0; i < legendData.length; i++) {\n var name = legendData[i].get('name');\n\n if (this.isSelected(name)) {\n // Force to unselect others\n this.select(name);\n hasSelected = true;\n break;\n }\n } // Try select the first if selectedMode is single\n\n\n !hasSelected && this.select(legendData[0].get('name'));\n }\n },\n _updateData: function (ecModel) {\n var potentialData = [];\n var availableNames = [];\n ecModel.eachRawSeries(function (seriesModel) {\n var seriesName = seriesModel.name;\n availableNames.push(seriesName);\n var isPotential;\n\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n var names = provider.getAllNames();\n\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n availableNames = availableNames.concat(names);\n }\n\n if (names.length) {\n potentialData = potentialData.concat(names);\n } else {\n isPotential = true;\n }\n } else {\n isPotential = true;\n }\n\n if (isPotential && isNameSpecified(seriesModel)) {\n potentialData.push(seriesModel.name);\n }\n });\n /**\n * @type {Array.}\n * @private\n */\n\n this._availableNames = availableNames; // If legend.data not specified in option, use availableNames as data,\n // which is convinient for user preparing option.\n\n var rawData = this.get('data') || potentialData;\n var legendData = zrUtil.map(rawData, function (dataItem) {\n // Can be string or number\n if (typeof dataItem === 'string' || typeof dataItem === 'number') {\n dataItem = {\n name: dataItem\n };\n }\n\n return new Model(dataItem, this, this.ecModel);\n }, this);\n /**\n * @type {Array.}\n * @private\n */\n\n this._data = legendData;\n },\n\n /**\n * @return {Array.}\n */\n getData: function () {\n return this._data;\n },\n\n /**\n * @param {string} name\n */\n select: function (name) {\n var selected = this.option.selected;\n var selectedMode = this.get('selectedMode');\n\n if (selectedMode === 'single') {\n var data = this._data;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name')] = false;\n });\n }\n\n selected[name] = true;\n },\n\n /**\n * @param {string} name\n */\n unSelect: function (name) {\n if (this.get('selectedMode') !== 'single') {\n this.option.selected[name] = false;\n }\n },\n\n /**\n * @param {string} name\n */\n toggleSelected: function (name) {\n var selected = this.option.selected; // Default is true\n\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n\n this[selected[name] ? 'unSelect' : 'select'](name);\n },\n allSelect: function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n selected[dataItem.get('name', true)] = true;\n });\n },\n inverseSelect: function () {\n var data = this._data;\n var selected = this.option.selected;\n zrUtil.each(data, function (dataItem) {\n var name = dataItem.get('name', true); // Initially, default value is true\n\n if (!selected.hasOwnProperty(name)) {\n selected[name] = true;\n }\n\n selected[name] = !selected[name];\n });\n },\n\n /**\n * @param {string} name\n */\n isSelected: function (name) {\n var selected = this.option.selected;\n return !(selected.hasOwnProperty(name) && !selected[name]) && zrUtil.indexOf(this._availableNames, name) >= 0;\n },\n getOrient: function () {\n return this.get('orient') === 'vertical' ? {\n index: 1,\n name: 'vertical'\n } : {\n index: 0,\n name: 'horizontal'\n };\n },\n defaultOption: {\n // 一级层叠\n zlevel: 0,\n // 二级层叠\n z: 4,\n show: true,\n // 布局方式,默认为水平布局,可选为:\n // 'horizontal' | 'vertical'\n orient: 'horizontal',\n left: 'center',\n // right: 'center',\n top: 0,\n // bottom: null,\n // 水平对齐\n // 'auto' | 'left' | 'right'\n // 默认为 'auto', 根据 x 的位置判断是左对齐还是右对齐\n align: 'auto',\n backgroundColor: 'rgba(0,0,0,0)',\n // 图例边框颜色\n borderColor: '#ccc',\n borderRadius: 0,\n // 图例边框线宽,单位px,默认为0(无边框)\n borderWidth: 0,\n // 图例内边距,单位px,默认各方向内边距为5,\n // 接受数组分别设定上右下左边距,同css\n padding: 5,\n // 各个item之间的间隔,单位px,默认为10,\n // 横向布局时为水平间隔,纵向布局时为纵向间隔\n itemGap: 10,\n // the width of legend symbol\n itemWidth: 25,\n // the height of legend symbol\n itemHeight: 14,\n // the color of unselected legend symbol\n inactiveColor: '#ccc',\n // the borderColor of unselected legend symbol\n inactiveBorderColor: '#ccc',\n itemStyle: {\n // the default borderWidth of legend symbol\n borderWidth: 0\n },\n textStyle: {\n // 图例文字颜色\n color: '#333'\n },\n // formatter: '',\n // 选择模式,默认开启图例开关\n selectedMode: true,\n // 配置默认选中状态,可配合LEGEND.SELECTED事件做动态数据载入\n // selected: null,\n // 图例内容(详见legend.data,数组中每一项代表一个item\n // data: [],\n // Usage:\n // selector: [{type: 'all or inverse', title: xxx}]\n // or\n // selector: true\n // or\n // selector: ['all', 'inverse']\n selector: false,\n selectorLabel: {\n show: true,\n borderRadius: 10,\n padding: [3, 5, 3, 5],\n fontSize: 12,\n fontFamily: ' sans-serif',\n color: '#666',\n borderWidth: 1,\n borderColor: '#666'\n },\n emphasis: {\n selectorLabel: {\n show: true,\n color: '#eee',\n backgroundColor: '#666'\n }\n },\n // Value can be 'start' or 'end'\n selectorPosition: 'auto',\n selectorItemGap: 7,\n selectorButtonGap: 10,\n // Tooltip 相关配置\n tooltip: {\n show: false\n }\n }\n});\nvar _default = LegendModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n ecModel.eachSeriesByType('radar', function (seriesModel) {\n var data = seriesModel.getData();\n var points = [];\n var coordSys = seriesModel.coordinateSystem;\n\n if (!coordSys) {\n return;\n }\n\n var axes = coordSys.getIndicatorAxes();\n zrUtil.each(axes, function (axis, axisIndex) {\n data.each(data.mapDimension(axes[axisIndex].dim), function (val, dataIndex) {\n points[dataIndex] = points[dataIndex] || [];\n var point = coordSys.dataToPoint(val, axisIndex);\n points[dataIndex][axisIndex] = isValidPoint(point) ? point : getValueMissingPoint(coordSys);\n });\n }); // Close polygon\n\n data.each(function (idx) {\n // TODO\n // Is it appropriate to connect to the next data when some data is missing?\n // Or, should trade it like `connectNull` in line chart?\n var firstPoint = zrUtil.find(points[idx], function (point) {\n return isValidPoint(point);\n }) || getValueMissingPoint(coordSys); // Copy the first actual point to the end of the array\n\n points[idx].push(firstPoint.slice());\n data.setItemLayout(idx, points[idx]);\n });\n });\n}\n\nfunction isValidPoint(point) {\n return !isNaN(point[0]) && !isNaN(point[1]);\n}\n\nfunction getValueMissingPoint(coordSys) {\n // It is error-prone to input [NaN, NaN] into polygon, polygon.\n // (probably cause problem when refreshing or animating)\n return [coordSys.cx, coordSys.cy];\n}\n\nmodule.exports = _default;","var svgURI = 'http://www.w3.org/2000/svg';\n\nfunction createElement(name) {\n return document.createElementNS(svgURI, name);\n}\n\nexports.createElement = createElement;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar List = require(\"../../data/List\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _model = require(\"../../util/model\");\n\nvar defaultEmphasis = _model.defaultEmphasis;\n\nvar Model = require(\"../../model/Model\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\n\nvar createGraphFromNodeEdge = require(\"../helper/createGraphFromNodeEdge\");\n\nvar LegendVisualProvider = require(\"../../visual/LegendVisualProvider\");\n\nvar _multipleGraphEdgeHelper = require(\"../helper/multipleGraphEdgeHelper\");\n\nvar initCurvenessList = _multipleGraphEdgeHelper.initCurvenessList;\nvar createEdgeMapForCurveness = _multipleGraphEdgeHelper.createEdgeMapForCurveness;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar GraphSeries = echarts.extendSeriesModel({\n type: 'series.graph',\n init: function (option) {\n GraphSeries.superApply(this, 'init', arguments);\n var self = this;\n\n function getCategoriesData() {\n return self._categoriesData;\n } // Provide data for legend select\n\n\n this.legendVisualProvider = new LegendVisualProvider(getCategoriesData, getCategoriesData);\n this.fillDataTextStyle(option.edges || option.links);\n\n this._updateCategoriesData();\n },\n mergeOption: function (option) {\n GraphSeries.superApply(this, 'mergeOption', arguments);\n this.fillDataTextStyle(option.edges || option.links);\n\n this._updateCategoriesData();\n },\n mergeDefaultAndTheme: function (option) {\n GraphSeries.superApply(this, 'mergeDefaultAndTheme', arguments);\n defaultEmphasis(option, ['edgeLabel'], ['show']);\n },\n getInitialData: function (option, ecModel) {\n var edges = option.edges || option.links || [];\n var nodes = option.data || option.nodes || [];\n var self = this;\n\n if (nodes && edges) {\n // auto curveness\n initCurvenessList(this);\n var graph = createGraphFromNodeEdge(nodes, edges, this, true, beforeLink);\n zrUtil.each(graph.edges, function (edge) {\n createEdgeMapForCurveness(edge.node1, edge.node2, this, edge.dataIndex);\n }, this);\n return graph.data;\n }\n\n function beforeLink(nodeData, edgeData) {\n // Overwrite nodeData.getItemModel to\n nodeData.wrapMethod('getItemModel', function (model) {\n var categoriesModels = self._categoriesModels;\n var categoryIdx = model.getShallow('category');\n var categoryModel = categoriesModels[categoryIdx];\n\n if (categoryModel) {\n categoryModel.parentModel = model.parentModel;\n model.parentModel = categoryModel;\n }\n\n return model;\n });\n var edgeLabelModel = self.getModel('edgeLabel'); // For option `edgeLabel` can be found by label.xxx.xxx on item mode.\n\n var fakeSeriesModel = new Model({\n label: edgeLabelModel.option\n }, edgeLabelModel.parentModel, ecModel);\n var emphasisEdgeLabelModel = self.getModel('emphasis.edgeLabel');\n var emphasisFakeSeriesModel = new Model({\n emphasis: {\n label: emphasisEdgeLabelModel.option\n }\n }, emphasisEdgeLabelModel.parentModel, ecModel);\n edgeData.wrapMethod('getItemModel', function (model) {\n model.customizeGetParent(edgeGetParent);\n return model;\n });\n\n function edgeGetParent(path) {\n path = this.parsePath(path);\n return path && path[0] === 'label' ? fakeSeriesModel : path && path[0] === 'emphasis' && path[1] === 'label' ? emphasisFakeSeriesModel : this.parentModel;\n }\n }\n },\n\n /**\n * @return {module:echarts/data/Graph}\n */\n getGraph: function () {\n return this.getData().graph;\n },\n\n /**\n * @return {module:echarts/data/List}\n */\n getEdgeData: function () {\n return this.getGraph().edgeData;\n },\n\n /**\n * @return {module:echarts/data/List}\n */\n getCategoriesData: function () {\n return this._categoriesData;\n },\n\n /**\n * @override\n */\n formatTooltip: function (dataIndex, multipleSeries, dataType) {\n if (dataType === 'edge') {\n var nodeData = this.getData();\n var params = this.getDataParams(dataIndex, dataType);\n var edge = nodeData.graph.getEdgeByIndex(dataIndex);\n var sourceName = nodeData.getName(edge.node1.dataIndex);\n var targetName = nodeData.getName(edge.node2.dataIndex);\n var html = [];\n sourceName != null && html.push(sourceName);\n targetName != null && html.push(targetName);\n html = encodeHTML(html.join(' > '));\n\n if (params.value) {\n html += ' : ' + encodeHTML(params.value);\n }\n\n return html;\n } else {\n // dataType === 'node' or empty\n return GraphSeries.superApply(this, 'formatTooltip', arguments);\n }\n },\n _updateCategoriesData: function () {\n var categories = zrUtil.map(this.option.categories || [], function (category) {\n // Data must has value\n return category.value != null ? category : zrUtil.extend({\n value: 0\n }, category);\n });\n var categoriesData = new List(['value'], this);\n categoriesData.initData(categories);\n this._categoriesData = categoriesData;\n this._categoriesModels = categoriesData.mapArray(function (idx) {\n return categoriesData.getItemModel(idx, true);\n });\n },\n setZoom: function (zoom) {\n this.option.zoom = zoom;\n },\n setCenter: function (center) {\n this.option.center = center;\n },\n isAnimationEnabled: function () {\n return GraphSeries.superCall(this, 'isAnimationEnabled') // Not enable animation when do force layout\n && !(this.get('layout') === 'force' && this.get('force.layoutAnimation'));\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n // Default option for all coordinate systems\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // polarIndex: 0,\n // geoIndex: 0,\n legendHoverLink: true,\n hoverAnimation: true,\n layout: null,\n focusNodeAdjacency: false,\n // Configuration of circular layout\n circular: {\n rotateLabel: false\n },\n // Configuration of force directed layout\n force: {\n initLayout: null,\n // Node repulsion. Can be an array to represent range.\n repulsion: [0, 50],\n gravity: 0.1,\n // Initial friction\n friction: 0.6,\n // Edge length. Can be an array to represent range.\n edgeLength: 30,\n layoutAnimation: true\n },\n left: 'center',\n top: 'center',\n // right: null,\n // bottom: null,\n // width: '80%',\n // height: '80%',\n symbol: 'circle',\n symbolSize: 10,\n edgeSymbol: ['none', 'none'],\n edgeSymbolSize: 10,\n edgeLabel: {\n position: 'middle',\n distance: 5\n },\n draggable: false,\n roam: false,\n // Default on center of graph\n center: null,\n zoom: 1,\n // Symbol size scale ratio in roam\n nodeScaleRatio: 0.6,\n // cursor: null,\n // categories: [],\n // data: []\n // Or\n // nodes: []\n //\n // links: []\n // Or\n // edges: []\n label: {\n show: false,\n formatter: '{b}'\n },\n itemStyle: {},\n lineStyle: {\n color: '#aaa',\n width: 1,\n opacity: 0.5\n },\n emphasis: {\n label: {\n show: true\n }\n }\n }\n});\nvar _default = GraphSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = echarts.extendComponentView({\n type: 'marker',\n init: function () {\n /**\n * Markline grouped by series\n * @private\n * @type {module:zrender/core/util.HashMap}\n */\n this.markerGroupMap = zrUtil.createHashMap();\n },\n render: function (markerModel, ecModel, api) {\n var markerGroupMap = this.markerGroupMap;\n markerGroupMap.each(function (item) {\n item.__keep = false;\n });\n var markerModelKey = this.type + 'Model';\n ecModel.eachSeries(function (seriesModel) {\n var markerModel = seriesModel[markerModelKey];\n markerModel && this.renderSeries(seriesModel, markerModel, ecModel, api);\n }, this);\n markerGroupMap.each(function (item) {\n !item.__keep && this.group.remove(item.group);\n }, this);\n },\n renderSeries: function () {}\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"../component/radar\");\n\nrequire(\"./radar/RadarSeries\");\n\nrequire(\"./radar/RadarView\");\n\nvar dataColor = require(\"../visual/dataColor\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar radarLayout = require(\"./radar/radarLayout\");\n\nvar dataFilter = require(\"../processor/dataFilter\");\n\nvar backwardCompat = require(\"./radar/backwardCompat\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Must use radar component\necharts.registerVisual(dataColor('radar'));\necharts.registerVisual(visualSymbol('radar', 'circle'));\necharts.registerLayout(radarLayout);\necharts.registerProcessor(dataFilter('radar'));\necharts.registerPreprocessor(backwardCompat);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar colorUtil = require(\"zrender/lib/tool/color\");\n\nvar List = require(\"../../data/List\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar markerHelper = require(\"./markerHelper\");\n\nvar MarkerView = require(\"./MarkerView\");\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// TODO Better on polar\nvar markAreaTransform = function (seriesModel, coordSys, maModel, item) {\n var lt = markerHelper.dataTransform(seriesModel, item[0]);\n var rb = markerHelper.dataTransform(seriesModel, item[1]);\n var retrieve = zrUtil.retrieve; // FIXME make sure lt is less than rb\n\n var ltCoord = lt.coord;\n var rbCoord = rb.coord;\n ltCoord[0] = retrieve(ltCoord[0], -Infinity);\n ltCoord[1] = retrieve(ltCoord[1], -Infinity);\n rbCoord[0] = retrieve(rbCoord[0], Infinity);\n rbCoord[1] = retrieve(rbCoord[1], Infinity); // Merge option into one\n\n var result = zrUtil.mergeAll([{}, lt, rb]);\n result.coord = [lt.coord, rb.coord];\n result.x0 = lt.x;\n result.y0 = lt.y;\n result.x1 = rb.x;\n result.y1 = rb.y;\n return result;\n};\n\nfunction isInifinity(val) {\n return !isNaN(val) && !isFinite(val);\n} // If a markArea has one dim\n\n\nfunction ifMarkLineHasOnlyDim(dimIndex, fromCoord, toCoord, coordSys) {\n var otherDimIndex = 1 - dimIndex;\n return isInifinity(fromCoord[otherDimIndex]) && isInifinity(toCoord[otherDimIndex]);\n}\n\nfunction markAreaFilter(coordSys, item) {\n var fromCoord = item.coord[0];\n var toCoord = item.coord[1];\n\n if (coordSys.type === 'cartesian2d') {\n // In case\n // {\n // markArea: {\n // data: [{ yAxis: 2 }]\n // }\n // }\n if (fromCoord && toCoord && (ifMarkLineHasOnlyDim(1, fromCoord, toCoord, coordSys) || ifMarkLineHasOnlyDim(0, fromCoord, toCoord, coordSys))) {\n return true;\n }\n }\n\n return markerHelper.dataFilter(coordSys, {\n coord: fromCoord,\n x: item.x0,\n y: item.y0\n }) || markerHelper.dataFilter(coordSys, {\n coord: toCoord,\n x: item.x1,\n y: item.y1\n });\n} // dims can be ['x0', 'y0'], ['x1', 'y1'], ['x0', 'y1'], ['x1', 'y0']\n\n\nfunction getSingleMarkerEndPoint(data, idx, dims, seriesModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var itemModel = data.getItemModel(idx);\n var point;\n var xPx = numberUtil.parsePercent(itemModel.get(dims[0]), api.getWidth());\n var yPx = numberUtil.parsePercent(itemModel.get(dims[1]), api.getHeight());\n\n if (!isNaN(xPx) && !isNaN(yPx)) {\n point = [xPx, yPx];\n } else {\n // Chart like bar may have there own marker positioning logic\n if (seriesModel.getMarkerPosition) {\n // Use the getMarkerPoisition\n point = seriesModel.getMarkerPosition(data.getValues(dims, idx));\n } else {\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n var pt = [x, y];\n coordSys.clampData && coordSys.clampData(pt, pt);\n point = coordSys.dataToPoint(pt, true);\n }\n\n if (coordSys.type === 'cartesian2d') {\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n var x = data.get(dims[0], idx);\n var y = data.get(dims[1], idx);\n\n if (isInifinity(x)) {\n point[0] = xAxis.toGlobalCoord(xAxis.getExtent()[dims[0] === 'x0' ? 0 : 1]);\n } else if (isInifinity(y)) {\n point[1] = yAxis.toGlobalCoord(yAxis.getExtent()[dims[1] === 'y0' ? 0 : 1]);\n }\n } // Use x, y if has any\n\n\n if (!isNaN(xPx)) {\n point[0] = xPx;\n }\n\n if (!isNaN(yPx)) {\n point[1] = yPx;\n }\n }\n\n return point;\n}\n\nvar dimPermutations = [['x0', 'y0'], ['x1', 'y0'], ['x1', 'y1'], ['x0', 'y1']];\nMarkerView.extend({\n type: 'markArea',\n // updateLayout: function (markAreaModel, ecModel, api) {\n // ecModel.eachSeries(function (seriesModel) {\n // var maModel = seriesModel.markAreaModel;\n // if (maModel) {\n // var areaData = maModel.getData();\n // areaData.each(function (idx) {\n // var points = zrUtil.map(dimPermutations, function (dim) {\n // return getSingleMarkerEndPoint(areaData, idx, dim, seriesModel, api);\n // });\n // // Layout\n // areaData.setItemLayout(idx, points);\n // var el = areaData.getItemGraphicEl(idx);\n // el.setShape('points', points);\n // });\n // }\n // }, this);\n // },\n updateTransform: function (markAreaModel, ecModel, api) {\n ecModel.eachSeries(function (seriesModel) {\n var maModel = seriesModel.markAreaModel;\n\n if (maModel) {\n var areaData = maModel.getData();\n areaData.each(function (idx) {\n var points = zrUtil.map(dimPermutations, function (dim) {\n return getSingleMarkerEndPoint(areaData, idx, dim, seriesModel, api);\n }); // Layout\n\n areaData.setItemLayout(idx, points);\n var el = areaData.getItemGraphicEl(idx);\n el.setShape('points', points);\n });\n }\n }, this);\n },\n renderSeries: function (seriesModel, maModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var seriesId = seriesModel.id;\n var seriesData = seriesModel.getData();\n var areaGroupMap = this.markerGroupMap;\n var polygonGroup = areaGroupMap.get(seriesId) || areaGroupMap.set(seriesId, {\n group: new graphic.Group()\n });\n this.group.add(polygonGroup.group);\n polygonGroup.__keep = true;\n var areaData = createList(coordSys, seriesModel, maModel); // Line data for tooltip and formatter\n\n maModel.setData(areaData); // Update visual and layout of line\n\n areaData.each(function (idx) {\n // Layout\n var points = zrUtil.map(dimPermutations, function (dim) {\n return getSingleMarkerEndPoint(areaData, idx, dim, seriesModel, api);\n }); // If none of the area is inside coordSys, allClipped is set to be true\n // in layout so that label will not be displayed. See #12591\n\n var allClipped = true;\n zrUtil.each(dimPermutations, function (dim) {\n if (!allClipped) {\n return;\n }\n\n var xValue = areaData.get(dim[0], idx);\n var yValue = areaData.get(dim[1], idx); // If is infinity, the axis should be considered not clipped\n\n if ((isInifinity(xValue) || coordSys.getAxis('x').containData(xValue)) && (isInifinity(yValue) || coordSys.getAxis('y').containData(yValue))) {\n allClipped = false;\n }\n });\n areaData.setItemLayout(idx, {\n points: points,\n allClipped: allClipped\n }); // Visual\n\n areaData.setItemVisual(idx, {\n color: seriesData.getVisual('color')\n });\n });\n areaData.diff(polygonGroup.__data).add(function (idx) {\n var layout = areaData.getItemLayout(idx);\n\n if (!layout.allClipped) {\n var polygon = new graphic.Polygon({\n shape: {\n points: layout.points\n }\n });\n areaData.setItemGraphicEl(idx, polygon);\n polygonGroup.group.add(polygon);\n }\n }).update(function (newIdx, oldIdx) {\n var polygon = polygonGroup.__data.getItemGraphicEl(oldIdx);\n\n var layout = areaData.getItemLayout(newIdx);\n\n if (!layout.allClipped) {\n if (polygon) {\n graphic.updateProps(polygon, {\n shape: {\n points: layout.points\n }\n }, maModel, newIdx);\n } else {\n polygon = new graphic.Polygon({\n shape: {\n points: layout.points\n }\n });\n }\n\n areaData.setItemGraphicEl(newIdx, polygon);\n polygonGroup.group.add(polygon);\n } else if (polygon) {\n polygonGroup.group.remove(polygon);\n }\n }).remove(function (idx) {\n var polygon = polygonGroup.__data.getItemGraphicEl(idx);\n\n polygonGroup.group.remove(polygon);\n }).execute();\n areaData.eachItemGraphicEl(function (polygon, idx) {\n var itemModel = areaData.getItemModel(idx);\n var labelModel = itemModel.getModel('label');\n var labelHoverModel = itemModel.getModel('emphasis.label');\n var color = areaData.getItemVisual(idx, 'color');\n polygon.useStyle(zrUtil.defaults(itemModel.getModel('itemStyle').getItemStyle(), {\n fill: colorUtil.modifyAlpha(color, 0.4),\n stroke: color\n }));\n polygon.hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();\n graphic.setLabelStyle(polygon.style, polygon.hoverStyle, labelModel, labelHoverModel, {\n labelFetcher: maModel,\n labelDataIndex: idx,\n defaultText: areaData.getName(idx) || '',\n isRectText: true,\n autoColor: color\n });\n graphic.setHoverStyle(polygon, {});\n polygon.dataModel = maModel;\n });\n polygonGroup.__data = areaData;\n polygonGroup.group.silent = maModel.get('silent') || seriesModel.get('silent');\n }\n});\n/**\n * @inner\n * @param {module:echarts/coord/*} coordSys\n * @param {module:echarts/model/Series} seriesModel\n * @param {module:echarts/model/Model} mpModel\n */\n\nfunction createList(coordSys, seriesModel, maModel) {\n var coordDimsInfos;\n var areaData;\n var dims = ['x0', 'y0', 'x1', 'y1'];\n\n if (coordSys) {\n coordDimsInfos = zrUtil.map(coordSys && coordSys.dimensions, function (coordDim) {\n var data = seriesModel.getData();\n var info = data.getDimensionInfo(data.mapDimension(coordDim)) || {}; // In map series data don't have lng and lat dimension. Fallback to same with coordSys\n\n return zrUtil.defaults({\n name: coordDim\n }, info);\n });\n areaData = new List(zrUtil.map(dims, function (dim, idx) {\n return {\n name: dim,\n type: coordDimsInfos[idx % 2].type\n };\n }), maModel);\n } else {\n coordDimsInfos = [{\n name: 'value',\n type: 'float'\n }];\n areaData = new List(coordDimsInfos, maModel);\n }\n\n var optData = zrUtil.map(maModel.get('data'), zrUtil.curry(markAreaTransform, seriesModel, coordSys, maModel));\n\n if (coordSys) {\n optData = zrUtil.filter(optData, zrUtil.curry(markAreaFilter, coordSys));\n }\n\n var dimValueGetter = coordSys ? function (item, dimName, dataIndex, dimIndex) {\n return item.coord[Math.floor(dimIndex / 2)][dimIndex % 2];\n } : function (item) {\n return item.value;\n };\n areaData.initData(optData, null, dimValueGetter);\n areaData.hasItemOption = true;\n return areaData;\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar featureManager = require(\"./featureManager\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar ToolboxModel = echarts.extendComponentModel({\n type: 'toolbox',\n layoutMode: {\n type: 'box',\n ignoreSize: true\n },\n optionUpdated: function () {\n ToolboxModel.superApply(this, 'optionUpdated', arguments);\n zrUtil.each(this.option.feature, function (featureOpt, featureName) {\n var Feature = featureManager.get(featureName);\n Feature && zrUtil.merge(featureOpt, Feature.defaultOption);\n });\n },\n defaultOption: {\n show: true,\n z: 6,\n zlevel: 0,\n orient: 'horizontal',\n left: 'right',\n top: 'top',\n // right\n // bottom\n backgroundColor: 'transparent',\n borderColor: '#ccc',\n borderRadius: 0,\n borderWidth: 0,\n padding: 5,\n itemSize: 15,\n itemGap: 8,\n showTitle: true,\n iconStyle: {\n borderColor: '#666',\n color: 'none'\n },\n emphasis: {\n iconStyle: {\n borderColor: '#3E98C5'\n }\n },\n // textStyle: {},\n // feature\n tooltip: {\n show: false\n }\n }\n});\nvar _default = ToolboxModel;\nmodule.exports = _default;","require(\"./graphic\");\n\nvar _zrender = require(\"../zrender\");\n\nvar registerPainter = _zrender.registerPainter;\n\nvar Painter = require(\"./Painter\");\n\nregisterPainter('svg', Painter);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n\n if (legendModels && legendModels.length) {\n ecModel.filterSeries(function (series) {\n // If in any legend component the status is not selected.\n // Because in legend series is assumed selected when it is not in the legend data.\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(series.name)) {\n return false;\n }\n }\n\n return true;\n });\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\n\nvar zrColor = require(\"zrender/lib/tool/color\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar isArray = zrUtil.isArray;\nvar ITEM_STYLE_NORMAL = 'itemStyle';\nvar _default = {\n seriesType: 'treemap',\n reset: function (seriesModel, ecModel, api, payload) {\n var tree = seriesModel.getData().tree;\n var root = tree.root;\n\n if (root.isRemoved()) {\n return;\n }\n\n travelTree(root, // Visual should calculate from tree root but not view root.\n {}, seriesModel.getViewRoot().getAncestors(), seriesModel);\n }\n};\n\nfunction travelTree(node, designatedVisual, viewRootAncestors, seriesModel) {\n var nodeModel = node.getModel();\n var nodeLayout = node.getLayout(); // Optimize\n\n if (!nodeLayout || nodeLayout.invisible || !nodeLayout.isInView) {\n return;\n }\n\n var nodeItemStyleModel = node.getModel(ITEM_STYLE_NORMAL);\n var visuals = buildVisuals(nodeItemStyleModel, designatedVisual, seriesModel); // calculate border color\n\n var borderColor = nodeItemStyleModel.get('borderColor');\n var borderColorSaturation = nodeItemStyleModel.get('borderColorSaturation');\n var thisNodeColor;\n\n if (borderColorSaturation != null) {\n // For performance, do not always execute 'calculateColor'.\n thisNodeColor = calculateColor(visuals, node);\n borderColor = calculateBorderColor(borderColorSaturation, thisNodeColor);\n }\n\n node.setVisual('borderColor', borderColor);\n var viewChildren = node.viewChildren;\n\n if (!viewChildren || !viewChildren.length) {\n thisNodeColor = calculateColor(visuals, node); // Apply visual to this node.\n\n node.setVisual('color', thisNodeColor);\n } else {\n var mapping = buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren); // Designate visual to children.\n\n zrUtil.each(viewChildren, function (child, index) {\n // If higher than viewRoot, only ancestors of viewRoot is needed to visit.\n if (child.depth >= viewRootAncestors.length || child === viewRootAncestors[child.depth]) {\n var childVisual = mapVisual(nodeModel, visuals, child, index, mapping, seriesModel);\n travelTree(child, childVisual, viewRootAncestors, seriesModel);\n }\n });\n }\n}\n\nfunction buildVisuals(nodeItemStyleModel, designatedVisual, seriesModel) {\n var visuals = zrUtil.extend({}, designatedVisual);\n var designatedVisualItemStyle = seriesModel.designatedVisualItemStyle;\n zrUtil.each(['color', 'colorAlpha', 'colorSaturation'], function (visualName) {\n // Priority: thisNode > thisLevel > parentNodeDesignated > seriesModel\n designatedVisualItemStyle[visualName] = designatedVisual[visualName];\n var val = nodeItemStyleModel.get(visualName);\n designatedVisualItemStyle[visualName] = null;\n val != null && (visuals[visualName] = val);\n });\n return visuals;\n}\n\nfunction calculateColor(visuals) {\n var color = getValueVisualDefine(visuals, 'color');\n\n if (color) {\n var colorAlpha = getValueVisualDefine(visuals, 'colorAlpha');\n var colorSaturation = getValueVisualDefine(visuals, 'colorSaturation');\n\n if (colorSaturation) {\n color = zrColor.modifyHSL(color, null, null, colorSaturation);\n }\n\n if (colorAlpha) {\n color = zrColor.modifyAlpha(color, colorAlpha);\n }\n\n return color;\n }\n}\n\nfunction calculateBorderColor(borderColorSaturation, thisNodeColor) {\n return thisNodeColor != null ? zrColor.modifyHSL(thisNodeColor, null, null, borderColorSaturation) : null;\n}\n\nfunction getValueVisualDefine(visuals, name) {\n var value = visuals[name];\n\n if (value != null && value !== 'none') {\n return value;\n }\n}\n\nfunction buildVisualMapping(node, nodeModel, nodeLayout, nodeItemStyleModel, visuals, viewChildren) {\n if (!viewChildren || !viewChildren.length) {\n return;\n }\n\n var rangeVisual = getRangeVisual(nodeModel, 'color') || visuals.color != null && visuals.color !== 'none' && (getRangeVisual(nodeModel, 'colorAlpha') || getRangeVisual(nodeModel, 'colorSaturation'));\n\n if (!rangeVisual) {\n return;\n }\n\n var visualMin = nodeModel.get('visualMin');\n var visualMax = nodeModel.get('visualMax');\n var dataExtent = nodeLayout.dataExtent.slice();\n visualMin != null && visualMin < dataExtent[0] && (dataExtent[0] = visualMin);\n visualMax != null && visualMax > dataExtent[1] && (dataExtent[1] = visualMax);\n var colorMappingBy = nodeModel.get('colorMappingBy');\n var opt = {\n type: rangeVisual.name,\n dataExtent: dataExtent,\n visual: rangeVisual.range\n };\n\n if (opt.type === 'color' && (colorMappingBy === 'index' || colorMappingBy === 'id')) {\n opt.mappingMethod = 'category';\n opt.loop = true; // categories is ordinal, so do not set opt.categories.\n } else {\n opt.mappingMethod = 'linear';\n }\n\n var mapping = new VisualMapping(opt);\n mapping.__drColorMappingBy = colorMappingBy;\n return mapping;\n} // Notice: If we dont have the attribute 'colorRange', but only use\n// attribute 'color' to represent both concepts of 'colorRange' and 'color',\n// (It means 'colorRange' when 'color' is Array, means 'color' when not array),\n// this problem will be encountered:\n// If a level-1 node dont have children, and its siblings has children,\n// and colorRange is set on level-1, then the node can not be colored.\n// So we separate 'colorRange' and 'color' to different attributes.\n\n\nfunction getRangeVisual(nodeModel, name) {\n // 'colorRange', 'colorARange', 'colorSRange'.\n // If not exsits on this node, fetch from levels and series.\n var range = nodeModel.get(name);\n return isArray(range) && range.length ? {\n name: name,\n range: range\n } : null;\n}\n\nfunction mapVisual(nodeModel, visuals, child, index, mapping, seriesModel) {\n var childVisuals = zrUtil.extend({}, visuals);\n\n if (mapping) {\n var mappingType = mapping.type;\n var colorMappingBy = mappingType === 'color' && mapping.__drColorMappingBy;\n var value = colorMappingBy === 'index' ? index : colorMappingBy === 'id' ? seriesModel.mapIdToIndex(child.getId()) : child.getValue(nodeModel.get('visualDimension'));\n childVisuals[mappingType] = mapping.mapValueToVisual(value);\n }\n\n return childVisuals;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar _dataStackHelper = require(\"../../data/helper/dataStackHelper\");\n\nvar isDimensionStacked = _dataStackHelper.isDimensionStacked;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar indexOf = zrUtil.indexOf;\n\nfunction hasXOrY(item) {\n return !(isNaN(parseFloat(item.x)) && isNaN(parseFloat(item.y)));\n}\n\nfunction hasXAndY(item) {\n return !isNaN(parseFloat(item.x)) && !isNaN(parseFloat(item.y));\n} // Make it simple, do not visit all stacked value to count precision.\n// function getPrecision(data, valueAxisDim, dataIndex) {\n// var precision = -1;\n// var stackedDim = data.mapDimension(valueAxisDim);\n// do {\n// precision = Math.max(\n// numberUtil.getPrecision(data.get(stackedDim, dataIndex)),\n// precision\n// );\n// var stackedOnSeries = data.getCalculationInfo('stackedOnSeries');\n// if (stackedOnSeries) {\n// var byValue = data.get(data.getCalculationInfo('stackedByDimension'), dataIndex);\n// data = stackedOnSeries.getData();\n// dataIndex = data.indexOf(data.getCalculationInfo('stackedByDimension'), byValue);\n// stackedDim = data.getCalculationInfo('stackedDimension');\n// }\n// else {\n// data = null;\n// }\n// } while (data);\n// return precision;\n// }\n\n\nfunction markerTypeCalculatorWithExtent(mlType, data, otherDataDim, targetDataDim, otherCoordIndex, targetCoordIndex) {\n var coordArr = [];\n var stacked = isDimensionStacked(data, targetDataDim\n /*, otherDataDim*/\n );\n var calcDataDim = stacked ? data.getCalculationInfo('stackResultDimension') : targetDataDim;\n var value = numCalculate(data, calcDataDim, mlType);\n var dataIndex = data.indicesOfNearest(calcDataDim, value)[0];\n coordArr[otherCoordIndex] = data.get(otherDataDim, dataIndex);\n coordArr[targetCoordIndex] = data.get(calcDataDim, dataIndex);\n var coordArrValue = data.get(targetDataDim, dataIndex); // Make it simple, do not visit all stacked value to count precision.\n\n var precision = numberUtil.getPrecision(data.get(targetDataDim, dataIndex));\n precision = Math.min(precision, 20);\n\n if (precision >= 0) {\n coordArr[targetCoordIndex] = +coordArr[targetCoordIndex].toFixed(precision);\n }\n\n return [coordArr, coordArrValue];\n}\n\nvar curry = zrUtil.curry; // TODO Specified percent\n\nvar markerTypeCalculator = {\n /**\n * @method\n * @param {module:echarts/data/List} data\n * @param {string} baseAxisDim\n * @param {string} valueAxisDim\n */\n min: curry(markerTypeCalculatorWithExtent, 'min'),\n\n /**\n * @method\n * @param {module:echarts/data/List} data\n * @param {string} baseAxisDim\n * @param {string} valueAxisDim\n */\n max: curry(markerTypeCalculatorWithExtent, 'max'),\n\n /**\n * @method\n * @param {module:echarts/data/List} data\n * @param {string} baseAxisDim\n * @param {string} valueAxisDim\n */\n average: curry(markerTypeCalculatorWithExtent, 'average')\n};\n/**\n * Transform markPoint data item to format used in List by do the following\n * 1. Calculate statistic like `max`, `min`, `average`\n * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array\n * @param {module:echarts/model/Series} seriesModel\n * @param {module:echarts/coord/*} [coordSys]\n * @param {Object} item\n * @return {Object}\n */\n\nfunction dataTransform(seriesModel, item) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem; // 1. If not specify the position with pixel directly\n // 2. If `coord` is not a data array. Which uses `xAxis`,\n // `yAxis` to specify the coord on each dimension\n // parseFloat first because item.x and item.y can be percent string like '20%'\n\n if (item && !hasXAndY(item) && !zrUtil.isArray(item.coord) && coordSys) {\n var dims = coordSys.dimensions;\n var axisInfo = getAxisInfo(item, data, coordSys, seriesModel); // Clone the option\n // Transform the properties xAxis, yAxis, radiusAxis, angleAxis, geoCoord to value\n\n item = zrUtil.clone(item);\n\n if (item.type && markerTypeCalculator[item.type] && axisInfo.baseAxis && axisInfo.valueAxis) {\n var otherCoordIndex = indexOf(dims, axisInfo.baseAxis.dim);\n var targetCoordIndex = indexOf(dims, axisInfo.valueAxis.dim);\n var coordInfo = markerTypeCalculator[item.type](data, axisInfo.baseDataDim, axisInfo.valueDataDim, otherCoordIndex, targetCoordIndex);\n item.coord = coordInfo[0]; // Force to use the value of calculated value.\n // let item use the value without stack.\n\n item.value = coordInfo[1];\n } else {\n // FIXME Only has one of xAxis and yAxis.\n var coord = [item.xAxis != null ? item.xAxis : item.radiusAxis, item.yAxis != null ? item.yAxis : item.angleAxis]; // Each coord support max, min, average\n\n for (var i = 0; i < 2; i++) {\n if (markerTypeCalculator[coord[i]]) {\n coord[i] = numCalculate(data, data.mapDimension(dims[i]), coord[i]);\n }\n }\n\n item.coord = coord;\n }\n }\n\n return item;\n}\n\nfunction getAxisInfo(item, data, coordSys, seriesModel) {\n var ret = {};\n\n if (item.valueIndex != null || item.valueDim != null) {\n ret.valueDataDim = item.valueIndex != null ? data.getDimension(item.valueIndex) : item.valueDim;\n ret.valueAxis = coordSys.getAxis(dataDimToCoordDim(seriesModel, ret.valueDataDim));\n ret.baseAxis = coordSys.getOtherAxis(ret.valueAxis);\n ret.baseDataDim = data.mapDimension(ret.baseAxis.dim);\n } else {\n ret.baseAxis = seriesModel.getBaseAxis();\n ret.valueAxis = coordSys.getOtherAxis(ret.baseAxis);\n ret.baseDataDim = data.mapDimension(ret.baseAxis.dim);\n ret.valueDataDim = data.mapDimension(ret.valueAxis.dim);\n }\n\n return ret;\n}\n\nfunction dataDimToCoordDim(seriesModel, dataDim) {\n var data = seriesModel.getData();\n var dimensions = data.dimensions;\n dataDim = data.getDimension(dataDim);\n\n for (var i = 0; i < dimensions.length; i++) {\n var dimItem = data.getDimensionInfo(dimensions[i]);\n\n if (dimItem.name === dataDim) {\n return dimItem.coordDim;\n }\n }\n}\n/**\n * Filter data which is out of coordinateSystem range\n * [dataFilter description]\n * @param {module:echarts/coord/*} [coordSys]\n * @param {Object} item\n * @return {boolean}\n */\n\n\nfunction dataFilter(coordSys, item) {\n // Alwalys return true if there is no coordSys\n return coordSys && coordSys.containData && item.coord && !hasXOrY(item) ? coordSys.containData(item.coord) : true;\n}\n\nfunction dimValueGetter(item, dimName, dataIndex, dimIndex) {\n // x, y, radius, angle\n if (dimIndex < 2) {\n return item.coord && item.coord[dimIndex];\n }\n\n return item.value;\n}\n\nfunction numCalculate(data, valueDataDim, type) {\n if (type === 'average') {\n var sum = 0;\n var count = 0;\n data.each(valueDataDim, function (val, idx) {\n if (!isNaN(val)) {\n sum += val;\n count++;\n }\n });\n return sum / count;\n } else if (type === 'median') {\n return data.getMedian(valueDataDim);\n } else {\n // max & min\n return data.getDataExtent(valueDataDim, true)[type === 'max' ? 1 : 0];\n }\n}\n\nexports.dataTransform = dataTransform;\nexports.getAxisInfo = getAxisInfo;\nexports.dataFilter = dataFilter;\nexports.dimValueGetter = dimValueGetter;\nexports.numCalculate = numCalculate;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar Tree = require(\"../../data/Tree\");\n\nvar Model = require(\"../../model/Model\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\nvar addCommas = _format.addCommas;\n\nvar _treeHelper = require(\"../helper/treeHelper\");\n\nvar wrapTreePathInfo = _treeHelper.wrapTreePathInfo;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.treemap',\n layoutMode: 'box',\n dependencies: ['grid', 'polar'],\n preventUsingHoverLayer: true,\n\n /**\n * @type {module:echarts/data/Tree~Node}\n */\n _viewRoot: null,\n defaultOption: {\n // Disable progressive rendering\n progressive: 0,\n // center: ['50%', '50%'], // not supported in ec3.\n // size: ['80%', '80%'], // deprecated, compatible with ec2.\n left: 'center',\n top: 'middle',\n right: null,\n bottom: null,\n width: '80%',\n height: '80%',\n sort: true,\n // Can be null or false or true\n // (order by desc default, asc not supported yet (strange effect))\n clipWindow: 'origin',\n // Size of clipped window when zooming. 'origin' or 'fullscreen'\n squareRatio: 0.5 * (1 + Math.sqrt(5)),\n // golden ratio\n leafDepth: null,\n // Nodes on depth from root are regarded as leaves.\n // Count from zero (zero represents only view root).\n drillDownIcon: '▶',\n // Use html character temporarily because it is complicated\n // to align specialized icon. ▷▶❒❐▼✚\n zoomToNodeRatio: 0.32 * 0.32,\n // Be effective when using zoomToNode. Specify the proportion of the\n // target node area in the view area.\n roam: true,\n // true, false, 'scale' or 'zoom', 'move'.\n nodeClick: 'zoomToNode',\n // Leaf node click behaviour: 'zoomToNode', 'link', false.\n // If leafDepth is set and clicking a node which has children but\n // be on left depth, the behaviour would be changing root. Otherwise\n // use behavious defined above.\n animation: true,\n animationDurationUpdate: 900,\n animationEasing: 'quinticInOut',\n breadcrumb: {\n show: true,\n height: 22,\n left: 'center',\n top: 'bottom',\n // right\n // bottom\n emptyItemWidth: 25,\n // Width of empty node.\n itemStyle: {\n color: 'rgba(0,0,0,0.7)',\n //'#5793f3',\n borderColor: 'rgba(255,255,255,0.7)',\n borderWidth: 1,\n shadowColor: 'rgba(150,150,150,1)',\n shadowBlur: 3,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n textStyle: {\n color: '#fff'\n }\n },\n emphasis: {\n textStyle: {}\n }\n },\n label: {\n show: true,\n // Do not use textDistance, for ellipsis rect just the same as treemap node rect.\n distance: 0,\n padding: 5,\n position: 'inside',\n // Can be [5, '5%'] or position stirng like 'insideTopLeft', ...\n // formatter: null,\n color: '#fff',\n ellipsis: true // align\n // verticalAlign\n\n },\n upperLabel: {\n // Label when node is parent.\n show: false,\n position: [0, '50%'],\n height: 20,\n // formatter: null,\n color: '#fff',\n ellipsis: true,\n // align: null,\n verticalAlign: 'middle'\n },\n itemStyle: {\n color: null,\n // Can be 'none' if not necessary.\n colorAlpha: null,\n // Can be 'none' if not necessary.\n colorSaturation: null,\n // Can be 'none' if not necessary.\n borderWidth: 0,\n gapWidth: 0,\n borderColor: '#fff',\n borderColorSaturation: null // If specified, borderColor will be ineffective, and the\n // border color is evaluated by color of current node and\n // borderColorSaturation.\n\n },\n emphasis: {\n upperLabel: {\n show: true,\n position: [0, '50%'],\n color: '#fff',\n ellipsis: true,\n verticalAlign: 'middle'\n }\n },\n visualDimension: 0,\n // Can be 0, 1, 2, 3.\n visualMin: null,\n visualMax: null,\n color: [],\n // + treemapSeries.color should not be modified. Please only modified\n // level[n].color (if necessary).\n // + Specify color list of each level. level[0].color would be global\n // color list if not specified. (see method `setDefault`).\n // + But set as a empty array to forbid fetch color from global palette\n // when using nodeModel.get('color'), otherwise nodes on deep level\n // will always has color palette set and are not able to inherit color\n // from parent node.\n // + TreemapSeries.color can not be set as 'none', otherwise effect\n // legend color fetching (see seriesColor.js).\n colorAlpha: null,\n // Array. Specify color alpha range of each level, like [0.2, 0.8]\n colorSaturation: null,\n // Array. Specify color saturation of each level, like [0.2, 0.5]\n colorMappingBy: 'index',\n // 'value' or 'index' or 'id'.\n visibleMin: 10,\n // If area less than this threshold (unit: pixel^2), node will not\n // be rendered. Only works when sort is 'asc' or 'desc'.\n childrenVisibleMin: null,\n // If area of a node less than this threshold (unit: pixel^2),\n // grandchildren will not show.\n // Why grandchildren? If not grandchildren but children,\n // some siblings show children and some not,\n // the appearance may be mess and not consistent,\n levels: [] // Each item: {\n // visibleMin, itemStyle, visualDimension, label\n // }\n // data: {\n // value: [],\n // children: [],\n // link: 'http://xxx.xxx.xxx',\n // target: 'blank' or 'self'\n // }\n\n },\n\n /**\n * @override\n */\n getInitialData: function (option, ecModel) {\n // Create a virtual root.\n var root = {\n name: option.name,\n children: option.data\n };\n completeTreeValue(root);\n var levels = option.levels || []; // Used in \"visual priority\" in `treemapVisual.js`.\n // This way is a little tricky, must satisfy the precondition:\n // 1. There is no `treeNode.getModel('itemStyle.xxx')` used.\n // 2. The `Model.prototype.getModel()` will not use any clone-like way.\n\n var designatedVisualItemStyle = this.designatedVisualItemStyle = {};\n var designatedVisualModel = new Model({\n itemStyle: designatedVisualItemStyle\n }, this, ecModel);\n levels = option.levels = setDefault(levels, ecModel);\n var levelModels = zrUtil.map(levels || [], function (levelDefine) {\n return new Model(levelDefine, designatedVisualModel, ecModel);\n }, this); // Make sure always a new tree is created when setOption,\n // in TreemapView, we check whether oldTree === newTree\n // to choose mappings approach among old shapes and new shapes.\n\n var tree = Tree.createTree(root, this, beforeLink);\n\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n var levelModel = levelModels[node.depth]; // If no levelModel, we also need `designatedVisualModel`.\n\n model.parentModel = levelModel || designatedVisualModel;\n return model;\n });\n }\n\n return tree.data;\n },\n optionUpdated: function () {\n this.resetViewRoot();\n },\n\n /**\n * @override\n * @param {number} dataIndex\n * @param {boolean} [mutipleSeries=false]\n */\n formatTooltip: function (dataIndex) {\n var data = this.getData();\n var value = this.getRawValue(dataIndex);\n var formattedValue = zrUtil.isArray(value) ? addCommas(value[0]) : addCommas(value);\n var name = data.getName(dataIndex);\n return encodeHTML(name + ': ' + formattedValue);\n },\n\n /**\n * Add tree path to tooltip param\n *\n * @override\n * @param {number} dataIndex\n * @return {Object}\n */\n getDataParams: function (dataIndex) {\n var params = SeriesModel.prototype.getDataParams.apply(this, arguments);\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treePathInfo = wrapTreePathInfo(node, this);\n return params;\n },\n\n /**\n * @public\n * @param {Object} layoutInfo {\n * x: containerGroup x\n * y: containerGroup y\n * width: containerGroup width\n * height: containerGroup height\n * }\n */\n setLayoutInfo: function (layoutInfo) {\n /**\n * @readOnly\n * @type {Object}\n */\n this.layoutInfo = this.layoutInfo || {};\n zrUtil.extend(this.layoutInfo, layoutInfo);\n },\n\n /**\n * @param {string} id\n * @return {number} index\n */\n mapIdToIndex: function (id) {\n // A feature is implemented:\n // index is monotone increasing with the sequence of\n // input id at the first time.\n // This feature can make sure that each data item and its\n // mapped color have the same index between data list and\n // color list at the beginning, which is useful for user\n // to adjust data-color mapping.\n\n /**\n * @private\n * @type {Object}\n */\n var idIndexMap = this._idIndexMap;\n\n if (!idIndexMap) {\n idIndexMap = this._idIndexMap = zrUtil.createHashMap();\n /**\n * @private\n * @type {number}\n */\n\n this._idIndexMapCount = 0;\n }\n\n var index = idIndexMap.get(id);\n\n if (index == null) {\n idIndexMap.set(id, index = this._idIndexMapCount++);\n }\n\n return index;\n },\n getViewRoot: function () {\n return this._viewRoot;\n },\n\n /**\n * @param {module:echarts/data/Tree~Node} [viewRoot]\n */\n resetViewRoot: function (viewRoot) {\n viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot;\n var root = this.getRawData().tree.root;\n\n if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) {\n this._viewRoot = root;\n }\n }\n});\n/**\n * @param {Object} dataNode\n */\n\n\nfunction completeTreeValue(dataNode) {\n // Postorder travel tree.\n // If value of none-leaf node is not set,\n // calculate it by suming up the value of all children.\n var sum = 0;\n zrUtil.each(dataNode.children, function (child) {\n completeTreeValue(child);\n var childValue = child.value;\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n sum += childValue;\n });\n var thisValue = dataNode.value;\n\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n } // Value should not less than 0.\n\n\n if (thisValue < 0) {\n thisValue = 0;\n }\n\n zrUtil.isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue;\n}\n/**\n * set default to level configuration\n */\n\n\nfunction setDefault(levels, ecModel) {\n var globalColorList = ecModel.get('color');\n\n if (!globalColorList) {\n return;\n }\n\n levels = levels || [];\n var hasColorDefine;\n zrUtil.each(levels, function (levelDefine) {\n var model = new Model(levelDefine);\n var modelColor = model.get('color');\n\n if (model.get('itemStyle.color') || modelColor && modelColor !== 'none') {\n hasColorDefine = true;\n }\n });\n\n if (!hasColorDefine) {\n var level0 = levels[0] || (levels[0] = {});\n level0.color = globalColorList.slice();\n }\n\n return levels;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar ComponentView = require(\"../../view/Component\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = ComponentView.extend({\n type: 'timeline'\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"../coord/calendar/Calendar\");\n\nrequire(\"../coord/calendar/CalendarModel\");\n\nrequire(\"./calendar/CalendarView\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(option) {\n // Save geoCoord\n var mapSeries = [];\n zrUtil.each(option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'map') {\n mapSeries.push(seriesOpt);\n seriesOpt.map = seriesOpt.map || seriesOpt.mapType; // Put x, y, width, height, x2, y2 in the top level\n\n zrUtil.defaults(seriesOpt, seriesOpt.mapLocation);\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _barGrid = require(\"../layout/barGrid\");\n\nvar layout = _barGrid.layout;\nvar largeLayout = _barGrid.largeLayout;\n\nrequire(\"../coord/cartesian/Grid\");\n\nrequire(\"./bar/BarSeries\");\n\nrequire(\"./bar/BarView\");\n\nrequire(\"../component/gridSimple\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// In case developer forget to include grid component\necharts.registerLayout(echarts.PRIORITY.VISUAL.LAYOUT, zrUtil.curry(layout, 'bar')); // Use higher prority to avoid to be blocked by other overall layout, which do not\n// only exist in this module, but probably also exist in other modules, like `barPolar`.\n\necharts.registerLayout(echarts.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, largeLayout);\necharts.registerVisual({\n seriesType: 'bar',\n reset: function (seriesModel) {\n // Visual coding for legend\n seriesModel.getData().setVisual('legendSymbol', 'roundRect');\n }\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar vec2 = require(\"zrender/lib/core/vector\");\n\nvar _graphHelper = require(\"./graphHelper\");\n\nvar getSymbolSize = _graphHelper.getSymbolSize;\nvar getNodeGlobalScale = _graphHelper.getNodeGlobalScale;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _multipleGraphEdgeHelper = require(\"../helper/multipleGraphEdgeHelper\");\n\nvar getCurvenessForEdge = _multipleGraphEdgeHelper.getCurvenessForEdge;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PI = Math.PI;\nvar _symbolRadiansHalf = [];\n/**\n * `basedOn` can be:\n * 'value':\n * This layout is not accurate and have same bad case. For example,\n * if the min value is very smaller than the max value, the nodes\n * with the min value probably overlap even though there is enough\n * space to layout them. So we only use this approach in the as the\n * init layout of the force layout.\n * FIXME\n * Probably we do not need this method any more but use\n * `basedOn: 'symbolSize'` in force layout if\n * delay its init operations to GraphView.\n * 'symbolSize':\n * This approach work only if all of the symbol size calculated.\n * That is, the progressive rendering is not applied to graph.\n * FIXME\n * If progressive rendering is applied to graph some day,\n * probably we have to use `basedOn: 'value'`.\n *\n * @param {module:echarts/src/model/Series} seriesModel\n * @param {string} basedOn 'value' or 'symbolSize'\n */\n\nfunction circularLayout(seriesModel, basedOn) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && coordSys.type !== 'view') {\n return;\n }\n\n var rect = coordSys.getBoundingRect();\n var nodeData = seriesModel.getData();\n var graph = nodeData.graph;\n var cx = rect.width / 2 + rect.x;\n var cy = rect.height / 2 + rect.y;\n var r = Math.min(rect.width, rect.height) / 2;\n var count = nodeData.count();\n nodeData.setLayout({\n cx: cx,\n cy: cy\n });\n\n if (!count) {\n return;\n }\n\n _layoutNodesBasedOn[basedOn](seriesModel, coordSys, graph, nodeData, r, cx, cy, count);\n\n graph.eachEdge(function (edge, index) {\n var curveness = zrUtil.retrieve3(edge.getModel().get('lineStyle.curveness'), getCurvenessForEdge(edge, seriesModel, index), 0);\n var p1 = vec2.clone(edge.node1.getLayout());\n var p2 = vec2.clone(edge.node2.getLayout());\n var cp1;\n var x12 = (p1[0] + p2[0]) / 2;\n var y12 = (p1[1] + p2[1]) / 2;\n\n if (+curveness) {\n curveness *= 3;\n cp1 = [cx * curveness + x12 * (1 - curveness), cy * curveness + y12 * (1 - curveness)];\n }\n\n edge.setLayout([p1, p2, cp1]);\n });\n}\n\nvar _layoutNodesBasedOn = {\n value: function (seriesModel, coordSys, graph, nodeData, r, cx, cy, count) {\n var angle = 0;\n var sum = nodeData.getSum('value');\n var unitAngle = Math.PI * 2 / (sum || count);\n graph.eachNode(function (node) {\n var value = node.getValue('value');\n var radianHalf = unitAngle * (sum ? value : 1) / 2;\n angle += radianHalf;\n node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]);\n angle += radianHalf;\n });\n },\n symbolSize: function (seriesModel, coordSys, graph, nodeData, r, cx, cy, count) {\n var sumRadian = 0;\n _symbolRadiansHalf.length = count;\n var nodeScale = getNodeGlobalScale(seriesModel);\n graph.eachNode(function (node) {\n var symbolSize = getSymbolSize(node); // Normally this case will not happen, but we still add\n // some the defensive code (2px is an arbitrary value).\n\n isNaN(symbolSize) && (symbolSize = 2);\n symbolSize < 0 && (symbolSize = 0);\n symbolSize *= nodeScale;\n var symbolRadianHalf = Math.asin(symbolSize / 2 / r); // when `symbolSize / 2` is bigger than `r`.\n\n isNaN(symbolRadianHalf) && (symbolRadianHalf = PI / 2);\n _symbolRadiansHalf[node.dataIndex] = symbolRadianHalf;\n sumRadian += symbolRadianHalf * 2;\n });\n var halfRemainRadian = (2 * PI - sumRadian) / count / 2;\n var angle = 0;\n graph.eachNode(function (node) {\n var radianHalf = halfRemainRadian + _symbolRadiansHalf[node.dataIndex];\n angle += radianHalf;\n node.setLayout([r * Math.cos(angle) + cx, r * Math.sin(angle) + cy]);\n angle += radianHalf;\n });\n }\n};\nexports.circularLayout = circularLayout;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./marker/MarkLineModel\");\n\nrequire(\"./marker/MarkLineView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerPreprocessor(function (opt) {\n // Make sure markLine component is enabled\n opt.markLine = opt.markLine || {};\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar SymbolDraw = require(\"../helper/SymbolDraw\");\n\nvar LineDraw = require(\"../helper/LineDraw\");\n\nvar RoamController = require(\"../../component/helper/RoamController\");\n\nvar roamHelper = require(\"../../component/helper/roamHelper\");\n\nvar _cursorHelper = require(\"../../component/helper/cursorHelper\");\n\nvar onIrrelevantElement = _cursorHelper.onIrrelevantElement;\n\nvar graphic = require(\"../../util/graphic\");\n\nvar adjustEdge = require(\"./adjustEdge\");\n\nvar _graphHelper = require(\"./graphHelper\");\n\nvar getNodeGlobalScale = _graphHelper.getNodeGlobalScale;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar FOCUS_ADJACENCY = '__focusNodeAdjacency';\nvar UNFOCUS_ADJACENCY = '__unfocusNodeAdjacency';\nvar nodeOpacityPath = ['itemStyle', 'opacity'];\nvar lineOpacityPath = ['lineStyle', 'opacity'];\n\nfunction getItemOpacity(item, opacityPath) {\n var opacity = item.getVisual('opacity');\n return opacity != null ? opacity : item.getModel().get(opacityPath);\n}\n\nfunction fadeOutItem(item, opacityPath, opacityRatio) {\n var el = item.getGraphicEl();\n var opacity = getItemOpacity(item, opacityPath);\n\n if (opacityRatio != null) {\n opacity == null && (opacity = 1);\n opacity *= opacityRatio;\n }\n\n el.downplay && el.downplay();\n el.traverse(function (child) {\n if (!child.isGroup) {\n var opct = child.lineLabelOriginalOpacity;\n\n if (opct == null || opacityRatio != null) {\n opct = opacity;\n }\n\n child.setStyle('opacity', opct);\n }\n });\n}\n\nfunction fadeInItem(item, opacityPath) {\n var opacity = getItemOpacity(item, opacityPath);\n var el = item.getGraphicEl(); // Should go back to normal opacity first, consider hoverLayer,\n // where current state is copied to elMirror, and support\n // emphasis opacity here.\n\n el.traverse(function (child) {\n !child.isGroup && child.setStyle('opacity', opacity);\n });\n el.highlight && el.highlight();\n}\n\nvar _default = echarts.extendChartView({\n type: 'graph',\n init: function (ecModel, api) {\n var symbolDraw = new SymbolDraw();\n var lineDraw = new LineDraw();\n var group = this.group;\n this._controller = new RoamController(api.getZr());\n this._controllerHost = {\n target: group\n };\n group.add(symbolDraw.group);\n group.add(lineDraw.group);\n this._symbolDraw = symbolDraw;\n this._lineDraw = lineDraw;\n this._firstRender = true;\n },\n render: function (seriesModel, ecModel, api) {\n var graphView = this;\n var coordSys = seriesModel.coordinateSystem;\n this._model = seriesModel;\n var symbolDraw = this._symbolDraw;\n var lineDraw = this._lineDraw;\n var group = this.group;\n\n if (coordSys.type === 'view') {\n var groupNewProp = {\n position: coordSys.position,\n scale: coordSys.scale\n };\n\n if (this._firstRender) {\n group.attr(groupNewProp);\n } else {\n graphic.updateProps(group, groupNewProp, seriesModel);\n }\n } // Fix edge contact point with node\n\n\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n var data = seriesModel.getData();\n symbolDraw.updateData(data);\n var edgeData = seriesModel.getEdgeData();\n lineDraw.updateData(edgeData);\n\n this._updateNodeAndLinkScale();\n\n this._updateController(seriesModel, ecModel, api);\n\n clearTimeout(this._layoutTimeout);\n var forceLayout = seriesModel.forceLayout;\n var layoutAnimation = seriesModel.get('force.layoutAnimation');\n\n if (forceLayout) {\n this._startForceLayoutIteration(forceLayout, layoutAnimation);\n }\n\n data.eachItemGraphicEl(function (el, idx) {\n var itemModel = data.getItemModel(idx); // Update draggable\n\n el.off('drag').off('dragend');\n var draggable = itemModel.get('draggable');\n\n if (draggable) {\n el.on('drag', function () {\n if (forceLayout) {\n forceLayout.warmUp();\n !this._layouting && this._startForceLayoutIteration(forceLayout, layoutAnimation);\n forceLayout.setFixed(idx); // Write position back to layout\n\n data.setItemLayout(idx, el.position);\n }\n }, this).on('dragend', function () {\n if (forceLayout) {\n forceLayout.setUnfixed(idx);\n }\n }, this);\n }\n\n el.setDraggable(draggable && forceLayout);\n el[FOCUS_ADJACENCY] && el.off('mouseover', el[FOCUS_ADJACENCY]);\n el[UNFOCUS_ADJACENCY] && el.off('mouseout', el[UNFOCUS_ADJACENCY]);\n\n if (itemModel.get('focusNodeAdjacency')) {\n el.on('mouseover', el[FOCUS_ADJACENCY] = function () {\n graphView._clearTimer();\n\n api.dispatchAction({\n type: 'focusNodeAdjacency',\n seriesId: seriesModel.id,\n dataIndex: el.dataIndex\n });\n });\n el.on('mouseout', el[UNFOCUS_ADJACENCY] = function () {\n graphView._dispatchUnfocus(api);\n });\n }\n }, this);\n data.graph.eachEdge(function (edge) {\n var el = edge.getGraphicEl();\n el[FOCUS_ADJACENCY] && el.off('mouseover', el[FOCUS_ADJACENCY]);\n el[UNFOCUS_ADJACENCY] && el.off('mouseout', el[UNFOCUS_ADJACENCY]);\n\n if (edge.getModel().get('focusNodeAdjacency')) {\n el.on('mouseover', el[FOCUS_ADJACENCY] = function () {\n graphView._clearTimer();\n\n api.dispatchAction({\n type: 'focusNodeAdjacency',\n seriesId: seriesModel.id,\n edgeDataIndex: edge.dataIndex\n });\n });\n el.on('mouseout', el[UNFOCUS_ADJACENCY] = function () {\n graphView._dispatchUnfocus(api);\n });\n }\n });\n var circularRotateLabel = seriesModel.get('layout') === 'circular' && seriesModel.get('circular.rotateLabel');\n var cx = data.getLayout('cx');\n var cy = data.getLayout('cy');\n data.eachItemGraphicEl(function (el, idx) {\n var itemModel = data.getItemModel(idx);\n var labelRotate = itemModel.get('label.rotate') || 0;\n var symbolPath = el.getSymbolPath();\n\n if (circularRotateLabel) {\n var pos = data.getItemLayout(idx);\n var rad = Math.atan2(pos[1] - cy, pos[0] - cx);\n\n if (rad < 0) {\n rad = Math.PI * 2 + rad;\n }\n\n var isLeft = pos[0] < cx;\n\n if (isLeft) {\n rad = rad - Math.PI;\n }\n\n var textPosition = isLeft ? 'left' : 'right';\n graphic.modifyLabelStyle(symbolPath, {\n textRotation: -rad,\n textPosition: textPosition,\n textOrigin: 'center'\n }, {\n textPosition: textPosition\n });\n } else {\n graphic.modifyLabelStyle(symbolPath, {\n textRotation: labelRotate *= Math.PI / 180\n });\n }\n });\n this._firstRender = false;\n },\n dispose: function () {\n this._controller && this._controller.dispose();\n this._controllerHost = {};\n\n this._clearTimer();\n },\n _dispatchUnfocus: function (api, opt) {\n var self = this;\n\n this._clearTimer();\n\n this._unfocusDelayTimer = setTimeout(function () {\n self._unfocusDelayTimer = null;\n api.dispatchAction({\n type: 'unfocusNodeAdjacency',\n seriesId: self._model.id\n });\n }, 500);\n },\n _clearTimer: function () {\n if (this._unfocusDelayTimer) {\n clearTimeout(this._unfocusDelayTimer);\n this._unfocusDelayTimer = null;\n }\n },\n focusNodeAdjacency: function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var graph = data.graph;\n var dataIndex = payload.dataIndex;\n var edgeDataIndex = payload.edgeDataIndex;\n var node = graph.getNodeByIndex(dataIndex);\n var edge = graph.getEdgeByIndex(edgeDataIndex);\n\n if (!node && !edge) {\n return;\n }\n\n graph.eachNode(function (node) {\n fadeOutItem(node, nodeOpacityPath, 0.1);\n });\n graph.eachEdge(function (edge) {\n fadeOutItem(edge, lineOpacityPath, 0.1);\n });\n\n if (node) {\n fadeInItem(node, nodeOpacityPath);\n zrUtil.each(node.edges, function (adjacentEdge) {\n if (adjacentEdge.dataIndex < 0) {\n return;\n }\n\n fadeInItem(adjacentEdge, lineOpacityPath);\n fadeInItem(adjacentEdge.node1, nodeOpacityPath);\n fadeInItem(adjacentEdge.node2, nodeOpacityPath);\n });\n }\n\n if (edge) {\n fadeInItem(edge, lineOpacityPath);\n fadeInItem(edge.node1, nodeOpacityPath);\n fadeInItem(edge.node2, nodeOpacityPath);\n }\n },\n unfocusNodeAdjacency: function (seriesModel, ecModel, api, payload) {\n var graph = seriesModel.getData().graph;\n graph.eachNode(function (node) {\n fadeOutItem(node, nodeOpacityPath);\n });\n graph.eachEdge(function (edge) {\n fadeOutItem(edge, lineOpacityPath);\n });\n },\n _startForceLayoutIteration: function (forceLayout, layoutAnimation) {\n var self = this;\n\n (function step() {\n forceLayout.step(function (stopped) {\n self.updateLayout(self._model);\n (self._layouting = !stopped) && (layoutAnimation ? self._layoutTimeout = setTimeout(step, 16) : step());\n });\n })();\n },\n _updateController: function (seriesModel, ecModel, api) {\n var controller = this._controller;\n var controllerHost = this._controllerHost;\n var group = this.group;\n controller.setPointerChecker(function (e, x, y) {\n var rect = group.getBoundingRect();\n rect.applyTransform(group.transform);\n return rect.contain(x, y) && !onIrrelevantElement(e, api, seriesModel);\n });\n\n if (seriesModel.coordinateSystem.type !== 'view') {\n controller.disable();\n return;\n }\n\n controller.enable(seriesModel.get('roam'));\n controllerHost.zoomLimit = seriesModel.get('scaleLimit');\n controllerHost.zoom = seriesModel.coordinateSystem.getZoom();\n controller.off('pan').off('zoom').on('pan', function (e) {\n roamHelper.updateViewOnPan(controllerHost, e.dx, e.dy);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'graphRoam',\n dx: e.dx,\n dy: e.dy\n });\n }).on('zoom', function (e) {\n roamHelper.updateViewOnZoom(controllerHost, e.scale, e.originX, e.originY);\n api.dispatchAction({\n seriesId: seriesModel.id,\n type: 'graphRoam',\n zoom: e.scale,\n originX: e.originX,\n originY: e.originY\n });\n\n this._updateNodeAndLinkScale();\n\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n\n this._lineDraw.updateLayout();\n }, this);\n },\n _updateNodeAndLinkScale: function () {\n var seriesModel = this._model;\n var data = seriesModel.getData();\n var nodeScale = getNodeGlobalScale(seriesModel);\n var invScale = [nodeScale, nodeScale];\n data.eachItemGraphicEl(function (el, idx) {\n el.attr('scale', invScale);\n });\n },\n updateLayout: function (seriesModel) {\n adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel));\n\n this._symbolDraw.updateLayout();\n\n this._lineDraw.updateLayout();\n },\n remove: function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove();\n this._lineDraw && this._lineDraw.remove();\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar createHashMap = _util.createHashMap;\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// Pick color from palette for each data item.\n// Applicable for charts that require applying color palette\n// in data level (like pie, funnel, chord).\nfunction _default(seriesType) {\n return {\n getTargetSeries: function (ecModel) {\n // Pie and funnel may use diferrent scope\n var paletteScope = {};\n var seiresModelMap = createHashMap();\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n seriesModel.__paletteScope = paletteScope;\n seiresModelMap.set(seriesModel.uid, seriesModel);\n });\n return seiresModelMap;\n },\n reset: function (seriesModel, ecModel) {\n var dataAll = seriesModel.getRawData();\n var idxMap = {};\n var data = seriesModel.getData();\n data.each(function (idx) {\n var rawIdx = data.getRawIndex(idx);\n idxMap[rawIdx] = idx;\n });\n dataAll.each(function (rawIdx) {\n var filteredIdx = idxMap[rawIdx]; // If series.itemStyle.normal.color is a function. itemVisual may be encoded\n\n var singleDataColor = filteredIdx != null && data.getItemVisual(filteredIdx, 'color', true);\n var singleDataBorderColor = filteredIdx != null && data.getItemVisual(filteredIdx, 'borderColor', true);\n var itemModel;\n\n if (!singleDataColor || !singleDataBorderColor) {\n // FIXME Performance\n itemModel = dataAll.getItemModel(rawIdx);\n }\n\n if (!singleDataColor) {\n var color = itemModel.get('itemStyle.color') || seriesModel.getColorFromPalette(dataAll.getName(rawIdx) || rawIdx + '', seriesModel.__paletteScope, dataAll.count()); // Data is not filtered\n\n if (filteredIdx != null) {\n data.setItemVisual(filteredIdx, 'color', color);\n }\n }\n\n if (!singleDataBorderColor) {\n var borderColor = itemModel.get('itemStyle.borderColor'); // Data is not filtered\n\n if (filteredIdx != null) {\n data.setItemVisual(filteredIdx, 'borderColor', borderColor);\n }\n }\n });\n }\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\nvar MAX_SAFE_INTEGER = _number.MAX_SAFE_INTEGER;\n\nvar layout = require(\"../../util/layout\");\n\nvar helper = require(\"../helper/treeHelper\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* A third-party license is embeded for some of the code in this file:\n* The treemap layout implementation was originally copied from\n* \"d3.js\" with some modifications made for this project.\n* (See more details in the comment of the method \"squarify\" below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\nvar mathMax = Math.max;\nvar mathMin = Math.min;\nvar retrieveValue = zrUtil.retrieve;\nvar each = zrUtil.each;\nvar PATH_BORDER_WIDTH = ['itemStyle', 'borderWidth'];\nvar PATH_GAP_WIDTH = ['itemStyle', 'gapWidth'];\nvar PATH_UPPER_LABEL_SHOW = ['upperLabel', 'show'];\nvar PATH_UPPER_LABEL_HEIGHT = ['upperLabel', 'height'];\n/**\n * @public\n */\n\nvar _default = {\n seriesType: 'treemap',\n reset: function (seriesModel, ecModel, api, payload) {\n // Layout result in each node:\n // {x, y, width, height, area, borderWidth}\n var ecWidth = api.getWidth();\n var ecHeight = api.getHeight();\n var seriesOption = seriesModel.option;\n var layoutInfo = layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n var size = seriesOption.size || []; // Compatible with ec2.\n\n var containerWidth = parsePercent(retrieveValue(layoutInfo.width, size[0]), ecWidth);\n var containerHeight = parsePercent(retrieveValue(layoutInfo.height, size[1]), ecHeight); // Fetch payload info.\n\n var payloadType = payload && payload.type;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, seriesModel);\n var rootRect = payloadType === 'treemapRender' || payloadType === 'treemapMove' ? payload.rootRect : null;\n var viewRoot = seriesModel.getViewRoot();\n var viewAbovePath = helper.getPathToRoot(viewRoot);\n\n if (payloadType !== 'treemapMove') {\n var rootSize = payloadType === 'treemapZoomToNode' ? estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) : rootRect ? [rootRect.width, rootRect.height] : [containerWidth, containerHeight];\n var sort = seriesOption.sort;\n\n if (sort && sort !== 'asc' && sort !== 'desc') {\n sort = 'desc';\n }\n\n var options = {\n squareRatio: seriesOption.squareRatio,\n sort: sort,\n leafDepth: seriesOption.leafDepth\n }; // layout should be cleared because using updateView but not update.\n\n viewRoot.hostTree.clearLayouts(); // TODO\n // optimize: if out of view clip, do not layout.\n // But take care that if do not render node out of view clip,\n // how to calculate start po\n\n var viewRootLayout = {\n x: 0,\n y: 0,\n width: rootSize[0],\n height: rootSize[1],\n area: rootSize[0] * rootSize[1]\n };\n viewRoot.setLayout(viewRootLayout);\n squarify(viewRoot, options, false, 0); // Supplement layout.\n\n var viewRootLayout = viewRoot.getLayout();\n each(viewAbovePath, function (node, index) {\n var childValue = (viewAbovePath[index + 1] || viewRoot).getValue();\n node.setLayout(zrUtil.extend({\n dataExtent: [childValue, childValue],\n borderWidth: 0,\n upperHeight: 0\n }, viewRootLayout));\n });\n }\n\n var treeRoot = seriesModel.getData().tree.root;\n treeRoot.setLayout(calculateRootPosition(layoutInfo, rootRect, targetInfo), true);\n seriesModel.setLayoutInfo(layoutInfo); // FIXME\n // 现在没有clip功能,暂时取ec高宽。\n\n prunning(treeRoot, // Transform to base element coordinate system.\n new BoundingRect(-layoutInfo.x, -layoutInfo.y, ecWidth, ecHeight), viewAbovePath, viewRoot, 0);\n }\n};\n/**\n * Layout treemap with squarify algorithm.\n * The original presentation of this algorithm\n * was made by Mark Bruls, Kees Huizing, and Jarke J. van Wijk\n * .\n * The implementation of this algorithm was originally copied from \"d3.js\"\n * \n * with some modifications made for this program.\n * See the license statement at the head of this file.\n *\n * @protected\n * @param {module:echarts/data/Tree~TreeNode} node\n * @param {Object} options\n * @param {string} options.sort 'asc' or 'desc'\n * @param {number} options.squareRatio\n * @param {boolean} hideChildren\n * @param {number} depth\n */\n\nfunction squarify(node, options, hideChildren, depth) {\n var width;\n var height;\n\n if (node.isRemoved()) {\n return;\n }\n\n var thisLayout = node.getLayout();\n width = thisLayout.width;\n height = thisLayout.height; // Considering border and gap\n\n var nodeModel = node.getModel();\n var borderWidth = nodeModel.get(PATH_BORDER_WIDTH);\n var halfGapWidth = nodeModel.get(PATH_GAP_WIDTH) / 2;\n var upperLabelHeight = getUpperLabelHeight(nodeModel);\n var upperHeight = Math.max(borderWidth, upperLabelHeight);\n var layoutOffset = borderWidth - halfGapWidth;\n var layoutOffsetUpper = upperHeight - halfGapWidth;\n var nodeModel = node.getModel();\n node.setLayout({\n borderWidth: borderWidth,\n upperHeight: upperHeight,\n upperLabelHeight: upperLabelHeight\n }, true);\n width = mathMax(width - 2 * layoutOffset, 0);\n height = mathMax(height - layoutOffset - layoutOffsetUpper, 0);\n var totalArea = width * height;\n var viewChildren = initChildren(node, nodeModel, totalArea, options, hideChildren, depth);\n\n if (!viewChildren.length) {\n return;\n }\n\n var rect = {\n x: layoutOffset,\n y: layoutOffsetUpper,\n width: width,\n height: height\n };\n var rowFixedLength = mathMin(width, height);\n var best = Infinity; // the best row score so far\n\n var row = [];\n row.area = 0;\n\n for (var i = 0, len = viewChildren.length; i < len;) {\n var child = viewChildren[i];\n row.push(child);\n row.area += child.getLayout().area;\n var score = worst(row, rowFixedLength, options.squareRatio); // continue with this orientation\n\n if (score <= best) {\n i++;\n best = score;\n } // abort, and try a different orientation\n else {\n row.area -= row.pop().getLayout().area;\n position(row, rowFixedLength, rect, halfGapWidth, false);\n rowFixedLength = mathMin(rect.width, rect.height);\n row.length = row.area = 0;\n best = Infinity;\n }\n }\n\n if (row.length) {\n position(row, rowFixedLength, rect, halfGapWidth, true);\n }\n\n if (!hideChildren) {\n var childrenVisibleMin = nodeModel.get('childrenVisibleMin');\n\n if (childrenVisibleMin != null && totalArea < childrenVisibleMin) {\n hideChildren = true;\n }\n }\n\n for (var i = 0, len = viewChildren.length; i < len; i++) {\n squarify(viewChildren[i], options, hideChildren, depth + 1);\n }\n}\n/**\n * Set area to each child, and calculate data extent for visual coding.\n */\n\n\nfunction initChildren(node, nodeModel, totalArea, options, hideChildren, depth) {\n var viewChildren = node.children || [];\n var orderBy = options.sort;\n orderBy !== 'asc' && orderBy !== 'desc' && (orderBy = null);\n var overLeafDepth = options.leafDepth != null && options.leafDepth <= depth; // leafDepth has higher priority.\n\n if (hideChildren && !overLeafDepth) {\n return node.viewChildren = [];\n } // Sort children, order by desc.\n\n\n viewChildren = zrUtil.filter(viewChildren, function (child) {\n return !child.isRemoved();\n });\n sort(viewChildren, orderBy);\n var info = statistic(nodeModel, viewChildren, orderBy);\n\n if (info.sum === 0) {\n return node.viewChildren = [];\n }\n\n info.sum = filterByThreshold(nodeModel, totalArea, info.sum, orderBy, viewChildren);\n\n if (info.sum === 0) {\n return node.viewChildren = [];\n } // Set area to each child.\n\n\n for (var i = 0, len = viewChildren.length; i < len; i++) {\n var area = viewChildren[i].getValue() / info.sum * totalArea; // Do not use setLayout({...}, true), because it is needed to clear last layout.\n\n viewChildren[i].setLayout({\n area: area\n });\n }\n\n if (overLeafDepth) {\n viewChildren.length && node.setLayout({\n isLeafRoot: true\n }, true);\n viewChildren.length = 0;\n }\n\n node.viewChildren = viewChildren;\n node.setLayout({\n dataExtent: info.dataExtent\n }, true);\n return viewChildren;\n}\n/**\n * Consider 'visibleMin'. Modify viewChildren and get new sum.\n */\n\n\nfunction filterByThreshold(nodeModel, totalArea, sum, orderBy, orderedChildren) {\n // visibleMin is not supported yet when no option.sort.\n if (!orderBy) {\n return sum;\n }\n\n var visibleMin = nodeModel.get('visibleMin');\n var len = orderedChildren.length;\n var deletePoint = len; // Always travel from little value to big value.\n\n for (var i = len - 1; i >= 0; i--) {\n var value = orderedChildren[orderBy === 'asc' ? len - i - 1 : i].getValue();\n\n if (value / sum * totalArea < visibleMin) {\n deletePoint = i;\n sum -= value;\n }\n }\n\n orderBy === 'asc' ? orderedChildren.splice(0, len - deletePoint) : orderedChildren.splice(deletePoint, len - deletePoint);\n return sum;\n}\n/**\n * Sort\n */\n\n\nfunction sort(viewChildren, orderBy) {\n if (orderBy) {\n viewChildren.sort(function (a, b) {\n var diff = orderBy === 'asc' ? a.getValue() - b.getValue() : b.getValue() - a.getValue();\n return diff === 0 ? orderBy === 'asc' ? a.dataIndex - b.dataIndex : b.dataIndex - a.dataIndex : diff;\n });\n }\n\n return viewChildren;\n}\n/**\n * Statistic\n */\n\n\nfunction statistic(nodeModel, children, orderBy) {\n // Calculate sum.\n var sum = 0;\n\n for (var i = 0, len = children.length; i < len; i++) {\n sum += children[i].getValue();\n } // Statistic data extent for latter visual coding.\n // Notice: data extent should be calculate based on raw children\n // but not filtered view children, otherwise visual mapping will not\n // be stable when zoom (where children is filtered by visibleMin).\n\n\n var dimension = nodeModel.get('visualDimension');\n var dataExtent; // The same as area dimension.\n\n if (!children || !children.length) {\n dataExtent = [NaN, NaN];\n } else if (dimension === 'value' && orderBy) {\n dataExtent = [children[children.length - 1].getValue(), children[0].getValue()];\n orderBy === 'asc' && dataExtent.reverse();\n } // Other dimension.\n else {\n var dataExtent = [Infinity, -Infinity];\n each(children, function (child) {\n var value = child.getValue(dimension);\n value < dataExtent[0] && (dataExtent[0] = value);\n value > dataExtent[1] && (dataExtent[1] = value);\n });\n }\n\n return {\n sum: sum,\n dataExtent: dataExtent\n };\n}\n/**\n * Computes the score for the specified row,\n * as the worst aspect ratio.\n */\n\n\nfunction worst(row, rowFixedLength, ratio) {\n var areaMax = 0;\n var areaMin = Infinity;\n\n for (var i = 0, area, len = row.length; i < len; i++) {\n area = row[i].getLayout().area;\n\n if (area) {\n area < areaMin && (areaMin = area);\n area > areaMax && (areaMax = area);\n }\n }\n\n var squareArea = row.area * row.area;\n var f = rowFixedLength * rowFixedLength * ratio;\n return squareArea ? mathMax(f * areaMax / squareArea, squareArea / (f * areaMin)) : Infinity;\n}\n/**\n * Positions the specified row of nodes. Modifies `rect`.\n */\n\n\nfunction position(row, rowFixedLength, rect, halfGapWidth, flush) {\n // When rowFixedLength === rect.width,\n // it is horizontal subdivision,\n // rowFixedLength is the width of the subdivision,\n // rowOtherLength is the height of the subdivision,\n // and nodes will be positioned from left to right.\n // wh[idx0WhenH] means: when horizontal,\n // wh[idx0WhenH] => wh[0] => 'width'.\n // xy[idx1WhenH] => xy[1] => 'y'.\n var idx0WhenH = rowFixedLength === rect.width ? 0 : 1;\n var idx1WhenH = 1 - idx0WhenH;\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n var last = rect[xy[idx0WhenH]];\n var rowOtherLength = rowFixedLength ? row.area / rowFixedLength : 0;\n\n if (flush || rowOtherLength > rect[wh[idx1WhenH]]) {\n rowOtherLength = rect[wh[idx1WhenH]]; // over+underflow\n }\n\n for (var i = 0, rowLen = row.length; i < rowLen; i++) {\n var node = row[i];\n var nodeLayout = {};\n var step = rowOtherLength ? node.getLayout().area / rowOtherLength : 0;\n var wh1 = nodeLayout[wh[idx1WhenH]] = mathMax(rowOtherLength - 2 * halfGapWidth, 0); // We use Math.max/min to avoid negative width/height when considering gap width.\n\n var remain = rect[xy[idx0WhenH]] + rect[wh[idx0WhenH]] - last;\n var modWH = i === rowLen - 1 || remain < step ? remain : step;\n var wh0 = nodeLayout[wh[idx0WhenH]] = mathMax(modWH - 2 * halfGapWidth, 0);\n nodeLayout[xy[idx1WhenH]] = rect[xy[idx1WhenH]] + mathMin(halfGapWidth, wh1 / 2);\n nodeLayout[xy[idx0WhenH]] = last + mathMin(halfGapWidth, wh0 / 2);\n last += modWH;\n node.setLayout(nodeLayout, true);\n }\n\n rect[xy[idx1WhenH]] += rowOtherLength;\n rect[wh[idx1WhenH]] -= rowOtherLength;\n} // Return [containerWidth, containerHeight] as default.\n\n\nfunction estimateRootSize(seriesModel, targetInfo, viewRoot, containerWidth, containerHeight) {\n // If targetInfo.node exists, we zoom to the node,\n // so estimate whold width and heigth by target node.\n var currNode = (targetInfo || {}).node;\n var defaultSize = [containerWidth, containerHeight];\n\n if (!currNode || currNode === viewRoot) {\n return defaultSize;\n }\n\n var parent;\n var viewArea = containerWidth * containerHeight;\n var area = viewArea * seriesModel.option.zoomToNodeRatio;\n\n while (parent = currNode.parentNode) {\n // jshint ignore:line\n var sum = 0;\n var siblings = parent.children;\n\n for (var i = 0, len = siblings.length; i < len; i++) {\n sum += siblings[i].getValue();\n }\n\n var currNodeValue = currNode.getValue();\n\n if (currNodeValue === 0) {\n return defaultSize;\n }\n\n area *= sum / currNodeValue; // Considering border, suppose aspect ratio is 1.\n\n var parentModel = parent.getModel();\n var borderWidth = parentModel.get(PATH_BORDER_WIDTH);\n var upperHeight = Math.max(borderWidth, getUpperLabelHeight(parentModel, borderWidth));\n area += 4 * borderWidth * borderWidth + (3 * borderWidth + upperHeight) * Math.pow(area, 0.5);\n area > MAX_SAFE_INTEGER && (area = MAX_SAFE_INTEGER);\n currNode = parent;\n }\n\n area < viewArea && (area = viewArea);\n var scale = Math.pow(area / viewArea, 0.5);\n return [containerWidth * scale, containerHeight * scale];\n} // Root postion base on coord of containerGroup\n\n\nfunction calculateRootPosition(layoutInfo, rootRect, targetInfo) {\n if (rootRect) {\n return {\n x: rootRect.x,\n y: rootRect.y\n };\n }\n\n var defaultPosition = {\n x: 0,\n y: 0\n };\n\n if (!targetInfo) {\n return defaultPosition;\n } // If targetInfo is fetched by 'retrieveTargetInfo',\n // old tree and new tree are the same tree,\n // so the node still exists and we can visit it.\n\n\n var targetNode = targetInfo.node;\n var layout = targetNode.getLayout();\n\n if (!layout) {\n return defaultPosition;\n } // Transform coord from local to container.\n\n\n var targetCenter = [layout.width / 2, layout.height / 2];\n var node = targetNode;\n\n while (node) {\n var nodeLayout = node.getLayout();\n targetCenter[0] += nodeLayout.x;\n targetCenter[1] += nodeLayout.y;\n node = node.parentNode;\n }\n\n return {\n x: layoutInfo.width / 2 - targetCenter[0],\n y: layoutInfo.height / 2 - targetCenter[1]\n };\n} // Mark nodes visible for prunning when visual coding and rendering.\n// Prunning depends on layout and root position, so we have to do it after layout.\n\n\nfunction prunning(node, clipRect, viewAbovePath, viewRoot, depth) {\n var nodeLayout = node.getLayout();\n var nodeInViewAbovePath = viewAbovePath[depth];\n var isAboveViewRoot = nodeInViewAbovePath && nodeInViewAbovePath === node;\n\n if (nodeInViewAbovePath && !isAboveViewRoot || depth === viewAbovePath.length && node !== viewRoot) {\n return;\n }\n\n node.setLayout({\n // isInView means: viewRoot sub tree + viewAbovePath\n isInView: true,\n // invisible only means: outside view clip so that the node can not\n // see but still layout for animation preparation but not render.\n invisible: !isAboveViewRoot && !clipRect.intersect(nodeLayout),\n isAboveViewRoot: isAboveViewRoot\n }, true); // Transform to child coordinate.\n\n var childClipRect = new BoundingRect(clipRect.x - nodeLayout.x, clipRect.y - nodeLayout.y, clipRect.width, clipRect.height);\n each(node.viewChildren || [], function (child) {\n prunning(child, childClipRect, viewAbovePath, viewRoot, depth + 1);\n });\n}\n\nfunction getUpperLabelHeight(model) {\n return model.get(PATH_UPPER_LABEL_SHOW) ? model.get(PATH_UPPER_LABEL_HEIGHT) : 0;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar helper = require(\"./helper\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerAction('dataZoom', function (payload, ecModel) {\n var linkedNodesFinder = helper.createLinkedNodesFinder(zrUtil.bind(ecModel.eachComponent, ecModel, 'dataZoom'), helper.eachAxisDim, function (model, dimNames) {\n return model.get(dimNames.axisIndex);\n });\n var effectedModels = [];\n ecModel.eachComponent({\n mainType: 'dataZoom',\n query: payload\n }, function (model, index) {\n effectedModels.push.apply(effectedModels, linkedNodesFinder(model).nodes);\n });\n zrUtil.each(effectedModels, function (dataZoomModel, index) {\n dataZoomModel.setRawRange({\n start: payload.start,\n end: payload.end,\n startValue: payload.startValue,\n endValue: payload.endValue\n });\n });\n});","var Definable = require(\"./Definable\");\n\nvar zrUtil = require(\"../../core/util\");\n\nvar matrix = require(\"../../core/matrix\");\n\n/**\n * @file Manages SVG clipPath elements.\n * @author Zhang Wenli\n */\n\n/**\n * Manages SVG clipPath elements.\n *\n * @class\n * @extends Definable\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n */\nfunction ClippathManager(zrId, svgRoot) {\n Definable.call(this, zrId, svgRoot, 'clipPath', '__clippath_in_use__');\n}\n\nzrUtil.inherits(ClippathManager, Definable);\n/**\n * Update clipPath.\n *\n * @param {Displayable} displayable displayable element\n */\n\nClippathManager.prototype.update = function (displayable) {\n var svgEl = this.getSvgElement(displayable);\n\n if (svgEl) {\n this.updateDom(svgEl, displayable.__clipPaths, false);\n }\n\n var textEl = this.getTextSvgElement(displayable);\n\n if (textEl) {\n // Make another clipPath for text, since it's transform\n // matrix is not the same with svgElement\n this.updateDom(textEl, displayable.__clipPaths, true);\n }\n\n this.markUsed(displayable);\n};\n/**\n * Create an SVGElement of displayable and create a of its\n * clipPath\n *\n * @param {Displayable} parentEl parent element\n * @param {ClipPath[]} clipPaths clipPaths of parent element\n * @param {boolean} isText if parent element is Text\n */\n\n\nClippathManager.prototype.updateDom = function (parentEl, clipPaths, isText) {\n if (clipPaths && clipPaths.length > 0) {\n // Has clipPath, create with the first clipPath\n var defs = this.getDefs(true);\n var clipPath = clipPaths[0];\n var clipPathEl;\n var id;\n var dom = isText ? '_textDom' : '_dom';\n\n if (clipPath[dom]) {\n // Use a dom that is already in \n id = clipPath[dom].getAttribute('id');\n clipPathEl = clipPath[dom]; // Use a dom that is already in \n\n if (!defs.contains(clipPathEl)) {\n // This happens when set old clipPath that has\n // been previously removed\n defs.appendChild(clipPathEl);\n }\n } else {\n // New \n id = 'zr' + this._zrId + '-clip-' + this.nextId;\n ++this.nextId;\n clipPathEl = this.createElement('clipPath');\n clipPathEl.setAttribute('id', id);\n defs.appendChild(clipPathEl);\n clipPath[dom] = clipPathEl;\n } // Build path and add to \n\n\n var svgProxy = this.getSvgProxy(clipPath);\n\n if (clipPath.transform && clipPath.parent.invTransform && !isText) {\n /**\n * If a clipPath has a parent with transform, the transform\n * of parent should not be considered when setting transform\n * of clipPath. So we need to transform back from parent's\n * transform, which is done by multiplying parent's inverse\n * transform.\n */\n // Store old transform\n var transform = Array.prototype.slice.call(clipPath.transform); // Transform back from parent, and brush path\n\n matrix.mul(clipPath.transform, clipPath.parent.invTransform, clipPath.transform);\n svgProxy.brush(clipPath); // Set back transform of clipPath\n\n clipPath.transform = transform;\n } else {\n svgProxy.brush(clipPath);\n }\n\n var pathEl = this.getSvgElement(clipPath);\n clipPathEl.innerHTML = '';\n /**\n * Use `cloneNode()` here to appendChild to multiple parents,\n * which may happend when Text and other shapes are using the same\n * clipPath. Since Text will create an extra clipPath DOM due to\n * different transform rules.\n */\n\n clipPathEl.appendChild(pathEl.cloneNode());\n parentEl.setAttribute('clip-path', 'url(#' + id + ')');\n\n if (clipPaths.length > 1) {\n // Make the other clipPaths recursively\n this.updateDom(clipPathEl, clipPaths.slice(1), isText);\n }\n } else {\n // No clipPath\n if (parentEl) {\n parentEl.setAttribute('clip-path', 'none');\n }\n }\n};\n/**\n * Mark a single clipPath to be used\n *\n * @param {Displayable} displayable displayable element\n */\n\n\nClippathManager.prototype.markUsed = function (displayable) {\n var that = this; // displayable.__clipPaths can only be `null`/`undefined` or an non-empty array.\n\n if (displayable.__clipPaths) {\n zrUtil.each(displayable.__clipPaths, function (clipPath) {\n if (clipPath._dom) {\n Definable.prototype.markUsed.call(that, clipPath._dom);\n }\n\n if (clipPath._textDom) {\n Definable.prototype.markUsed.call(that, clipPath._textDom);\n }\n });\n }\n};\n\nvar _default = ClippathManager;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar createListSimply = require(\"../helper/createListSimply\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\n\nvar LegendVisualProvider = require(\"../../visual/LegendVisualProvider\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar RadarSeries = SeriesModel.extend({\n type: 'series.radar',\n dependencies: ['radar'],\n // Overwrite\n init: function (option) {\n RadarSeries.superApply(this, 'init', arguments); // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n },\n getInitialData: function (option, ecModel) {\n return createListSimply(this, {\n generateCoord: 'indicator_',\n generateCoordCount: Infinity\n });\n },\n formatTooltip: function (dataIndex, multipleSeries, dataType, renderMode) {\n var data = this.getData();\n var coordSys = this.coordinateSystem;\n var indicatorAxes = coordSys.getIndicatorAxes();\n var name = this.getData().getName(dataIndex);\n var newLine = renderMode === 'html' ? '
' : '\\n';\n return encodeHTML(name === '' ? this.name : name) + newLine + zrUtil.map(indicatorAxes, function (axis, idx) {\n var val = data.get(data.mapDimension(axis.dim), dataIndex);\n return encodeHTML(axis.name + ' : ' + val);\n }).join(newLine);\n },\n\n /**\n * @implement\n */\n getTooltipPosition: function (dataIndex) {\n if (dataIndex != null) {\n var data = this.getData();\n var coordSys = this.coordinateSystem;\n var values = data.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex, true);\n\n for (var i = 0, len = values.length; i < len; i++) {\n if (!isNaN(values[i])) {\n var indicatorAxes = coordSys.getIndicatorAxes();\n return coordSys.coordToPoint(indicatorAxes[i].dataToCoord(values[i]), i);\n }\n }\n }\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'radar',\n legendHoverLink: true,\n radarIndex: 0,\n lineStyle: {\n width: 2,\n type: 'solid'\n },\n label: {\n position: 'top'\n },\n // areaStyle: {\n // },\n // itemStyle: {}\n symbol: 'emptyCircle',\n symbolSize: 4 // symbolRotate: null\n\n }\n});\nvar _default = RadarSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Component = require(\"../../model/Component\");\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*/\nComponent.registerSubTypeDefaulter('timeline', function () {\n // Only slider now.\n return 'slider';\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar DataZoomModel = require(\"./DataZoomModel\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = DataZoomModel.extend({\n type: 'dataZoom.inside',\n\n /**\n * @protected\n */\n defaultOption: {\n disabled: false,\n // Whether disable this inside zoom.\n zoomLock: false,\n // Whether disable zoom but only pan.\n zoomOnMouseWheel: true,\n // Can be: true / false / 'shift' / 'ctrl' / 'alt'.\n moveOnMouseMove: true,\n // Can be: true / false / 'shift' / 'ctrl' / 'alt'.\n moveOnMouseWheel: false,\n // Can be: true / false / 'shift' / 'ctrl' / 'alt'.\n preventDefaultMouseMove: true\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar IncrementalDisplayable = require(\"zrender/lib/graphic/IncrementalDisplayable\");\n\nvar lineContain = require(\"zrender/lib/contain/line\");\n\nvar quadraticContain = require(\"zrender/lib/contain/quadratic\");\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// TODO Batch by color\nvar LargeLineShape = graphic.extendShape({\n shape: {\n polyline: false,\n curveness: 0,\n segs: []\n },\n buildPath: function (path, shape) {\n var segs = shape.segs;\n var curveness = shape.curveness;\n\n if (shape.polyline) {\n for (var i = 0; i < segs.length;) {\n var count = segs[i++];\n\n if (count > 0) {\n path.moveTo(segs[i++], segs[i++]);\n\n for (var k = 1; k < count; k++) {\n path.lineTo(segs[i++], segs[i++]);\n }\n }\n }\n } else {\n for (var i = 0; i < segs.length;) {\n var x0 = segs[i++];\n var y0 = segs[i++];\n var x1 = segs[i++];\n var y1 = segs[i++];\n path.moveTo(x0, y0);\n\n if (curveness > 0) {\n var x2 = (x0 + x1) / 2 - (y0 - y1) * curveness;\n var y2 = (y0 + y1) / 2 - (x1 - x0) * curveness;\n path.quadraticCurveTo(x2, y2, x1, y1);\n } else {\n path.lineTo(x1, y1);\n }\n }\n }\n },\n findDataIndex: function (x, y) {\n var shape = this.shape;\n var segs = shape.segs;\n var curveness = shape.curveness;\n\n if (shape.polyline) {\n var dataIndex = 0;\n\n for (var i = 0; i < segs.length;) {\n var count = segs[i++];\n\n if (count > 0) {\n var x0 = segs[i++];\n var y0 = segs[i++];\n\n for (var k = 1; k < count; k++) {\n var x1 = segs[i++];\n var y1 = segs[i++];\n\n if (lineContain.containStroke(x0, y0, x1, y1)) {\n return dataIndex;\n }\n }\n }\n\n dataIndex++;\n }\n } else {\n var dataIndex = 0;\n\n for (var i = 0; i < segs.length;) {\n var x0 = segs[i++];\n var y0 = segs[i++];\n var x1 = segs[i++];\n var y1 = segs[i++];\n\n if (curveness > 0) {\n var x2 = (x0 + x1) / 2 - (y0 - y1) * curveness;\n var y2 = (y0 + y1) / 2 - (x1 - x0) * curveness;\n\n if (quadraticContain.containStroke(x0, y0, x2, y2, x1, y1)) {\n return dataIndex;\n }\n } else {\n if (lineContain.containStroke(x0, y0, x1, y1)) {\n return dataIndex;\n }\n }\n\n dataIndex++;\n }\n }\n\n return -1;\n }\n});\n\nfunction LargeLineDraw() {\n this.group = new graphic.Group();\n}\n\nvar largeLineProto = LargeLineDraw.prototype;\n\nlargeLineProto.isPersistent = function () {\n return !this._incremental;\n};\n/**\n * Update symbols draw by new data\n * @param {module:echarts/data/List} data\n */\n\n\nlargeLineProto.updateData = function (data) {\n this.group.removeAll();\n var lineEl = new LargeLineShape({\n rectHover: true,\n cursor: 'default'\n });\n lineEl.setShape({\n segs: data.getLayout('linesPoints')\n });\n\n this._setCommon(lineEl, data); // Add back\n\n\n this.group.add(lineEl);\n this._incremental = null;\n};\n/**\n * @override\n */\n\n\nlargeLineProto.incrementalPrepareUpdate = function (data) {\n this.group.removeAll();\n\n this._clearIncremental();\n\n if (data.count() > 5e5) {\n if (!this._incremental) {\n this._incremental = new IncrementalDisplayable({\n silent: true\n });\n }\n\n this.group.add(this._incremental);\n } else {\n this._incremental = null;\n }\n};\n/**\n * @override\n */\n\n\nlargeLineProto.incrementalUpdate = function (taskParams, data) {\n var lineEl = new LargeLineShape();\n lineEl.setShape({\n segs: data.getLayout('linesPoints')\n });\n\n this._setCommon(lineEl, data, !!this._incremental);\n\n if (!this._incremental) {\n lineEl.rectHover = true;\n lineEl.cursor = 'default';\n lineEl.__startIndex = taskParams.start;\n this.group.add(lineEl);\n } else {\n this._incremental.addDisplayable(lineEl, true);\n }\n};\n/**\n * @override\n */\n\n\nlargeLineProto.remove = function () {\n this._clearIncremental();\n\n this._incremental = null;\n this.group.removeAll();\n};\n\nlargeLineProto._setCommon = function (lineEl, data, isIncremental) {\n var hostModel = data.hostModel;\n lineEl.setShape({\n polyline: hostModel.get('polyline'),\n curveness: hostModel.get('lineStyle.curveness')\n });\n lineEl.useStyle(hostModel.getModel('lineStyle').getLineStyle());\n lineEl.style.strokeNoScale = true;\n var visualColor = data.getVisual('color');\n\n if (visualColor) {\n lineEl.setStyle('stroke', visualColor);\n }\n\n lineEl.setStyle('fill');\n\n if (!isIncremental) {\n // Enable tooltip\n // PENDING May have performance issue when path is extremely large\n lineEl.seriesIndex = hostModel.seriesIndex;\n lineEl.on('mousemove', function (e) {\n lineEl.dataIndex = null;\n var dataIndex = lineEl.findDataIndex(e.offsetX, e.offsetY);\n\n if (dataIndex > 0) {\n // Provide dataIndex for tooltip\n lineEl.dataIndex = dataIndex + lineEl.__startIndex;\n }\n });\n }\n};\n\nlargeLineProto._clearIncremental = function () {\n var incremental = this._incremental;\n\n if (incremental) {\n incremental.clearDisplaybles();\n }\n};\n\nvar _default = LargeLineDraw;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./funnel/FunnelSeries\");\n\nrequire(\"./funnel/FunnelView\");\n\nvar dataColor = require(\"../visual/dataColor\");\n\nvar funnelLayout = require(\"./funnel/funnelLayout\");\n\nvar dataFilter = require(\"../processor/dataFilter\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerVisual(dataColor('funnel'));\necharts.registerLayout(funnelLayout);\necharts.registerProcessor(dataFilter('funnel'));","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar ATTR = '\\0_ec_interaction_mutex';\n\nfunction take(zr, resourceKey, userKey) {\n var store = getStore(zr);\n store[resourceKey] = userKey;\n}\n\nfunction release(zr, resourceKey, userKey) {\n var store = getStore(zr);\n var uKey = store[resourceKey];\n\n if (uKey === userKey) {\n store[resourceKey] = null;\n }\n}\n\nfunction isTaken(zr, resourceKey) {\n return !!getStore(zr)[resourceKey];\n}\n\nfunction getStore(zr) {\n return zr[ATTR] || (zr[ATTR] = {});\n}\n/**\n * payload: {\n * type: 'takeGlobalCursor',\n * key: 'dataZoomSelect', or 'brush', or ...,\n * If no userKey, release global cursor.\n * }\n */\n\n\necharts.registerAction({\n type: 'takeGlobalCursor',\n event: 'globalCursorTaken',\n update: 'update'\n}, function () {});\nexports.take = take;\nexports.release = release;\nexports.isTaken = isTaken;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar MapDraw = require(\"../../component/helper/MapDraw\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar HIGH_DOWN_PROP = '__seriesMapHighDown';\nvar RECORD_VERSION_PROP = '__seriesMapCallKey';\n\nvar _default = echarts.extendChartView({\n type: 'map',\n render: function (mapModel, ecModel, api, payload) {\n // Not render if it is an toggleSelect action from self\n if (payload && payload.type === 'mapToggleSelect' && payload.from === this.uid) {\n return;\n }\n\n var group = this.group;\n group.removeAll();\n\n if (mapModel.getHostGeoModel()) {\n return;\n } // Not update map if it is an roam action from self\n\n\n if (!(payload && payload.type === 'geoRoam' && payload.componentType === 'series' && payload.seriesId === mapModel.id)) {\n if (mapModel.needsDrawMap) {\n var mapDraw = this._mapDraw || new MapDraw(api, true);\n group.add(mapDraw.group);\n mapDraw.draw(mapModel, ecModel, api, this, payload);\n this._mapDraw = mapDraw;\n } else {\n // Remove drawed map\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n }\n } else {\n var mapDraw = this._mapDraw;\n mapDraw && group.add(mapDraw.group);\n }\n\n mapModel.get('showLegendSymbol') && ecModel.getComponent('legend') && this._renderSymbols(mapModel, ecModel, api);\n },\n remove: function () {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n this.group.removeAll();\n },\n dispose: function () {\n this._mapDraw && this._mapDraw.remove();\n this._mapDraw = null;\n },\n _renderSymbols: function (mapModel, ecModel, api) {\n var originalData = mapModel.originalData;\n var group = this.group;\n originalData.each(originalData.mapDimension('value'), function (value, originalDataIndex) {\n if (isNaN(value)) {\n return;\n }\n\n var layout = originalData.getItemLayout(originalDataIndex);\n\n if (!layout || !layout.point) {\n // Not exists in map\n return;\n }\n\n var point = layout.point;\n var offset = layout.offset;\n var circle = new graphic.Circle({\n style: {\n // Because the special of map draw.\n // Which needs statistic of multiple series and draw on one map.\n // And each series also need a symbol with legend color\n //\n // Layout and visual are put one the different data\n fill: mapModel.getData().getVisual('color')\n },\n shape: {\n cx: point[0] + offset * 9,\n cy: point[1],\n r: 3\n },\n silent: true,\n // Do not overlap the first series, on which labels are displayed.\n z2: 8 + (!offset ? graphic.Z2_EMPHASIS_LIFT + 1 : 0)\n }); // Only the series that has the first value on the same region is in charge of rendering the label.\n // But consider the case:\n // series: [\n // {id: 'X', type: 'map', map: 'm', {data: [{name: 'A', value: 11}, {name: 'B', {value: 22}]},\n // {id: 'Y', type: 'map', map: 'm', {data: [{name: 'A', value: 21}, {name: 'C', {value: 33}]}\n // ]\n // The offset `0` of item `A` is at series `X`, but of item `C` is at series `Y`.\n // For backward compatibility, we follow the rule that render label `A` by the\n // settings on series `X` but render label `C` by the settings on series `Y`.\n\n if (!offset) {\n var fullData = mapModel.mainSeries.getData();\n var name = originalData.getName(originalDataIndex);\n var fullIndex = fullData.indexOfName(name);\n var itemModel = originalData.getItemModel(originalDataIndex);\n var labelModel = itemModel.getModel('label');\n var hoverLabelModel = itemModel.getModel('emphasis.label');\n var regionGroup = fullData.getItemGraphicEl(fullIndex); // `getFormattedLabel` needs to use `getData` inside. Here\n // `mapModel.getData()` is shallow cloned from `mainSeries.getData()`.\n // FIXME\n // If this is not the `mainSeries`, the item model (like label formatter)\n // set on original data item will never get. But it has been working\n // like that from the begining, and this scenario is rarely encountered.\n // So it won't be fixed until have to.\n\n var normalText = zrUtil.retrieve2(mapModel.getFormattedLabel(fullIndex, 'normal'), name);\n var emphasisText = zrUtil.retrieve2(mapModel.getFormattedLabel(fullIndex, 'emphasis'), normalText);\n var highDownRecord = regionGroup[HIGH_DOWN_PROP];\n var recordVersion = Math.random(); // Prevent from register listeners duplicatedly when roaming.\n\n if (!highDownRecord) {\n highDownRecord = regionGroup[HIGH_DOWN_PROP] = {};\n var onEmphasis = zrUtil.curry(onRegionHighDown, true);\n var onNormal = zrUtil.curry(onRegionHighDown, false);\n regionGroup.on('mouseover', onEmphasis).on('mouseout', onNormal).on('emphasis', onEmphasis).on('normal', onNormal);\n } // Prevent removed regions effect current grapics.\n\n\n regionGroup[RECORD_VERSION_PROP] = recordVersion;\n zrUtil.extend(highDownRecord, {\n recordVersion: recordVersion,\n circle: circle,\n labelModel: labelModel,\n hoverLabelModel: hoverLabelModel,\n emphasisText: emphasisText,\n normalText: normalText\n }); // FIXME\n // Consider set option when emphasis.\n\n enterRegionHighDown(highDownRecord, false);\n }\n\n group.add(circle);\n });\n }\n});\n\nfunction onRegionHighDown(toHighOrDown) {\n var highDownRecord = this[HIGH_DOWN_PROP];\n\n if (highDownRecord && highDownRecord.recordVersion === this[RECORD_VERSION_PROP]) {\n enterRegionHighDown(highDownRecord, toHighOrDown);\n }\n}\n\nfunction enterRegionHighDown(highDownRecord, toHighOrDown) {\n var circle = highDownRecord.circle;\n var labelModel = highDownRecord.labelModel;\n var hoverLabelModel = highDownRecord.hoverLabelModel;\n var emphasisText = highDownRecord.emphasisText;\n var normalText = highDownRecord.normalText;\n\n if (toHighOrDown) {\n circle.style.extendFrom(graphic.setTextStyle({}, hoverLabelModel, {\n text: hoverLabelModel.get('show') ? emphasisText : null\n }, {\n isRectText: true,\n useInsideStyle: false\n }, true)); // Make label upper than others if overlaps.\n\n circle.__mapOriginalZ2 = circle.z2;\n circle.z2 += graphic.Z2_EMPHASIS_LIFT;\n } else {\n graphic.setTextStyle(circle.style, labelModel, {\n text: labelModel.get('show') ? normalText : null,\n textPosition: labelModel.getShallow('position') || 'bottom'\n }, {\n isRectText: true,\n useInsideStyle: false\n }); // Trigger normalize style like padding.\n\n circle.dirty(false);\n\n if (circle.__mapOriginalZ2 != null) {\n circle.z2 = circle.__mapOriginalZ2;\n circle.__mapOriginalZ2 = null;\n }\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar PointerPath = require(\"./PointerPath\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar ChartView = require(\"../../view/Chart\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\nvar round = _number.round;\nvar linearMap = _number.linearMap;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction parsePosition(seriesModel, api) {\n var center = seriesModel.get('center');\n var width = api.getWidth();\n var height = api.getHeight();\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], api.getWidth());\n var cy = parsePercent(center[1], api.getHeight());\n var r = parsePercent(seriesModel.get('radius'), size / 2);\n return {\n cx: cx,\n cy: cy,\n r: r\n };\n}\n\nfunction formatLabel(label, labelFormatter) {\n if (labelFormatter) {\n if (typeof labelFormatter === 'string') {\n label = labelFormatter.replace('{value}', label != null ? label : '');\n } else if (typeof labelFormatter === 'function') {\n label = labelFormatter(label);\n }\n }\n\n return label;\n}\n\nvar PI2 = Math.PI * 2;\nvar GaugeView = ChartView.extend({\n type: 'gauge',\n render: function (seriesModel, ecModel, api) {\n this.group.removeAll();\n var colorList = seriesModel.get('axisLine.lineStyle.color');\n var posInfo = parsePosition(seriesModel, api);\n\n this._renderMain(seriesModel, ecModel, api, colorList, posInfo);\n },\n dispose: function () {},\n _renderMain: function (seriesModel, ecModel, api, colorList, posInfo) {\n var group = this.group;\n var axisLineModel = seriesModel.getModel('axisLine');\n var lineStyleModel = axisLineModel.getModel('lineStyle');\n var clockwise = seriesModel.get('clockwise');\n var startAngle = -seriesModel.get('startAngle') / 180 * Math.PI;\n var endAngle = -seriesModel.get('endAngle') / 180 * Math.PI;\n var angleRangeSpan = (endAngle - startAngle) % PI2;\n var prevEndAngle = startAngle;\n var axisLineWidth = lineStyleModel.get('width');\n var showAxis = axisLineModel.get('show');\n\n for (var i = 0; showAxis && i < colorList.length; i++) {\n // Clamp\n var percent = Math.min(Math.max(colorList[i][0], 0), 1);\n var endAngle = startAngle + angleRangeSpan * percent;\n var sector = new graphic.Sector({\n shape: {\n startAngle: prevEndAngle,\n endAngle: endAngle,\n cx: posInfo.cx,\n cy: posInfo.cy,\n clockwise: clockwise,\n r0: posInfo.r - axisLineWidth,\n r: posInfo.r\n },\n silent: true\n });\n sector.setStyle({\n fill: colorList[i][1]\n });\n sector.setStyle(lineStyleModel.getLineStyle( // Because we use sector to simulate arc\n // so the properties for stroking are useless\n ['color', 'borderWidth', 'borderColor']));\n group.add(sector);\n prevEndAngle = endAngle;\n }\n\n var getColor = function (percent) {\n // Less than 0\n if (percent <= 0) {\n return colorList[0][1];\n }\n\n for (var i = 0; i < colorList.length; i++) {\n if (colorList[i][0] >= percent && (i === 0 ? 0 : colorList[i - 1][0]) < percent) {\n return colorList[i][1];\n }\n } // More than 1\n\n\n return colorList[i - 1][1];\n };\n\n if (!clockwise) {\n var tmp = startAngle;\n startAngle = endAngle;\n endAngle = tmp;\n }\n\n this._renderTicks(seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise);\n\n this._renderPointer(seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise);\n\n this._renderTitle(seriesModel, ecModel, api, getColor, posInfo);\n\n this._renderDetail(seriesModel, ecModel, api, getColor, posInfo);\n },\n _renderTicks: function (seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise) {\n var group = this.group;\n var cx = posInfo.cx;\n var cy = posInfo.cy;\n var r = posInfo.r;\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n var splitLineModel = seriesModel.getModel('splitLine');\n var tickModel = seriesModel.getModel('axisTick');\n var labelModel = seriesModel.getModel('axisLabel');\n var splitNumber = seriesModel.get('splitNumber');\n var subSplitNumber = tickModel.get('splitNumber');\n var splitLineLen = parsePercent(splitLineModel.get('length'), r);\n var tickLen = parsePercent(tickModel.get('length'), r);\n var angle = startAngle;\n var step = (endAngle - startAngle) / splitNumber;\n var subStep = step / subSplitNumber;\n var splitLineStyle = splitLineModel.getModel('lineStyle').getLineStyle();\n var tickLineStyle = tickModel.getModel('lineStyle').getLineStyle();\n\n for (var i = 0; i <= splitNumber; i++) {\n var unitX = Math.cos(angle);\n var unitY = Math.sin(angle); // Split line\n\n if (splitLineModel.get('show')) {\n var splitLine = new graphic.Line({\n shape: {\n x1: unitX * r + cx,\n y1: unitY * r + cy,\n x2: unitX * (r - splitLineLen) + cx,\n y2: unitY * (r - splitLineLen) + cy\n },\n style: splitLineStyle,\n silent: true\n });\n\n if (splitLineStyle.stroke === 'auto') {\n splitLine.setStyle({\n stroke: getColor(i / splitNumber)\n });\n }\n\n group.add(splitLine);\n } // Label\n\n\n if (labelModel.get('show')) {\n var label = formatLabel(round(i / splitNumber * (maxVal - minVal) + minVal), labelModel.get('formatter'));\n var distance = labelModel.get('distance');\n var autoColor = getColor(i / splitNumber);\n group.add(new graphic.Text({\n style: graphic.setTextStyle({}, labelModel, {\n text: label,\n x: unitX * (r - splitLineLen - distance) + cx,\n y: unitY * (r - splitLineLen - distance) + cy,\n textVerticalAlign: unitY < -0.4 ? 'top' : unitY > 0.4 ? 'bottom' : 'middle',\n textAlign: unitX < -0.4 ? 'left' : unitX > 0.4 ? 'right' : 'center'\n }, {\n autoColor: autoColor\n }),\n silent: true\n }));\n } // Axis tick\n\n\n if (tickModel.get('show') && i !== splitNumber) {\n for (var j = 0; j <= subSplitNumber; j++) {\n var unitX = Math.cos(angle);\n var unitY = Math.sin(angle);\n var tickLine = new graphic.Line({\n shape: {\n x1: unitX * r + cx,\n y1: unitY * r + cy,\n x2: unitX * (r - tickLen) + cx,\n y2: unitY * (r - tickLen) + cy\n },\n silent: true,\n style: tickLineStyle\n });\n\n if (tickLineStyle.stroke === 'auto') {\n tickLine.setStyle({\n stroke: getColor((i + j / subSplitNumber) / splitNumber)\n });\n }\n\n group.add(tickLine);\n angle += subStep;\n }\n\n angle -= subStep;\n } else {\n angle += step;\n }\n }\n },\n _renderPointer: function (seriesModel, ecModel, api, getColor, posInfo, startAngle, endAngle, clockwise) {\n var group = this.group;\n var oldData = this._data;\n\n if (!seriesModel.get('pointer.show')) {\n // Remove old element\n oldData && oldData.eachItemGraphicEl(function (el) {\n group.remove(el);\n });\n return;\n }\n\n var valueExtent = [+seriesModel.get('min'), +seriesModel.get('max')];\n var angleExtent = [startAngle, endAngle];\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n data.diff(oldData).add(function (idx) {\n var pointer = new PointerPath({\n shape: {\n angle: startAngle\n }\n });\n graphic.initProps(pointer, {\n shape: {\n angle: linearMap(data.get(valueDim, idx), valueExtent, angleExtent, true)\n }\n }, seriesModel);\n group.add(pointer);\n data.setItemGraphicEl(idx, pointer);\n }).update(function (newIdx, oldIdx) {\n var pointer = oldData.getItemGraphicEl(oldIdx);\n graphic.updateProps(pointer, {\n shape: {\n angle: linearMap(data.get(valueDim, newIdx), valueExtent, angleExtent, true)\n }\n }, seriesModel);\n group.add(pointer);\n data.setItemGraphicEl(newIdx, pointer);\n }).remove(function (idx) {\n var pointer = oldData.getItemGraphicEl(idx);\n group.remove(pointer);\n }).execute();\n data.eachItemGraphicEl(function (pointer, idx) {\n var itemModel = data.getItemModel(idx);\n var pointerModel = itemModel.getModel('pointer');\n pointer.setShape({\n x: posInfo.cx,\n y: posInfo.cy,\n width: parsePercent(pointerModel.get('width'), posInfo.r),\n r: parsePercent(pointerModel.get('length'), posInfo.r)\n });\n pointer.useStyle(itemModel.getModel('itemStyle').getItemStyle());\n\n if (pointer.style.fill === 'auto') {\n pointer.setStyle('fill', getColor(linearMap(data.get(valueDim, idx), valueExtent, [0, 1], true)));\n }\n\n graphic.setHoverStyle(pointer, itemModel.getModel('emphasis.itemStyle').getItemStyle());\n });\n this._data = data;\n },\n _renderTitle: function (seriesModel, ecModel, api, getColor, posInfo) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var titleModel = seriesModel.getModel('title');\n\n if (titleModel.get('show')) {\n var offsetCenter = titleModel.get('offsetCenter');\n var x = posInfo.cx + parsePercent(offsetCenter[0], posInfo.r);\n var y = posInfo.cy + parsePercent(offsetCenter[1], posInfo.r);\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n var value = seriesModel.getData().get(valueDim, 0);\n var autoColor = getColor(linearMap(value, [minVal, maxVal], [0, 1], true));\n this.group.add(new graphic.Text({\n silent: true,\n style: graphic.setTextStyle({}, titleModel, {\n x: x,\n y: y,\n // FIXME First data name ?\n text: data.getName(0),\n textAlign: 'center',\n textVerticalAlign: 'middle'\n }, {\n autoColor: autoColor,\n forceRich: true\n })\n }));\n }\n },\n _renderDetail: function (seriesModel, ecModel, api, getColor, posInfo) {\n var detailModel = seriesModel.getModel('detail');\n var minVal = +seriesModel.get('min');\n var maxVal = +seriesModel.get('max');\n\n if (detailModel.get('show')) {\n var offsetCenter = detailModel.get('offsetCenter');\n var x = posInfo.cx + parsePercent(offsetCenter[0], posInfo.r);\n var y = posInfo.cy + parsePercent(offsetCenter[1], posInfo.r);\n var width = parsePercent(detailModel.get('width'), posInfo.r);\n var height = parsePercent(detailModel.get('height'), posInfo.r);\n var data = seriesModel.getData();\n var value = data.get(data.mapDimension('value'), 0);\n var autoColor = getColor(linearMap(value, [minVal, maxVal], [0, 1], true));\n this.group.add(new graphic.Text({\n silent: true,\n style: graphic.setTextStyle({}, detailModel, {\n x: x,\n y: y,\n text: formatLabel( // FIXME First data name ?\n value, detailModel.get('formatter')),\n textWidth: isNaN(width) ? null : width,\n textHeight: isNaN(height) ? null : height,\n textAlign: 'center',\n textVerticalAlign: 'middle'\n }, {\n autoColor: autoColor,\n forceRich: true\n })\n }));\n }\n }\n});\nvar _default = GaugeView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./lines/LinesSeries\");\n\nrequire(\"./lines/LinesView\");\n\nvar linesLayout = require(\"./lines/linesLayout\");\n\nvar linesVisual = require(\"./lines/linesVisual\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerLayout(linesLayout);\necharts.registerVisual(linesVisual);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Fix for 钓鱼岛\n// var Region = require('../Region');\n// var zrUtil = require('zrender/src/core/util');\n// var geoCoord = [126, 25];\nvar points = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];\n\nfunction _default(mapType, region) {\n if (mapType === 'china' && region.name === '台湾') {\n region.geometries.push({\n type: 'polygon',\n exterior: points[0]\n });\n }\n}\n\nmodule.exports = _default;","var env = require(\"../core/env\");\n\nvar _vector = require(\"../core/vector\");\n\nvar applyTransform = _vector.applyTransform;\n\nvar BoundingRect = require(\"../core/BoundingRect\");\n\nvar colorTool = require(\"../tool/color\");\n\nvar textContain = require(\"../contain/text\");\n\nvar textHelper = require(\"../graphic/helper/text\");\n\nvar RectText = require(\"../graphic/mixin/RectText\");\n\nvar Displayable = require(\"../graphic/Displayable\");\n\nvar ZImage = require(\"../graphic/Image\");\n\nvar Text = require(\"../graphic/Text\");\n\nvar Path = require(\"../graphic/Path\");\n\nvar PathProxy = require(\"../core/PathProxy\");\n\nvar Gradient = require(\"../graphic/Gradient\");\n\nvar vmlCore = require(\"./core\");\n\n// http://www.w3.org/TR/NOTE-VML\n// TODO Use proxy like svg instead of overwrite brush methods\nvar CMD = PathProxy.CMD;\nvar round = Math.round;\nvar sqrt = Math.sqrt;\nvar abs = Math.abs;\nvar cos = Math.cos;\nvar sin = Math.sin;\nvar mathMax = Math.max;\n\nif (!env.canvasSupported) {\n var comma = ',';\n var imageTransformPrefix = 'progid:DXImageTransform.Microsoft';\n var Z = 21600;\n var Z2 = Z / 2;\n var ZLEVEL_BASE = 100000;\n var Z_BASE = 1000;\n\n var initRootElStyle = function (el) {\n el.style.cssText = 'position:absolute;left:0;top:0;width:1px;height:1px;';\n el.coordsize = Z + ',' + Z;\n el.coordorigin = '0,0';\n };\n\n var encodeHtmlAttribute = function (s) {\n return String(s).replace(/&/g, '&').replace(/\"/g, '"');\n };\n\n var rgb2Str = function (r, g, b) {\n return 'rgb(' + [r, g, b].join(',') + ')';\n };\n\n var append = function (parent, child) {\n if (child && parent && child.parentNode !== parent) {\n parent.appendChild(child);\n }\n };\n\n var remove = function (parent, child) {\n if (child && parent && child.parentNode === parent) {\n parent.removeChild(child);\n }\n };\n\n var getZIndex = function (zlevel, z, z2) {\n // z 的取值范围为 [0, 1000]\n return (parseFloat(zlevel) || 0) * ZLEVEL_BASE + (parseFloat(z) || 0) * Z_BASE + z2;\n };\n\n var parsePercent = textHelper.parsePercent;\n /***************************************************\n * PATH\n **************************************************/\n\n var setColorAndOpacity = function (el, color, opacity) {\n var colorArr = colorTool.parse(color);\n opacity = +opacity;\n\n if (isNaN(opacity)) {\n opacity = 1;\n }\n\n if (colorArr) {\n el.color = rgb2Str(colorArr[0], colorArr[1], colorArr[2]);\n el.opacity = opacity * colorArr[3];\n }\n };\n\n var getColorAndAlpha = function (color) {\n var colorArr = colorTool.parse(color);\n return [rgb2Str(colorArr[0], colorArr[1], colorArr[2]), colorArr[3]];\n };\n\n var updateFillNode = function (el, style, zrEl) {\n // TODO pattern\n var fill = style.fill;\n\n if (fill != null) {\n // Modified from excanvas\n if (fill instanceof Gradient) {\n var gradientType;\n var angle = 0;\n var focus = [0, 0]; // additional offset\n\n var shift = 0; // scale factor for offset\n\n var expansion = 1;\n var rect = zrEl.getBoundingRect();\n var rectWidth = rect.width;\n var rectHeight = rect.height;\n\n if (fill.type === 'linear') {\n gradientType = 'gradient';\n var transform = zrEl.transform;\n var p0 = [fill.x * rectWidth, fill.y * rectHeight];\n var p1 = [fill.x2 * rectWidth, fill.y2 * rectHeight];\n\n if (transform) {\n applyTransform(p0, p0, transform);\n applyTransform(p1, p1, transform);\n }\n\n var dx = p1[0] - p0[0];\n var dy = p1[1] - p0[1];\n angle = Math.atan2(dx, dy) * 180 / Math.PI; // The angle should be a non-negative number.\n\n if (angle < 0) {\n angle += 360;\n } // Very small angles produce an unexpected result because they are\n // converted to a scientific notation string.\n\n\n if (angle < 1e-6) {\n angle = 0;\n }\n } else {\n gradientType = 'gradientradial';\n var p0 = [fill.x * rectWidth, fill.y * rectHeight];\n var transform = zrEl.transform;\n var scale = zrEl.scale;\n var width = rectWidth;\n var height = rectHeight;\n focus = [// Percent in bounding rect\n (p0[0] - rect.x) / width, (p0[1] - rect.y) / height];\n\n if (transform) {\n applyTransform(p0, p0, transform);\n }\n\n width /= scale[0] * Z;\n height /= scale[1] * Z;\n var dimension = mathMax(width, height);\n shift = 2 * 0 / dimension;\n expansion = 2 * fill.r / dimension - shift;\n } // We need to sort the color stops in ascending order by offset,\n // otherwise IE won't interpret it correctly.\n\n\n var stops = fill.colorStops.slice();\n stops.sort(function (cs1, cs2) {\n return cs1.offset - cs2.offset;\n });\n var length = stops.length; // Color and alpha list of first and last stop\n\n var colorAndAlphaList = [];\n var colors = [];\n\n for (var i = 0; i < length; i++) {\n var stop = stops[i];\n var colorAndAlpha = getColorAndAlpha(stop.color);\n colors.push(stop.offset * expansion + shift + ' ' + colorAndAlpha[0]);\n\n if (i === 0 || i === length - 1) {\n colorAndAlphaList.push(colorAndAlpha);\n }\n }\n\n if (length >= 2) {\n var color1 = colorAndAlphaList[0][0];\n var color2 = colorAndAlphaList[1][0];\n var opacity1 = colorAndAlphaList[0][1] * style.opacity;\n var opacity2 = colorAndAlphaList[1][1] * style.opacity;\n el.type = gradientType;\n el.method = 'none';\n el.focus = '100%';\n el.angle = angle;\n el.color = color1;\n el.color2 = color2;\n el.colors = colors.join(','); // When colors attribute is used, the meanings of opacity and o:opacity2\n // are reversed.\n\n el.opacity = opacity2; // FIXME g_o_:opacity ?\n\n el.opacity2 = opacity1;\n }\n\n if (gradientType === 'radial') {\n el.focusposition = focus.join(',');\n }\n } else {\n // FIXME Change from Gradient fill to color fill\n setColorAndOpacity(el, fill, style.opacity);\n }\n }\n };\n\n var updateStrokeNode = function (el, style) {\n // if (style.lineJoin != null) {\n // el.joinstyle = style.lineJoin;\n // }\n // if (style.miterLimit != null) {\n // el.miterlimit = style.miterLimit * Z;\n // }\n // if (style.lineCap != null) {\n // el.endcap = style.lineCap;\n // }\n if (style.lineDash) {\n el.dashstyle = style.lineDash.join(' ');\n }\n\n if (style.stroke != null && !(style.stroke instanceof Gradient)) {\n setColorAndOpacity(el, style.stroke, style.opacity);\n }\n };\n\n var updateFillAndStroke = function (vmlEl, type, style, zrEl) {\n var isFill = type === 'fill';\n var el = vmlEl.getElementsByTagName(type)[0]; // Stroke must have lineWidth\n\n if (style[type] != null && style[type] !== 'none' && (isFill || !isFill && style.lineWidth)) {\n vmlEl[isFill ? 'filled' : 'stroked'] = 'true'; // FIXME Remove before updating, or set `colors` will throw error\n\n if (style[type] instanceof Gradient) {\n remove(vmlEl, el);\n }\n\n if (!el) {\n el = vmlCore.createNode(type);\n }\n\n isFill ? updateFillNode(el, style, zrEl) : updateStrokeNode(el, style);\n append(vmlEl, el);\n } else {\n vmlEl[isFill ? 'filled' : 'stroked'] = 'false';\n remove(vmlEl, el);\n }\n };\n\n var points = [[], [], []];\n\n var pathDataToString = function (path, m) {\n var M = CMD.M;\n var C = CMD.C;\n var L = CMD.L;\n var A = CMD.A;\n var Q = CMD.Q;\n var str = [];\n var nPoint;\n var cmdStr;\n var cmd;\n var i;\n var xi;\n var yi;\n var data = path.data;\n var dataLength = path.len();\n\n for (i = 0; i < dataLength;) {\n cmd = data[i++];\n cmdStr = '';\n nPoint = 0;\n\n switch (cmd) {\n case M:\n cmdStr = ' m ';\n nPoint = 1;\n xi = data[i++];\n yi = data[i++];\n points[0][0] = xi;\n points[0][1] = yi;\n break;\n\n case L:\n cmdStr = ' l ';\n nPoint = 1;\n xi = data[i++];\n yi = data[i++];\n points[0][0] = xi;\n points[0][1] = yi;\n break;\n\n case Q:\n case C:\n cmdStr = ' c ';\n nPoint = 3;\n var x1 = data[i++];\n var y1 = data[i++];\n var x2 = data[i++];\n var y2 = data[i++];\n var x3;\n var y3;\n\n if (cmd === Q) {\n // Convert quadratic to cubic using degree elevation\n x3 = x2;\n y3 = y2;\n x2 = (x2 + 2 * x1) / 3;\n y2 = (y2 + 2 * y1) / 3;\n x1 = (xi + 2 * x1) / 3;\n y1 = (yi + 2 * y1) / 3;\n } else {\n x3 = data[i++];\n y3 = data[i++];\n }\n\n points[0][0] = x1;\n points[0][1] = y1;\n points[1][0] = x2;\n points[1][1] = y2;\n points[2][0] = x3;\n points[2][1] = y3;\n xi = x3;\n yi = y3;\n break;\n\n case A:\n var x = 0;\n var y = 0;\n var sx = 1;\n var sy = 1;\n var angle = 0;\n\n if (m) {\n // Extract SRT from matrix\n x = m[4];\n y = m[5];\n sx = sqrt(m[0] * m[0] + m[1] * m[1]);\n sy = sqrt(m[2] * m[2] + m[3] * m[3]);\n angle = Math.atan2(-m[1] / sy, m[0] / sx);\n }\n\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var startAngle = data[i++] + angle;\n var endAngle = data[i++] + startAngle + angle; // FIXME\n // var psi = data[i++];\n\n i++;\n var clockwise = data[i++];\n var x0 = cx + cos(startAngle) * rx;\n var y0 = cy + sin(startAngle) * ry;\n var x1 = cx + cos(endAngle) * rx;\n var y1 = cy + sin(endAngle) * ry;\n var type = clockwise ? ' wa ' : ' at ';\n\n if (Math.abs(x0 - x1) < 1e-4) {\n // IE won't render arches drawn counter clockwise if x0 == x1.\n if (Math.abs(endAngle - startAngle) > 1e-2) {\n // Offset x0 by 1/80 of a pixel. Use something\n // that can be represented in binary\n if (clockwise) {\n x0 += 270 / Z;\n }\n } else {\n // Avoid case draw full circle\n if (Math.abs(y0 - cy) < 1e-4) {\n if (clockwise && x0 < cx || !clockwise && x0 > cx) {\n y1 -= 270 / Z;\n } else {\n y1 += 270 / Z;\n }\n } else if (clockwise && y0 < cy || !clockwise && y0 > cy) {\n x1 += 270 / Z;\n } else {\n x1 -= 270 / Z;\n }\n }\n }\n\n str.push(type, round(((cx - rx) * sx + x) * Z - Z2), comma, round(((cy - ry) * sy + y) * Z - Z2), comma, round(((cx + rx) * sx + x) * Z - Z2), comma, round(((cy + ry) * sy + y) * Z - Z2), comma, round((x0 * sx + x) * Z - Z2), comma, round((y0 * sy + y) * Z - Z2), comma, round((x1 * sx + x) * Z - Z2), comma, round((y1 * sy + y) * Z - Z2));\n xi = x1;\n yi = y1;\n break;\n\n case CMD.R:\n var p0 = points[0];\n var p1 = points[1]; // x0, y0\n\n p0[0] = data[i++];\n p0[1] = data[i++]; // x1, y1\n\n p1[0] = p0[0] + data[i++];\n p1[1] = p0[1] + data[i++];\n\n if (m) {\n applyTransform(p0, p0, m);\n applyTransform(p1, p1, m);\n }\n\n p0[0] = round(p0[0] * Z - Z2);\n p1[0] = round(p1[0] * Z - Z2);\n p0[1] = round(p0[1] * Z - Z2);\n p1[1] = round(p1[1] * Z - Z2);\n str.push( // x0, y0\n ' m ', p0[0], comma, p0[1], // x1, y0\n ' l ', p1[0], comma, p0[1], // x1, y1\n ' l ', p1[0], comma, p1[1], // x0, y1\n ' l ', p0[0], comma, p1[1]);\n break;\n\n case CMD.Z:\n // FIXME Update xi, yi\n str.push(' x ');\n }\n\n if (nPoint > 0) {\n str.push(cmdStr);\n\n for (var k = 0; k < nPoint; k++) {\n var p = points[k];\n m && applyTransform(p, p, m); // 不 round 会非常慢\n\n str.push(round(p[0] * Z - Z2), comma, round(p[1] * Z - Z2), k < nPoint - 1 ? comma : '');\n }\n }\n }\n\n return str.join('');\n }; // Rewrite the original path method\n\n\n Path.prototype.brushVML = function (vmlRoot) {\n var style = this.style;\n var vmlEl = this._vmlEl;\n\n if (!vmlEl) {\n vmlEl = vmlCore.createNode('shape');\n initRootElStyle(vmlEl);\n this._vmlEl = vmlEl;\n }\n\n updateFillAndStroke(vmlEl, 'fill', style, this);\n updateFillAndStroke(vmlEl, 'stroke', style, this);\n var m = this.transform;\n var needTransform = m != null;\n var strokeEl = vmlEl.getElementsByTagName('stroke')[0];\n\n if (strokeEl) {\n var lineWidth = style.lineWidth; // Get the line scale.\n // Determinant of this.m_ means how much the area is enlarged by the\n // transformation. So its square root can be used as a scale factor\n // for width.\n\n if (needTransform && !style.strokeNoScale) {\n var det = m[0] * m[3] - m[1] * m[2];\n lineWidth *= sqrt(abs(det));\n }\n\n strokeEl.weight = lineWidth + 'px';\n }\n\n var path = this.path || (this.path = new PathProxy());\n\n if (this.__dirtyPath) {\n path.beginPath();\n path.subPixelOptimize = false;\n this.buildPath(path, this.shape);\n path.toStatic();\n this.__dirtyPath = false;\n }\n\n vmlEl.path = pathDataToString(path, this.transform);\n vmlEl.style.zIndex = getZIndex(this.zlevel, this.z, this.z2); // Append to root\n\n append(vmlRoot, vmlEl); // Text\n\n if (style.text != null) {\n this.drawRectText(vmlRoot, this.getBoundingRect());\n } else {\n this.removeRectText(vmlRoot);\n }\n };\n\n Path.prototype.onRemove = function (vmlRoot) {\n remove(vmlRoot, this._vmlEl);\n this.removeRectText(vmlRoot);\n };\n\n Path.prototype.onAdd = function (vmlRoot) {\n append(vmlRoot, this._vmlEl);\n this.appendRectText(vmlRoot);\n };\n /***************************************************\n * IMAGE\n **************************************************/\n\n\n var isImage = function (img) {\n // FIXME img instanceof Image 如果 img 是一个字符串的时候,IE8 下会报错\n return typeof img === 'object' && img.tagName && img.tagName.toUpperCase() === 'IMG'; // return img instanceof Image;\n }; // Rewrite the original path method\n\n\n ZImage.prototype.brushVML = function (vmlRoot) {\n var style = this.style;\n var image = style.image; // Image original width, height\n\n var ow;\n var oh;\n\n if (isImage(image)) {\n var src = image.src;\n\n if (src === this._imageSrc) {\n ow = this._imageWidth;\n oh = this._imageHeight;\n } else {\n var imageRuntimeStyle = image.runtimeStyle;\n var oldRuntimeWidth = imageRuntimeStyle.width;\n var oldRuntimeHeight = imageRuntimeStyle.height;\n imageRuntimeStyle.width = 'auto';\n imageRuntimeStyle.height = 'auto'; // get the original size\n\n ow = image.width;\n oh = image.height; // and remove overides\n\n imageRuntimeStyle.width = oldRuntimeWidth;\n imageRuntimeStyle.height = oldRuntimeHeight; // Caching image original width, height and src\n\n this._imageSrc = src;\n this._imageWidth = ow;\n this._imageHeight = oh;\n }\n\n image = src;\n } else {\n if (image === this._imageSrc) {\n ow = this._imageWidth;\n oh = this._imageHeight;\n }\n }\n\n if (!image) {\n return;\n }\n\n var x = style.x || 0;\n var y = style.y || 0;\n var dw = style.width;\n var dh = style.height;\n var sw = style.sWidth;\n var sh = style.sHeight;\n var sx = style.sx || 0;\n var sy = style.sy || 0;\n var hasCrop = sw && sh;\n var vmlEl = this._vmlEl;\n\n if (!vmlEl) {\n // FIXME 使用 group 在 left, top 都不是 0 的时候就无法显示了。\n // vmlEl = vmlCore.createNode('group');\n vmlEl = vmlCore.doc.createElement('div');\n initRootElStyle(vmlEl);\n this._vmlEl = vmlEl;\n }\n\n var vmlElStyle = vmlEl.style;\n var hasRotation = false;\n var m;\n var scaleX = 1;\n var scaleY = 1;\n\n if (this.transform) {\n m = this.transform;\n scaleX = sqrt(m[0] * m[0] + m[1] * m[1]);\n scaleY = sqrt(m[2] * m[2] + m[3] * m[3]);\n hasRotation = m[1] || m[2];\n }\n\n if (hasRotation) {\n // If filters are necessary (rotation exists), create them\n // filters are bog-slow, so only create them if abbsolutely necessary\n // The following check doesn't account for skews (which don't exist\n // in the canvas spec (yet) anyway.\n // From excanvas\n var p0 = [x, y];\n var p1 = [x + dw, y];\n var p2 = [x, y + dh];\n var p3 = [x + dw, y + dh];\n applyTransform(p0, p0, m);\n applyTransform(p1, p1, m);\n applyTransform(p2, p2, m);\n applyTransform(p3, p3, m);\n var maxX = mathMax(p0[0], p1[0], p2[0], p3[0]);\n var maxY = mathMax(p0[1], p1[1], p2[1], p3[1]);\n var transformFilter = [];\n transformFilter.push('M11=', m[0] / scaleX, comma, 'M12=', m[2] / scaleY, comma, 'M21=', m[1] / scaleX, comma, 'M22=', m[3] / scaleY, comma, 'Dx=', round(x * scaleX + m[4]), comma, 'Dy=', round(y * scaleY + m[5]));\n vmlElStyle.padding = '0 ' + round(maxX) + 'px ' + round(maxY) + 'px 0'; // FIXME DXImageTransform 在 IE11 的兼容模式下不起作用\n\n vmlElStyle.filter = imageTransformPrefix + '.Matrix(' + transformFilter.join('') + ', SizingMethod=clip)';\n } else {\n if (m) {\n x = x * scaleX + m[4];\n y = y * scaleY + m[5];\n }\n\n vmlElStyle.filter = '';\n vmlElStyle.left = round(x) + 'px';\n vmlElStyle.top = round(y) + 'px';\n }\n\n var imageEl = this._imageEl;\n var cropEl = this._cropEl;\n\n if (!imageEl) {\n imageEl = vmlCore.doc.createElement('div');\n this._imageEl = imageEl;\n }\n\n var imageELStyle = imageEl.style;\n\n if (hasCrop) {\n // Needs know image original width and height\n if (!(ow && oh)) {\n var tmpImage = new Image();\n var self = this;\n\n tmpImage.onload = function () {\n tmpImage.onload = null;\n ow = tmpImage.width;\n oh = tmpImage.height; // Adjust image width and height to fit the ratio destinationSize / sourceSize\n\n imageELStyle.width = round(scaleX * ow * dw / sw) + 'px';\n imageELStyle.height = round(scaleY * oh * dh / sh) + 'px'; // Caching image original width, height and src\n\n self._imageWidth = ow;\n self._imageHeight = oh;\n self._imageSrc = image;\n };\n\n tmpImage.src = image;\n } else {\n imageELStyle.width = round(scaleX * ow * dw / sw) + 'px';\n imageELStyle.height = round(scaleY * oh * dh / sh) + 'px';\n }\n\n if (!cropEl) {\n cropEl = vmlCore.doc.createElement('div');\n cropEl.style.overflow = 'hidden';\n this._cropEl = cropEl;\n }\n\n var cropElStyle = cropEl.style;\n cropElStyle.width = round((dw + sx * dw / sw) * scaleX);\n cropElStyle.height = round((dh + sy * dh / sh) * scaleY);\n cropElStyle.filter = imageTransformPrefix + '.Matrix(Dx=' + -sx * dw / sw * scaleX + ',Dy=' + -sy * dh / sh * scaleY + ')';\n\n if (!cropEl.parentNode) {\n vmlEl.appendChild(cropEl);\n }\n\n if (imageEl.parentNode !== cropEl) {\n cropEl.appendChild(imageEl);\n }\n } else {\n imageELStyle.width = round(scaleX * dw) + 'px';\n imageELStyle.height = round(scaleY * dh) + 'px';\n vmlEl.appendChild(imageEl);\n\n if (cropEl && cropEl.parentNode) {\n vmlEl.removeChild(cropEl);\n this._cropEl = null;\n }\n }\n\n var filterStr = '';\n var alpha = style.opacity;\n\n if (alpha < 1) {\n filterStr += '.Alpha(opacity=' + round(alpha * 100) + ') ';\n }\n\n filterStr += imageTransformPrefix + '.AlphaImageLoader(src=' + image + ', SizingMethod=scale)';\n imageELStyle.filter = filterStr;\n vmlEl.style.zIndex = getZIndex(this.zlevel, this.z, this.z2); // Append to root\n\n append(vmlRoot, vmlEl); // Text\n\n if (style.text != null) {\n this.drawRectText(vmlRoot, this.getBoundingRect());\n }\n };\n\n ZImage.prototype.onRemove = function (vmlRoot) {\n remove(vmlRoot, this._vmlEl);\n this._vmlEl = null;\n this._cropEl = null;\n this._imageEl = null;\n this.removeRectText(vmlRoot);\n };\n\n ZImage.prototype.onAdd = function (vmlRoot) {\n append(vmlRoot, this._vmlEl);\n this.appendRectText(vmlRoot);\n };\n /***************************************************\n * TEXT\n **************************************************/\n\n\n var DEFAULT_STYLE_NORMAL = 'normal';\n var fontStyleCache = {};\n var fontStyleCacheCount = 0;\n var MAX_FONT_CACHE_SIZE = 100;\n var fontEl = document.createElement('div');\n\n var getFontStyle = function (fontString) {\n var fontStyle = fontStyleCache[fontString];\n\n if (!fontStyle) {\n // Clear cache\n if (fontStyleCacheCount > MAX_FONT_CACHE_SIZE) {\n fontStyleCacheCount = 0;\n fontStyleCache = {};\n }\n\n var style = fontEl.style;\n var fontFamily;\n\n try {\n style.font = fontString;\n fontFamily = style.fontFamily.split(',')[0];\n } catch (e) {}\n\n fontStyle = {\n style: style.fontStyle || DEFAULT_STYLE_NORMAL,\n variant: style.fontVariant || DEFAULT_STYLE_NORMAL,\n weight: style.fontWeight || DEFAULT_STYLE_NORMAL,\n size: parseFloat(style.fontSize || 12) | 0,\n family: fontFamily || 'Microsoft YaHei'\n };\n fontStyleCache[fontString] = fontStyle;\n fontStyleCacheCount++;\n }\n\n return fontStyle;\n };\n\n var textMeasureEl; // Overwrite measure text method\n\n textContain.$override('measureText', function (text, textFont) {\n var doc = vmlCore.doc;\n\n if (!textMeasureEl) {\n textMeasureEl = doc.createElement('div');\n textMeasureEl.style.cssText = 'position:absolute;top:-20000px;left:0;' + 'padding:0;margin:0;border:none;white-space:pre;';\n vmlCore.doc.body.appendChild(textMeasureEl);\n }\n\n try {\n textMeasureEl.style.font = textFont;\n } catch (ex) {// Ignore failures to set to invalid font.\n }\n\n textMeasureEl.innerHTML = ''; // Don't use innerHTML or innerText because they allow markup/whitespace.\n\n textMeasureEl.appendChild(doc.createTextNode(text));\n return {\n width: textMeasureEl.offsetWidth\n };\n });\n var tmpRect = new BoundingRect();\n\n var drawRectText = function (vmlRoot, rect, textRect, fromTextEl) {\n var style = this.style; // Optimize, avoid normalize every time.\n\n this.__dirty && textHelper.normalizeTextStyle(style, true);\n var text = style.text; // Convert to string\n\n text != null && (text += '');\n\n if (!text) {\n return;\n } // Convert rich text to plain text. Rich text is not supported in\n // IE8-, but tags in rich text template will be removed.\n\n\n if (style.rich) {\n var contentBlock = textContain.parseRichText(text, style);\n text = [];\n\n for (var i = 0; i < contentBlock.lines.length; i++) {\n var tokens = contentBlock.lines[i].tokens;\n var textLine = [];\n\n for (var j = 0; j < tokens.length; j++) {\n textLine.push(tokens[j].text);\n }\n\n text.push(textLine.join(''));\n }\n\n text = text.join('\\n');\n }\n\n var x;\n var y;\n var align = style.textAlign;\n var verticalAlign = style.textVerticalAlign;\n var fontStyle = getFontStyle(style.font); // FIXME encodeHtmlAttribute ?\n\n var font = fontStyle.style + ' ' + fontStyle.variant + ' ' + fontStyle.weight + ' ' + fontStyle.size + 'px \"' + fontStyle.family + '\"';\n textRect = textRect || textContain.getBoundingRect(text, font, align, verticalAlign, style.textPadding, style.textLineHeight); // Transform rect to view space\n\n var m = this.transform; // Ignore transform for text in other element\n\n if (m && !fromTextEl) {\n tmpRect.copy(rect);\n tmpRect.applyTransform(m);\n rect = tmpRect;\n }\n\n if (!fromTextEl) {\n var textPosition = style.textPosition; // Text position represented by coord\n\n if (textPosition instanceof Array) {\n x = rect.x + parsePercent(textPosition[0], rect.width);\n y = rect.y + parsePercent(textPosition[1], rect.height);\n align = align || 'left';\n } else {\n var res = this.calculateTextPosition ? this.calculateTextPosition({}, style, rect) : textContain.calculateTextPosition({}, style, rect);\n x = res.x;\n y = res.y; // Default align and baseline when has textPosition\n\n align = align || res.textAlign;\n verticalAlign = verticalAlign || res.textVerticalAlign;\n }\n } else {\n x = rect.x;\n y = rect.y;\n }\n\n x = textContain.adjustTextX(x, textRect.width, align);\n y = textContain.adjustTextY(y, textRect.height, verticalAlign); // Force baseline 'middle'\n\n y += textRect.height / 2; // var fontSize = fontStyle.size;\n // 1.75 is an arbitrary number, as there is no info about the text baseline\n // switch (baseline) {\n // case 'hanging':\n // case 'top':\n // y += fontSize / 1.75;\n // break;\n // case 'middle':\n // break;\n // default:\n // // case null:\n // // case 'alphabetic':\n // // case 'ideographic':\n // // case 'bottom':\n // y -= fontSize / 2.25;\n // break;\n // }\n // switch (align) {\n // case 'left':\n // break;\n // case 'center':\n // x -= textRect.width / 2;\n // break;\n // case 'right':\n // x -= textRect.width;\n // break;\n // case 'end':\n // align = elementStyle.direction == 'ltr' ? 'right' : 'left';\n // break;\n // case 'start':\n // align = elementStyle.direction == 'rtl' ? 'right' : 'left';\n // break;\n // default:\n // align = 'left';\n // }\n\n var createNode = vmlCore.createNode;\n var textVmlEl = this._textVmlEl;\n var pathEl;\n var textPathEl;\n var skewEl;\n\n if (!textVmlEl) {\n textVmlEl = createNode('line');\n pathEl = createNode('path');\n textPathEl = createNode('textpath');\n skewEl = createNode('skew'); // FIXME Why here is not cammel case\n // Align 'center' seems wrong\n\n textPathEl.style['v-text-align'] = 'left';\n initRootElStyle(textVmlEl);\n pathEl.textpathok = true;\n textPathEl.on = true;\n textVmlEl.from = '0 0';\n textVmlEl.to = '1000 0.05';\n append(textVmlEl, skewEl);\n append(textVmlEl, pathEl);\n append(textVmlEl, textPathEl);\n this._textVmlEl = textVmlEl;\n } else {\n // 这里是在前面 appendChild 保证顺序的前提下\n skewEl = textVmlEl.firstChild;\n pathEl = skewEl.nextSibling;\n textPathEl = pathEl.nextSibling;\n }\n\n var coords = [x, y];\n var textVmlElStyle = textVmlEl.style; // Ignore transform for text in other element\n\n if (m && fromTextEl) {\n applyTransform(coords, coords, m);\n skewEl.on = true;\n skewEl.matrix = m[0].toFixed(3) + comma + m[2].toFixed(3) + comma + m[1].toFixed(3) + comma + m[3].toFixed(3) + ',0,0'; // Text position\n\n skewEl.offset = (round(coords[0]) || 0) + ',' + (round(coords[1]) || 0); // Left top point as origin\n\n skewEl.origin = '0 0';\n textVmlElStyle.left = '0px';\n textVmlElStyle.top = '0px';\n } else {\n skewEl.on = false;\n textVmlElStyle.left = round(x) + 'px';\n textVmlElStyle.top = round(y) + 'px';\n }\n\n textPathEl.string = encodeHtmlAttribute(text); // TODO\n\n try {\n textPathEl.style.font = font;\n } // Error font format\n catch (e) {}\n\n updateFillAndStroke(textVmlEl, 'fill', {\n fill: style.textFill,\n opacity: style.opacity\n }, this);\n updateFillAndStroke(textVmlEl, 'stroke', {\n stroke: style.textStroke,\n opacity: style.opacity,\n lineDash: style.lineDash || null // style.lineDash can be `false`.\n\n }, this);\n textVmlEl.style.zIndex = getZIndex(this.zlevel, this.z, this.z2); // Attached to root\n\n append(vmlRoot, textVmlEl);\n };\n\n var removeRectText = function (vmlRoot) {\n remove(vmlRoot, this._textVmlEl);\n this._textVmlEl = null;\n };\n\n var appendRectText = function (vmlRoot) {\n append(vmlRoot, this._textVmlEl);\n };\n\n var list = [RectText, Displayable, ZImage, Path, Text]; // In case Displayable has been mixed in RectText\n\n for (var i = 0; i < list.length; i++) {\n var proto = list[i].prototype;\n proto.drawRectText = drawRectText;\n proto.removeRectText = removeRectText;\n proto.appendRectText = appendRectText;\n }\n\n Text.prototype.brushVML = function (vmlRoot) {\n var style = this.style;\n\n if (style.text != null) {\n this.drawRectText(vmlRoot, {\n x: style.x || 0,\n y: style.y || 0,\n width: 0,\n height: 0\n }, this.getBoundingRect(), true);\n } else {\n this.removeRectText(vmlRoot);\n }\n };\n\n Text.prototype.onRemove = function (vmlRoot) {\n this.removeRectText(vmlRoot);\n };\n\n Text.prototype.onAdd = function (vmlRoot) {\n this.appendRectText(vmlRoot);\n };\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar polygonContain = require(\"zrender/lib/contain/polygon\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar _graphic = require(\"../../util/graphic\");\n\nvar linePolygonIntersect = _graphic.linePolygonIntersect;\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// Key of the first level is brushType: `line`, `rect`, `polygon`.\n// Key of the second level is chart element type: `point`, `rect`.\n// See moudule:echarts/component/helper/BrushController\n// function param:\n// {Object} itemLayout fetch from data.getItemLayout(dataIndex)\n// {Object} selectors {point: selector, rect: selector, ...}\n// {Object} area {range: [[], [], ..], boudingRect}\n// function return:\n// {boolean} Whether in the given brush.\nvar selector = {\n lineX: getLineSelectors(0),\n lineY: getLineSelectors(1),\n rect: {\n point: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]);\n },\n rect: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.intersect(itemLayout);\n }\n },\n polygon: {\n point: function (itemLayout, selectors, area) {\n return itemLayout && area.boundingRect.contain(itemLayout[0], itemLayout[1]) && polygonContain.contain(area.range, itemLayout[0], itemLayout[1]);\n },\n rect: function (itemLayout, selectors, area) {\n var points = area.range;\n\n if (!itemLayout || points.length <= 1) {\n return false;\n }\n\n var x = itemLayout.x;\n var y = itemLayout.y;\n var width = itemLayout.width;\n var height = itemLayout.height;\n var p = points[0];\n\n if (polygonContain.contain(points, x, y) || polygonContain.contain(points, x + width, y) || polygonContain.contain(points, x, y + height) || polygonContain.contain(points, x + width, y + height) || BoundingRect.create(itemLayout).contain(p[0], p[1]) || linePolygonIntersect(x, y, x + width, y, points) || linePolygonIntersect(x, y, x, y + height, points) || linePolygonIntersect(x + width, y, x + width, y + height, points) || linePolygonIntersect(x, y + height, x + width, y + height, points)) {\n return true;\n }\n }\n }\n};\n\nfunction getLineSelectors(xyIndex) {\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n return {\n point: function (itemLayout, selectors, area) {\n if (itemLayout) {\n var range = area.range;\n var p = itemLayout[xyIndex];\n return inLineRange(p, range);\n }\n },\n rect: function (itemLayout, selectors, area) {\n if (itemLayout) {\n var range = area.range;\n var layoutRange = [itemLayout[xy[xyIndex]], itemLayout[xy[xyIndex]] + itemLayout[wh[xyIndex]]];\n layoutRange[1] < layoutRange[0] && layoutRange.reverse();\n return inLineRange(layoutRange[0], range) || inLineRange(layoutRange[1], range) || inLineRange(range[0], layoutRange) || inLineRange(range[1], layoutRange);\n }\n }\n };\n}\n\nfunction inLineRange(p, range) {\n return range[0] <= p && p <= range[1];\n}\n\nvar _default = selector;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar MarkerModel = require(\"./MarkerModel\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = MarkerModel.extend({\n type: 'markPoint',\n defaultOption: {\n zlevel: 0,\n z: 5,\n symbol: 'pin',\n symbolSize: 50,\n //symbolRotate: 0,\n //symbolOffset: [0, 0]\n tooltip: {\n trigger: 'item'\n },\n label: {\n show: true,\n position: 'inside'\n },\n itemStyle: {\n borderWidth: 2\n },\n emphasis: {\n label: {\n show: true\n }\n }\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = echarts.extendComponentModel({\n type: 'tooltip',\n dependencies: ['axisPointer'],\n defaultOption: {\n zlevel: 0,\n z: 60,\n show: true,\n // tooltip主体内容\n showContent: true,\n // 'trigger' only works on coordinate system.\n // 'item' | 'axis' | 'none'\n trigger: 'item',\n // 'click' | 'mousemove' | 'none'\n triggerOn: 'mousemove|click',\n alwaysShowContent: false,\n displayMode: 'single',\n // 'single' | 'multipleByCoordSys'\n renderMode: 'auto',\n // 'auto' | 'html' | 'richText'\n // 'auto': use html by default, and use non-html if `document` is not defined\n // 'html': use html for tooltip\n // 'richText': use canvas, svg, and etc. for tooltip\n // 位置 {Array} | {Function}\n // position: null\n // Consider triggered from axisPointer handle, verticalAlign should be 'middle'\n // align: null,\n // verticalAlign: null,\n // 是否约束 content 在 viewRect 中。默认 false 是为了兼容以前版本。\n confine: false,\n // 内容格式器:{string}(Template) ¦ {Function}\n // formatter: null\n showDelay: 0,\n // 隐藏延迟,单位ms\n hideDelay: 100,\n // 动画变换时间,单位s\n transitionDuration: 0.4,\n enterable: false,\n // 提示背景颜色,默认为透明度为0.7的黑色\n backgroundColor: 'rgba(50,50,50,0.7)',\n // 提示边框颜色\n borderColor: '#333',\n // 提示边框圆角,单位px,默认为4\n borderRadius: 4,\n // 提示边框线宽,单位px,默认为0(无边框)\n borderWidth: 0,\n // 提示内边距,单位px,默认各方向内边距为5,\n // 接受数组分别设定上右下左边距,同css\n padding: 5,\n // Extra css text\n extraCssText: '',\n // 坐标轴指示器,坐标轴触发有效\n axisPointer: {\n // 默认为直线\n // 可选为:'line' | 'shadow' | 'cross'\n type: 'line',\n // type 为 line 的时候有效,指定 tooltip line 所在的轴,可选\n // 可选 'x' | 'y' | 'angle' | 'radius' | 'auto'\n // 默认 'auto',会选择类型为 category 的轴,对于双数值轴,笛卡尔坐标系会默认选择 x 轴\n // 极坐标系会默认选择 angle 轴\n axis: 'auto',\n animation: 'auto',\n animationDurationUpdate: 200,\n animationEasingUpdate: 'exponentialOut',\n crossStyle: {\n color: '#999',\n width: 1,\n type: 'dashed',\n // TODO formatter\n textStyle: {} // lineStyle and shadowStyle should not be specified here,\n // otherwise it will always override those styles on option.axisPointer.\n\n }\n },\n textStyle: {\n color: '#fff',\n fontSize: 14\n }\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar Tree = require(\"../../data/Tree\");\n\nvar Model = require(\"../../model/Model\");\n\nvar _treeHelper = require(\"../helper/treeHelper\");\n\nvar wrapTreePathInfo = _treeHelper.wrapTreePathInfo;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.sunburst',\n\n /**\n * @type {module:echarts/data/Tree~Node}\n */\n _viewRoot: null,\n getInitialData: function (option, ecModel) {\n // Create a virtual root.\n var root = {\n name: option.name,\n children: option.data\n };\n completeTreeValue(root);\n var levelModels = zrUtil.map(option.levels || [], function (levelDefine) {\n return new Model(levelDefine, this, ecModel);\n }, this); // Make sure always a new tree is created when setOption,\n // in TreemapView, we check whether oldTree === newTree\n // to choose mappings approach among old shapes and new shapes.\n\n var tree = Tree.createTree(root, this, beforeLink);\n\n function beforeLink(nodeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n var node = tree.getNodeByDataIndex(idx);\n var levelModel = levelModels[node.depth];\n levelModel && (model.parentModel = levelModel);\n return model;\n });\n }\n\n return tree.data;\n },\n optionUpdated: function () {\n this.resetViewRoot();\n },\n\n /*\n * @override\n */\n getDataParams: function (dataIndex) {\n var params = SeriesModel.prototype.getDataParams.apply(this, arguments);\n var node = this.getData().tree.getNodeByDataIndex(dataIndex);\n params.treePathInfo = wrapTreePathInfo(node, this);\n return params;\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n // 默认全局居中\n center: ['50%', '50%'],\n radius: [0, '75%'],\n // 默认顺时针\n clockwise: true,\n startAngle: 90,\n // 最小角度改为0\n minAngle: 0,\n percentPrecision: 2,\n // If still show when all data zero.\n stillShowZeroSum: true,\n // Policy of highlighting pieces when hover on one\n // Valid values: 'none' (for not downplay others), 'descendant',\n // 'ancestor', 'self'\n highlightPolicy: 'descendant',\n // 'rootToNode', 'link', or false\n nodeClick: 'rootToNode',\n renderLabelForZeroData: false,\n label: {\n // could be: 'radial', 'tangential', or 'none'\n rotate: 'radial',\n show: true,\n opacity: 1,\n // 'left' is for inner side of inside, and 'right' is for outter\n // side for inside\n align: 'center',\n position: 'inside',\n distance: 5,\n silent: true\n },\n itemStyle: {\n borderWidth: 1,\n borderColor: 'white',\n borderType: 'solid',\n shadowBlur: 0,\n shadowColor: 'rgba(0, 0, 0, 0.2)',\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n opacity: 1\n },\n highlight: {\n itemStyle: {\n opacity: 1\n }\n },\n downplay: {\n itemStyle: {\n opacity: 0.5\n },\n label: {\n opacity: 0.6\n }\n },\n // Animation type canbe expansion, scale\n animationType: 'expansion',\n animationDuration: 1000,\n animationDurationUpdate: 500,\n animationEasing: 'cubicOut',\n data: [],\n levels: [],\n\n /**\n * Sort order.\n *\n * Valid values: 'desc', 'asc', null, or callback function.\n * 'desc' and 'asc' for descend and ascendant order;\n * null for not sorting;\n * example of callback function:\n * function(nodeA, nodeB) {\n * return nodeA.getValue() - nodeB.getValue();\n * }\n */\n sort: 'desc'\n },\n getViewRoot: function () {\n return this._viewRoot;\n },\n\n /**\n * @param {module:echarts/data/Tree~Node} [viewRoot]\n */\n resetViewRoot: function (viewRoot) {\n viewRoot ? this._viewRoot = viewRoot : viewRoot = this._viewRoot;\n var root = this.getRawData().tree.root;\n\n if (!viewRoot || viewRoot !== root && !root.contains(viewRoot)) {\n this._viewRoot = root;\n }\n }\n});\n/**\n * @param {Object} dataNode\n */\n\n\nfunction completeTreeValue(dataNode) {\n // Postorder travel tree.\n // If value of none-leaf node is not set,\n // calculate it by suming up the value of all children.\n var sum = 0;\n zrUtil.each(dataNode.children, function (child) {\n completeTreeValue(child);\n var childValue = child.value;\n zrUtil.isArray(childValue) && (childValue = childValue[0]);\n sum += childValue;\n });\n var thisValue = dataNode.value;\n\n if (zrUtil.isArray(thisValue)) {\n thisValue = thisValue[0];\n }\n\n if (thisValue == null || isNaN(thisValue)) {\n thisValue = sum;\n } // Value should not less than 0.\n\n\n if (thisValue < 0) {\n thisValue = 0;\n }\n\n zrUtil.isArray(dataNode.value) ? dataNode.value[0] = thisValue : dataNode.value = thisValue;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n dataItem = dataItem || [0, 0];\n return zrUtil.map(['x', 'y'], function (dim, dimIdx) {\n var axis = this.getAxis(dim);\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n }, this);\n}\n\nfunction _default(coordSys) {\n var rect = coordSys.grid.getRect();\n return {\n coordSys: {\n // The name exposed to user is always 'cartesian2d' but not 'grid'.\n type: 'cartesian2d',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n api: {\n coord: function (data) {\n // do not provide \"out\" param\n return coordSys.dataToPoint(data);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nrequire(\"../coord/cartesian/Grid\");\n\nrequire(\"./bar/PictorialBarSeries\");\n\nrequire(\"./bar/PictorialBarView\");\n\nvar _barGrid = require(\"../layout/barGrid\");\n\nvar layout = _barGrid.layout;\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nrequire(\"../component/gridSimple\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// In case developer forget to include grid component\necharts.registerLayout(zrUtil.curry(layout, 'pictorialBar'));\necharts.registerVisual(visualSymbol('pictorialBar', 'roundRect'));","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar visualSolution = require(\"../../visual/visualSolution\");\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar VISUAL_PRIORITY = echarts.PRIORITY.VISUAL.COMPONENT;\necharts.registerVisual(VISUAL_PRIORITY, {\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var resetDefines = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n var pipelineContext = seriesModel.pipelineContext;\n\n if (!visualMapModel.isTargetSeries(seriesModel) || pipelineContext && pipelineContext.large) {\n return;\n }\n\n resetDefines.push(visualSolution.incrementalApplyVisual(visualMapModel.stateList, visualMapModel.targetVisuals, zrUtil.bind(visualMapModel.getValueState, visualMapModel), visualMapModel.getDataDimension(seriesModel.getData())));\n });\n return resetDefines;\n }\n}); // Only support color.\n\necharts.registerVisual(VISUAL_PRIORITY, {\n createOnAllSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var visualMetaList = [];\n ecModel.eachComponent('visualMap', function (visualMapModel) {\n if (visualMapModel.isTargetSeries(seriesModel)) {\n var visualMeta = visualMapModel.getVisualMeta(zrUtil.bind(getColorVisual, null, seriesModel, visualMapModel)) || {\n stops: [],\n outerColors: []\n };\n var concreteDim = visualMapModel.getDataDimension(data);\n var dimInfo = data.getDimensionInfo(concreteDim);\n\n if (dimInfo != null) {\n // visualMeta.dimension should be dimension index, but not concrete dimension.\n visualMeta.dimension = dimInfo.index;\n visualMetaList.push(visualMeta);\n }\n }\n }); // console.log(JSON.stringify(visualMetaList.map(a => a.stops)));\n\n seriesModel.getData().setVisual('visualMeta', visualMetaList);\n }\n}); // FIXME\n// performance and export for heatmap?\n// value can be Infinity or -Infinity\n\nfunction getColorVisual(seriesModel, visualMapModel, value, valueState) {\n var mappings = visualMapModel.targetVisuals[valueState];\n var visualTypes = VisualMapping.prepareVisualTypes(mappings);\n var resultVisual = {\n color: seriesModel.getData().getVisual('color') // default color.\n\n };\n\n for (var i = 0, len = visualTypes.length; i < len; i++) {\n var type = visualTypes[i];\n var mapping = mappings[type === 'opacity' ? '__alphaForOpacity' : type];\n mapping && mapping.applyVisual(value, getVisual, setVisual);\n }\n\n return resultVisual.color;\n\n function getVisual(key) {\n return resultVisual[key];\n }\n\n function setVisual(key, value) {\n resultVisual[key] = value;\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* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar opacityAccessPath = ['lineStyle', 'normal', 'opacity'];\nvar _default = {\n seriesType: 'parallel',\n reset: function (seriesModel, ecModel, api) {\n var itemStyleModel = seriesModel.getModel('itemStyle');\n var lineStyleModel = seriesModel.getModel('lineStyle');\n var globalColors = ecModel.get('color');\n var color = lineStyleModel.get('color') || itemStyleModel.get('color') || globalColors[seriesModel.seriesIndex % globalColors.length];\n var inactiveOpacity = seriesModel.get('inactiveOpacity');\n var activeOpacity = seriesModel.get('activeOpacity');\n var lineStyle = seriesModel.getModel('lineStyle').getLineStyle();\n var coordSys = seriesModel.coordinateSystem;\n var data = seriesModel.getData();\n var opacityMap = {\n normal: lineStyle.opacity,\n active: activeOpacity,\n inactive: inactiveOpacity\n };\n data.setVisual('color', color);\n\n function progress(params, data) {\n coordSys.eachActiveState(data, function (activeState, dataIndex) {\n var opacity = opacityMap[activeState];\n\n if (activeState === 'normal' && data.hasItemOption) {\n var itemOpacity = data.getItemModel(dataIndex).get(opacityAccessPath, true);\n itemOpacity != null && (opacity = itemOpacity);\n }\n\n data.setItemVisual(dataIndex, 'opacity', opacity);\n }, params.start, params.end);\n }\n\n return {\n progress: progress\n };\n }\n};\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar SymbolDraw = require(\"../helper/SymbolDraw\");\n\nvar LargeSymbolDraw = require(\"../helper/LargeSymbolDraw\");\n\nvar pointsLayout = require(\"../../layout/points\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.extendChartView({\n type: 'scatter',\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n\n symbolDraw.updateData(data, {\n // TODO\n // If this parameter should be a shape or a bounding volume\n // shape will be more general.\n // But bounding volume like bounding rect will be much faster in the contain calculation\n clipShape: this._getClipShape(seriesModel)\n });\n this._finished = true;\n },\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n\n var symbolDraw = this._updateSymbolDraw(data, seriesModel);\n\n symbolDraw.incrementalPrepareUpdate(data);\n this._finished = false;\n },\n incrementalRender: function (taskParams, seriesModel, ecModel) {\n this._symbolDraw.incrementalUpdate(taskParams, seriesModel.getData(), {\n clipShape: this._getClipShape(seriesModel)\n });\n\n this._finished = taskParams.end === seriesModel.getData().count();\n },\n updateTransform: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData(); // Must mark group dirty and make sure the incremental layer will be cleared\n // PENDING\n\n this.group.dirty();\n\n if (!this._finished || data.count() > 1e4 || !this._symbolDraw.isPersistent()) {\n return {\n update: true\n };\n } else {\n var res = pointsLayout().reset(seriesModel);\n\n if (res.progress) {\n res.progress({\n start: 0,\n end: data.count()\n }, data);\n }\n\n this._symbolDraw.updateLayout(data);\n }\n },\n _getClipShape: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var clipArea = coordSys && coordSys.getArea && coordSys.getArea();\n return seriesModel.get('clip', true) ? clipArea : null;\n },\n _updateSymbolDraw: function (data, seriesModel) {\n var symbolDraw = this._symbolDraw;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeDraw = pipelineContext.large;\n\n if (!symbolDraw || isLargeDraw !== this._isLargeDraw) {\n symbolDraw && symbolDraw.remove();\n symbolDraw = this._symbolDraw = isLargeDraw ? new LargeSymbolDraw() : new SymbolDraw();\n this._isLargeDraw = isLargeDraw;\n this.group.removeAll();\n }\n\n this.group.add(symbolDraw.group);\n return symbolDraw;\n },\n remove: function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove(true);\n this._symbolDraw = null;\n },\n dispose: function () {}\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _circularLayoutHelper = require(\"./circularLayoutHelper\");\n\nvar circularLayout = _circularLayoutHelper.circularLayout;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n if (seriesModel.get('layout') === 'circular') {\n circularLayout(seriesModel, 'symbolSize');\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar createDimensions = require(\"../../data/helper/createDimensions\");\n\nvar _dimensionHelper = require(\"../../data/helper/dimensionHelper\");\n\nvar getDimensionTypeByAxis = _dimensionHelper.getDimensionTypeByAxis;\n\nvar List = require(\"../../data/List\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _model = require(\"../../util/model\");\n\nvar groupData = _model.groupData;\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\n\nvar LegendVisualProvider = require(\"../../visual/LegendVisualProvider\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar DATA_NAME_INDEX = 2;\nvar ThemeRiverSeries = SeriesModel.extend({\n type: 'series.themeRiver',\n dependencies: ['singleAxis'],\n\n /**\n * @readOnly\n * @type {module:zrender/core/util#HashMap}\n */\n nameMap: null,\n\n /**\n * @override\n */\n init: function (option) {\n // eslint-disable-next-line\n ThemeRiverSeries.superApply(this, 'init', arguments); // Put this function here is for the sake of consistency of code style.\n // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n },\n\n /**\n * If there is no value of a certain point in the time for some event,set it value to 0.\n *\n * @param {Array} data initial data in the option\n * @return {Array}\n */\n fixData: function (data) {\n var rawDataLength = data.length;\n /**\n * Make sure every layer data get the same keys.\n * The value index tells which layer has visited.\n * {\n * 2014/01/01: -1\n * }\n */\n\n var timeValueKeys = {}; // grouped data by name\n\n var groupResult = groupData(data, function (item) {\n if (!timeValueKeys.hasOwnProperty(item[0])) {\n timeValueKeys[item[0]] = -1;\n }\n\n return item[2];\n });\n var layData = [];\n groupResult.buckets.each(function (items, key) {\n layData.push({\n name: key,\n dataList: items\n });\n });\n var layerNum = layData.length;\n\n for (var k = 0; k < layerNum; ++k) {\n var name = layData[k].name;\n\n for (var j = 0; j < layData[k].dataList.length; ++j) {\n var timeValue = layData[k].dataList[j][0];\n timeValueKeys[timeValue] = k;\n }\n\n for (var timeValue in timeValueKeys) {\n if (timeValueKeys.hasOwnProperty(timeValue) && timeValueKeys[timeValue] !== k) {\n timeValueKeys[timeValue] = k;\n data[rawDataLength] = [];\n data[rawDataLength][0] = timeValue;\n data[rawDataLength][1] = 0;\n data[rawDataLength][2] = name;\n rawDataLength++;\n }\n }\n }\n\n return data;\n },\n\n /**\n * @override\n * @param {Object} option the initial option that user gived\n * @param {module:echarts/model/Model} ecModel the model object for themeRiver option\n * @return {module:echarts/data/List}\n */\n getInitialData: function (option, ecModel) {\n var singleAxisModel = ecModel.queryComponents({\n mainType: 'singleAxis',\n index: this.get('singleAxisIndex'),\n id: this.get('singleAxisId')\n })[0];\n var axisType = singleAxisModel.get('type'); // filter the data item with the value of label is undefined\n\n var filterData = zrUtil.filter(option.data, function (dataItem) {\n return dataItem[2] !== undefined;\n }); // ??? TODO design a stage to transfer data for themeRiver and lines?\n\n var data = this.fixData(filterData || []);\n var nameList = [];\n var nameMap = this.nameMap = zrUtil.createHashMap();\n var count = 0;\n\n for (var i = 0; i < data.length; ++i) {\n nameList.push(data[i][DATA_NAME_INDEX]);\n\n if (!nameMap.get(data[i][DATA_NAME_INDEX])) {\n nameMap.set(data[i][DATA_NAME_INDEX], count);\n count++;\n }\n }\n\n var dimensionsInfo = createDimensions(data, {\n coordDimensions: ['single'],\n dimensionsDefine: [{\n name: 'time',\n type: getDimensionTypeByAxis(axisType)\n }, {\n name: 'value',\n type: 'float'\n }, {\n name: 'name',\n type: 'ordinal'\n }],\n encodeDefine: {\n single: 0,\n value: 1,\n itemName: 2\n }\n });\n var list = new List(dimensionsInfo, this);\n list.initData(data);\n return list;\n },\n\n /**\n * The raw data is divided into multiple layers and each layer\n * has same name.\n *\n * @return {Array.>}\n */\n getLayerSeries: function () {\n var data = this.getData();\n var lenCount = data.count();\n var indexArr = [];\n\n for (var i = 0; i < lenCount; ++i) {\n indexArr[i] = i;\n }\n\n var timeDim = data.mapDimension('single'); // data group by name\n\n var groupResult = groupData(indexArr, function (index) {\n return data.get('name', index);\n });\n var layerSeries = [];\n groupResult.buckets.each(function (items, key) {\n items.sort(function (index1, index2) {\n return data.get(timeDim, index1) - data.get(timeDim, index2);\n });\n layerSeries.push({\n name: key,\n indices: items\n });\n });\n return layerSeries;\n },\n\n /**\n * Get data indices for show tooltip content\n * @param {Array.|string} dim single coordinate dimension\n * @param {number} value axis value\n * @param {module:echarts/coord/single/SingleAxis} baseAxis single Axis used\n * the themeRiver.\n * @return {Object} {dataIndices, nestestValue}\n */\n getAxisTooltipData: function (dim, value, baseAxis) {\n if (!zrUtil.isArray(dim)) {\n dim = dim ? [dim] : [];\n }\n\n var data = this.getData();\n var layerSeries = this.getLayerSeries();\n var indices = [];\n var layerNum = layerSeries.length;\n var nestestValue;\n\n for (var i = 0; i < layerNum; ++i) {\n var minDist = Number.MAX_VALUE;\n var nearestIdx = -1;\n var pointNum = layerSeries[i].indices.length;\n\n for (var j = 0; j < pointNum; ++j) {\n var theValue = data.get(dim[0], layerSeries[i].indices[j]);\n var dist = Math.abs(theValue - value);\n\n if (dist <= minDist) {\n nestestValue = theValue;\n minDist = dist;\n nearestIdx = layerSeries[i].indices[j];\n }\n }\n\n indices.push(nearestIdx);\n }\n\n return {\n dataIndices: indices,\n nestestValue: nestestValue\n };\n },\n\n /**\n * @override\n * @param {number} dataIndex index of data\n */\n formatTooltip: function (dataIndex) {\n var data = this.getData();\n var htmlName = data.getName(dataIndex);\n var htmlValue = data.get(data.mapDimension('value'), dataIndex);\n\n if (isNaN(htmlValue) || htmlValue == null) {\n htmlValue = '-';\n }\n\n return encodeHTML(htmlName + ' : ' + htmlValue);\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'singleAxis',\n // gap in axis's orthogonal orientation\n boundaryGap: ['10%', '10%'],\n // legendHoverLink: true,\n singleAxisIndex: 0,\n animationEasing: 'linear',\n label: {\n margin: 4,\n show: true,\n position: 'left',\n color: '#000',\n fontSize: 11\n },\n emphasis: {\n label: {\n show: true\n }\n }\n }\n});\nvar _default = ThemeRiverSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar LineDraw = require(\"../helper/LineDraw\");\n\nvar EffectLine = require(\"../helper/EffectLine\");\n\nvar Line = require(\"../helper/Line\");\n\nvar Polyline = require(\"../helper/Polyline\");\n\nvar EffectPolyline = require(\"../helper/EffectPolyline\");\n\nvar LargeLineDraw = require(\"../helper/LargeLineDraw\");\n\nvar linesLayout = require(\"./linesLayout\");\n\nvar _createClipPathFromCoordSys = require(\"../helper/createClipPathFromCoordSys\");\n\nvar createClipPath = _createClipPathFromCoordSys.createClipPath;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = echarts.extendChartView({\n type: 'lines',\n init: function () {},\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n\n var lineDraw = this._updateLineDraw(data, seriesModel);\n\n var zlevel = seriesModel.get('zlevel');\n var trailLength = seriesModel.get('effect.trailLength');\n var zr = api.getZr(); // Avoid the drag cause ghost shadow\n // FIXME Better way ?\n // SVG doesn't support\n\n var isSvg = zr.painter.getType() === 'svg';\n\n if (!isSvg) {\n zr.painter.getLayer(zlevel).clear(true);\n } // Config layer with motion blur\n\n\n if (this._lastZlevel != null && !isSvg) {\n zr.configLayer(this._lastZlevel, {\n motionBlur: false\n });\n }\n\n if (this._showEffect(seriesModel) && trailLength) {\n if (!isSvg) {\n zr.configLayer(zlevel, {\n motionBlur: true,\n lastFrameAlpha: Math.max(Math.min(trailLength / 10 + 0.9, 1), 0)\n });\n }\n }\n\n lineDraw.updateData(data);\n var clipPath = seriesModel.get('clip', true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel);\n\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n\n this._lastZlevel = zlevel;\n this._finished = true;\n },\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n\n var lineDraw = this._updateLineDraw(data, seriesModel);\n\n lineDraw.incrementalPrepareUpdate(data);\n\n this._clearLayer(api);\n\n this._finished = false;\n },\n incrementalRender: function (taskParams, seriesModel, ecModel) {\n this._lineDraw.incrementalUpdate(taskParams, seriesModel.getData());\n\n this._finished = taskParams.end === seriesModel.getData().count();\n },\n updateTransform: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var pipelineContext = seriesModel.pipelineContext;\n\n if (!this._finished || pipelineContext.large || pipelineContext.progressiveRender) {\n // TODO Don't have to do update in large mode. Only do it when there are millions of data.\n return {\n update: true\n };\n } else {\n // TODO Use same logic with ScatterView.\n // Manually update layout\n var res = linesLayout.reset(seriesModel);\n\n if (res.progress) {\n res.progress({\n start: 0,\n end: data.count()\n }, data);\n }\n\n this._lineDraw.updateLayout();\n\n this._clearLayer(api);\n }\n },\n _updateLineDraw: function (data, seriesModel) {\n var lineDraw = this._lineDraw;\n\n var hasEffect = this._showEffect(seriesModel);\n\n var isPolyline = !!seriesModel.get('polyline');\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeDraw = pipelineContext.large;\n\n if (!lineDraw || hasEffect !== this._hasEffet || isPolyline !== this._isPolyline || isLargeDraw !== this._isLargeDraw) {\n if (lineDraw) {\n lineDraw.remove();\n }\n\n lineDraw = this._lineDraw = isLargeDraw ? new LargeLineDraw() : new LineDraw(isPolyline ? hasEffect ? EffectPolyline : Polyline : hasEffect ? EffectLine : Line);\n this._hasEffet = hasEffect;\n this._isPolyline = isPolyline;\n this._isLargeDraw = isLargeDraw;\n this.group.removeAll();\n }\n\n this.group.add(lineDraw.group);\n return lineDraw;\n },\n _showEffect: function (seriesModel) {\n return !!seriesModel.get('effect.show');\n },\n _clearLayer: function (api) {\n // Not use motion when dragging or zooming\n var zr = api.getZr();\n var isSvg = zr.painter.getType() === 'svg';\n\n if (!isSvg && this._lastZlevel != null) {\n zr.painter.getLayer(this._lastZlevel).clear(true);\n }\n },\n remove: function (ecModel, api) {\n this._lineDraw && this._lineDraw.remove();\n this._lineDraw = null; // Clear motion when lineDraw is removed\n\n this._clearLayer(api);\n },\n dispose: function () {}\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar DEFAULT_TOOLBOX_BTNS = ['rect', 'polygon', 'keep', 'clear'];\n\nfunction _default(option, isNew) {\n var brushComponents = option && option.brush;\n\n if (!zrUtil.isArray(brushComponents)) {\n brushComponents = brushComponents ? [brushComponents] : [];\n }\n\n if (!brushComponents.length) {\n return;\n }\n\n var brushComponentSpecifiedBtns = [];\n zrUtil.each(brushComponents, function (brushOpt) {\n var tbs = brushOpt.hasOwnProperty('toolbox') ? brushOpt.toolbox : [];\n\n if (tbs instanceof Array) {\n brushComponentSpecifiedBtns = brushComponentSpecifiedBtns.concat(tbs);\n }\n });\n var toolbox = option && option.toolbox;\n\n if (zrUtil.isArray(toolbox)) {\n toolbox = toolbox[0];\n }\n\n if (!toolbox) {\n toolbox = {\n feature: {}\n };\n option.toolbox = [toolbox];\n }\n\n var toolboxFeature = toolbox.feature || (toolbox.feature = {});\n var toolboxBrush = toolboxFeature.brush || (toolboxFeature.brush = {});\n var brushTypes = toolboxBrush.type || (toolboxBrush.type = []);\n brushTypes.push.apply(brushTypes, brushComponentSpecifiedBtns);\n removeDuplicate(brushTypes);\n\n if (isNew && !brushTypes.length) {\n brushTypes.push.apply(brushTypes, DEFAULT_TOOLBOX_BTNS);\n }\n}\n\nfunction removeDuplicate(arr) {\n var map = {};\n zrUtil.each(arr, function (val) {\n map[val] = 1;\n });\n arr.length = 0;\n zrUtil.each(map, function (flag, val) {\n arr.push(val);\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar AxisBuilder = require(\"./AxisBuilder\");\n\nvar BrushController = require(\"../helper/BrushController\");\n\nvar brushHelper = require(\"../helper/brushHelper\");\n\nvar graphic = require(\"../../util/graphic\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar elementList = ['axisLine', 'axisTickLabel', 'axisName'];\nvar AxisView = echarts.extendComponentView({\n type: 'parallelAxis',\n\n /**\n * @override\n */\n init: function (ecModel, api) {\n AxisView.superApply(this, 'init', arguments);\n /**\n * @type {module:echarts/component/helper/BrushController}\n */\n\n (this._brushController = new BrushController(api.getZr())).on('brush', zrUtil.bind(this._onBrush, this));\n },\n\n /**\n * @override\n */\n render: function (axisModel, ecModel, api, payload) {\n if (fromAxisAreaSelect(axisModel, ecModel, payload)) {\n return;\n }\n\n this.axisModel = axisModel;\n this.api = api;\n this.group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n this.group.add(this._axisGroup);\n\n if (!axisModel.get('show')) {\n return;\n }\n\n var coordSysModel = getCoordSysModel(axisModel, ecModel);\n var coordSys = coordSysModel.coordinateSystem;\n var areaSelectStyle = axisModel.getAreaSelectStyle();\n var areaWidth = areaSelectStyle.width;\n var dim = axisModel.axis.dim;\n var axisLayout = coordSys.getAxisLayout(dim);\n var builderOpt = zrUtil.extend({\n strokeContainThreshold: areaWidth\n }, axisLayout);\n var axisBuilder = new AxisBuilder(axisModel, builderOpt);\n zrUtil.each(elementList, axisBuilder.add, axisBuilder);\n\n this._axisGroup.add(axisBuilder.getGroup());\n\n this._refreshBrushController(builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api);\n\n var animationModel = payload && payload.animation === false ? null : axisModel;\n graphic.groupTransition(oldAxisGroup, this._axisGroup, animationModel);\n },\n // /**\n // * @override\n // */\n // updateVisual: function (axisModel, ecModel, api, payload) {\n // this._brushController && this._brushController\n // .updateCovers(getCoverInfoList(axisModel));\n // },\n _refreshBrushController: function (builderOpt, areaSelectStyle, axisModel, coordSysModel, areaWidth, api) {\n // After filtering, axis may change, select area needs to be update.\n var extent = axisModel.axis.getExtent();\n var extentLen = extent[1] - extent[0];\n var extra = Math.min(30, Math.abs(extentLen) * 0.1); // Arbitrary value.\n // width/height might be negative, which will be\n // normalized in BoundingRect.\n\n var rect = graphic.BoundingRect.create({\n x: extent[0],\n y: -areaWidth / 2,\n width: extentLen,\n height: areaWidth\n });\n rect.x -= extra;\n rect.width += 2 * extra;\n\n this._brushController.mount({\n enableGlobalPan: true,\n rotation: builderOpt.rotation,\n position: builderOpt.position\n }).setPanels([{\n panelId: 'pl',\n clipPath: brushHelper.makeRectPanelClipPath(rect),\n isTargetByCursor: brushHelper.makeRectIsTargetByCursor(rect, api, coordSysModel),\n getLinearBrushOtherExtent: brushHelper.makeLinearBrushOtherExtent(rect, 0)\n }]).enableBrush({\n brushType: 'lineX',\n brushStyle: areaSelectStyle,\n removeOnClick: true\n }).updateCovers(getCoverInfoList(axisModel));\n },\n _onBrush: function (coverInfoList, opt) {\n // Do not cache these object, because the mey be changed.\n var axisModel = this.axisModel;\n var axis = axisModel.axis;\n var intervals = zrUtil.map(coverInfoList, function (coverInfo) {\n return [axis.coordToData(coverInfo.range[0], true), axis.coordToData(coverInfo.range[1], true)];\n }); // If realtime is true, action is not dispatched on drag end, because\n // the drag end emits the same params with the last drag move event,\n // and may have some delay when using touch pad.\n\n if (!axisModel.option.realtime === opt.isEnd || opt.removeOnClick) {\n // jshint ignore:line\n this.api.dispatchAction({\n type: 'axisAreaSelect',\n parallelAxisId: axisModel.id,\n intervals: intervals\n });\n }\n },\n\n /**\n * @override\n */\n dispose: function () {\n this._brushController.dispose();\n }\n});\n\nfunction fromAxisAreaSelect(axisModel, ecModel, payload) {\n return payload && payload.type === 'axisAreaSelect' && ecModel.findComponents({\n mainType: 'parallelAxis',\n query: payload\n })[0] === axisModel;\n}\n\nfunction getCoverInfoList(axisModel) {\n var axis = axisModel.axis;\n return zrUtil.map(axisModel.activeIntervals, function (interval) {\n return {\n brushType: 'lineX',\n panelId: 'pl',\n range: [axis.dataToCoord(interval[0], true), axis.dataToCoord(interval[1], true)]\n };\n });\n}\n\nfunction getCoordSysModel(axisModel, ecModel) {\n return ecModel.getComponent('parallel', axisModel.get('parallelIndex'));\n}\n\nvar _default = AxisView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"./toolbox/ToolboxModel\");\n\nrequire(\"./toolbox/ToolboxView\");\n\nrequire(\"./toolbox/feature/SaveAsImage\");\n\nrequire(\"./toolbox/feature/MagicType\");\n\nrequire(\"./toolbox/feature/DataView\");\n\nrequire(\"./toolbox/feature/DataZoom\");\n\nrequire(\"./toolbox/feature/Restore\");","var Definable = require(\"./Definable\");\n\nvar zrUtil = require(\"../../core/util\");\n\nvar logError = require(\"../../core/log\");\n\nvar colorTool = require(\"../../tool/color\");\n\n/**\n * @file Manages SVG gradient elements.\n * @author Zhang Wenli\n */\n\n/**\n * Manages SVG gradient elements.\n *\n * @class\n * @extends Definable\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n */\nfunction GradientManager(zrId, svgRoot) {\n Definable.call(this, zrId, svgRoot, ['linearGradient', 'radialGradient'], '__gradient_in_use__');\n}\n\nzrUtil.inherits(GradientManager, Definable);\n/**\n * Create new gradient DOM for fill or stroke if not exist,\n * but will not update gradient if exists.\n *\n * @param {SvgElement} svgElement SVG element to paint\n * @param {Displayable} displayable zrender displayable element\n */\n\nGradientManager.prototype.addWithoutUpdate = function (svgElement, displayable) {\n if (displayable && displayable.style) {\n var that = this;\n zrUtil.each(['fill', 'stroke'], function (fillOrStroke) {\n if (displayable.style[fillOrStroke] && (displayable.style[fillOrStroke].type === 'linear' || displayable.style[fillOrStroke].type === 'radial')) {\n var gradient = displayable.style[fillOrStroke];\n var defs = that.getDefs(true); // Create dom in if not exists\n\n var dom;\n\n if (gradient._dom) {\n // Gradient exists\n dom = gradient._dom;\n\n if (!defs.contains(gradient._dom)) {\n // _dom is no longer in defs, recreate\n that.addDom(dom);\n }\n } else {\n // New dom\n dom = that.add(gradient);\n }\n\n that.markUsed(displayable);\n var id = dom.getAttribute('id');\n svgElement.setAttribute(fillOrStroke, 'url(#' + id + ')');\n }\n });\n }\n};\n/**\n * Add a new gradient tag in \n *\n * @param {Gradient} gradient zr gradient instance\n * @return {SVGLinearGradientElement | SVGRadialGradientElement}\n * created DOM\n */\n\n\nGradientManager.prototype.add = function (gradient) {\n var dom;\n\n if (gradient.type === 'linear') {\n dom = this.createElement('linearGradient');\n } else if (gradient.type === 'radial') {\n dom = this.createElement('radialGradient');\n } else {\n logError('Illegal gradient type.');\n return null;\n } // Set dom id with gradient id, since each gradient instance\n // will have no more than one dom element.\n // id may exists before for those dirty elements, in which case\n // id should remain the same, and other attributes should be\n // updated.\n\n\n gradient.id = gradient.id || this.nextId++;\n dom.setAttribute('id', 'zr' + this._zrId + '-gradient-' + gradient.id);\n this.updateDom(gradient, dom);\n this.addDom(dom);\n return dom;\n};\n/**\n * Update gradient.\n *\n * @param {Gradient} gradient zr gradient instance\n */\n\n\nGradientManager.prototype.update = function (gradient) {\n var that = this;\n Definable.prototype.update.call(this, gradient, function () {\n var type = gradient.type;\n var tagName = gradient._dom.tagName;\n\n if (type === 'linear' && tagName === 'linearGradient' || type === 'radial' && tagName === 'radialGradient') {\n // Gradient type is not changed, update gradient\n that.updateDom(gradient, gradient._dom);\n } else {\n // Remove and re-create if type is changed\n that.removeDom(gradient);\n that.add(gradient);\n }\n });\n};\n/**\n * Update gradient dom\n *\n * @param {Gradient} gradient zr gradient instance\n * @param {SVGLinearGradientElement | SVGRadialGradientElement} dom\n * DOM to update\n */\n\n\nGradientManager.prototype.updateDom = function (gradient, dom) {\n if (gradient.type === 'linear') {\n dom.setAttribute('x1', gradient.x);\n dom.setAttribute('y1', gradient.y);\n dom.setAttribute('x2', gradient.x2);\n dom.setAttribute('y2', gradient.y2);\n } else if (gradient.type === 'radial') {\n dom.setAttribute('cx', gradient.x);\n dom.setAttribute('cy', gradient.y);\n dom.setAttribute('r', gradient.r);\n } else {\n logError('Illegal gradient type.');\n return;\n }\n\n if (gradient.global) {\n // x1, x2, y1, y2 in range of 0 to canvas width or height\n dom.setAttribute('gradientUnits', 'userSpaceOnUse');\n } else {\n // x1, x2, y1, y2 in range of 0 to 1\n dom.setAttribute('gradientUnits', 'objectBoundingBox');\n } // Remove color stops if exists\n\n\n dom.innerHTML = ''; // Add color stops\n\n var colors = gradient.colorStops;\n\n for (var i = 0, len = colors.length; i < len; ++i) {\n var stop = this.createElement('stop');\n stop.setAttribute('offset', colors[i].offset * 100 + '%');\n var color = colors[i].color;\n\n if (color.indexOf('rgba') > -1) {\n // Fix Safari bug that stop-color not recognizing alpha #9014\n var opacity = colorTool.parse(color)[3];\n var hex = colorTool.toHex(color); // stop-color cannot be color, since:\n // The opacity value used for the gradient calculation is the\n // *product* of the value of stop-opacity and the opacity of the\n // value of stop-color.\n // See https://www.w3.org/TR/SVG2/pservers.html#StopOpacityProperty\n\n stop.setAttribute('stop-color', '#' + hex);\n stop.setAttribute('stop-opacity', opacity);\n } else {\n stop.setAttribute('stop-color', colors[i].color);\n }\n\n dom.appendChild(stop);\n } // Store dom element in gradient, to avoid creating multiple\n // dom instances for the same gradient element\n\n\n gradient._dom = dom;\n};\n/**\n * Mark a single gradient to be used\n *\n * @param {Displayable} displayable displayable element\n */\n\n\nGradientManager.prototype.markUsed = function (displayable) {\n if (displayable.style) {\n var gradient = displayable.style.fill;\n\n if (gradient && gradient._dom) {\n Definable.prototype.markUsed.call(this, gradient._dom);\n }\n\n gradient = displayable.style.stroke;\n\n if (gradient && gradient._dom) {\n Definable.prototype.markUsed.call(this, gradient._dom);\n }\n }\n};\n\nvar _default = GradientManager;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar each = zrUtil.each;\n\nfunction _default(option) {\n var visualMap = option && option.visualMap;\n\n if (!zrUtil.isArray(visualMap)) {\n visualMap = visualMap ? [visualMap] : [];\n }\n\n each(visualMap, function (opt) {\n if (!opt) {\n return;\n } // rename splitList to pieces\n\n\n if (has(opt, 'splitList') && !has(opt, 'pieces')) {\n opt.pieces = opt.splitList;\n delete opt.splitList;\n }\n\n var pieces = opt.pieces;\n\n if (pieces && zrUtil.isArray(pieces)) {\n each(pieces, function (piece) {\n if (zrUtil.isObject(piece)) {\n if (has(piece, 'start') && !has(piece, 'min')) {\n piece.min = piece.start;\n }\n\n if (has(piece, 'end') && !has(piece, 'max')) {\n piece.max = piece.end;\n }\n }\n });\n }\n });\n}\n\nfunction has(obj, name) {\n return obj && obj.hasOwnProperty && obj.hasOwnProperty(name);\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar DataDiffer = require(\"../../data/DataDiffer\");\n\nvar helper = require(\"../helper/treeHelper\");\n\nvar Breadcrumb = require(\"./Breadcrumb\");\n\nvar RoamController = require(\"../../component/helper/RoamController\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar animationUtil = require(\"../../util/animation\");\n\nvar makeStyleMapper = require(\"../../model/mixin/makeStyleMapper\");\n\nvar _format = require(\"../../util/format\");\n\nvar windowOpen = _format.windowOpen;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar bind = zrUtil.bind;\nvar Group = graphic.Group;\nvar Rect = graphic.Rect;\nvar each = zrUtil.each;\nvar DRAG_THRESHOLD = 3;\nvar PATH_LABEL_NOAMAL = ['label'];\nvar PATH_LABEL_EMPHASIS = ['emphasis', 'label'];\nvar PATH_UPPERLABEL_NORMAL = ['upperLabel'];\nvar PATH_UPPERLABEL_EMPHASIS = ['emphasis', 'upperLabel'];\nvar Z_BASE = 10; // Should bigger than every z.\n\nvar Z_BG = 1;\nvar Z_CONTENT = 2;\nvar getItemStyleEmphasis = makeStyleMapper([['fill', 'color'], // `borderColor` and `borderWidth` has been occupied,\n// so use `stroke` to indicate the stroke of the rect.\n['stroke', 'strokeColor'], ['lineWidth', 'strokeWidth'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor']]);\n\nvar getItemStyleNormal = function (model) {\n // Normal style props should include emphasis style props.\n var itemStyle = getItemStyleEmphasis(model); // Clear styles set by emphasis.\n\n itemStyle.stroke = itemStyle.fill = itemStyle.lineWidth = null;\n return itemStyle;\n};\n\nvar _default = echarts.extendChartView({\n type: 'treemap',\n\n /**\n * @override\n */\n init: function (o, api) {\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this._containerGroup;\n /**\n * @private\n * @type {Object.>}\n */\n\n this._storage = createStorage();\n /**\n * @private\n * @type {module:echarts/data/Tree}\n */\n\n this._oldTree;\n /**\n * @private\n * @type {module:echarts/chart/treemap/Breadcrumb}\n */\n\n this._breadcrumb;\n /**\n * @private\n * @type {module:echarts/component/helper/RoamController}\n */\n\n this._controller;\n /**\n * 'ready', 'animating'\n * @private\n */\n\n this._state = 'ready';\n },\n\n /**\n * @override\n */\n render: function (seriesModel, ecModel, api, payload) {\n var models = ecModel.findComponents({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n });\n\n if (zrUtil.indexOf(models, seriesModel) < 0) {\n return;\n }\n\n this.seriesModel = seriesModel;\n this.api = api;\n this.ecModel = ecModel;\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, seriesModel);\n var payloadType = payload && payload.type;\n var layoutInfo = seriesModel.layoutInfo;\n var isInit = !this._oldTree;\n var thisStorage = this._storage; // Mark new root when action is treemapRootToNode.\n\n var reRoot = payloadType === 'treemapRootToNode' && targetInfo && thisStorage ? {\n rootNodeGroup: thisStorage.nodeGroup[targetInfo.node.getRawIndex()],\n direction: payload.direction\n } : null;\n\n var containerGroup = this._giveContainerGroup(layoutInfo);\n\n var renderResult = this._doRender(containerGroup, seriesModel, reRoot);\n\n !isInit && (!payloadType || payloadType === 'treemapZoomToNode' || payloadType === 'treemapRootToNode') ? this._doAnimation(containerGroup, renderResult, seriesModel, reRoot) : renderResult.renderFinally();\n\n this._resetController(api);\n\n this._renderBreadcrumb(seriesModel, api, targetInfo);\n },\n\n /**\n * @private\n */\n _giveContainerGroup: function (layoutInfo) {\n var containerGroup = this._containerGroup;\n\n if (!containerGroup) {\n // FIXME\n // 加一层containerGroup是为了clip,但是现在clip功能并没有实现。\n containerGroup = this._containerGroup = new Group();\n\n this._initEvents(containerGroup);\n\n this.group.add(containerGroup);\n }\n\n containerGroup.attr('position', [layoutInfo.x, layoutInfo.y]);\n return containerGroup;\n },\n\n /**\n * @private\n */\n _doRender: function (containerGroup, seriesModel, reRoot) {\n var thisTree = seriesModel.getData().tree;\n var oldTree = this._oldTree; // Clear last shape records.\n\n var lastsForAnimation = createStorage();\n var thisStorage = createStorage();\n var oldStorage = this._storage;\n var willInvisibleEls = [];\n var doRenderNode = zrUtil.curry(renderNode, seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls); // Notice: when thisTree and oldTree are the same tree (see list.cloneShallow),\n // the oldTree is actually losted, so we can not find all of the old graphic\n // elements from tree. So we use this stragegy: make element storage, move\n // from old storage to new storage, clear old storage.\n\n dualTravel(thisTree.root ? [thisTree.root] : [], oldTree && oldTree.root ? [oldTree.root] : [], containerGroup, thisTree === oldTree || !oldTree, 0); // Process all removing.\n\n var willDeleteEls = clearStorage(oldStorage);\n this._oldTree = thisTree;\n this._storage = thisStorage;\n return {\n lastsForAnimation: lastsForAnimation,\n willDeleteEls: willDeleteEls,\n renderFinally: renderFinally\n };\n\n function dualTravel(thisViewChildren, oldViewChildren, parentGroup, sameTree, depth) {\n // When 'render' is triggered by action,\n // 'this' and 'old' may be the same tree,\n // we use rawIndex in that case.\n if (sameTree) {\n oldViewChildren = thisViewChildren;\n each(thisViewChildren, function (child, index) {\n !child.isRemoved() && processNode(index, index);\n });\n } // Diff hierarchically (diff only in each subtree, but not whole).\n // because, consistency of view is important.\n else {\n new DataDiffer(oldViewChildren, thisViewChildren, getKey, getKey).add(processNode).update(processNode).remove(zrUtil.curry(processNode, null)).execute();\n }\n\n function getKey(node) {\n // Identify by name or raw index.\n return node.getId();\n }\n\n function processNode(newIndex, oldIndex) {\n var thisNode = newIndex != null ? thisViewChildren[newIndex] : null;\n var oldNode = oldIndex != null ? oldViewChildren[oldIndex] : null;\n var group = doRenderNode(thisNode, oldNode, parentGroup, depth);\n group && dualTravel(thisNode && thisNode.viewChildren || [], oldNode && oldNode.viewChildren || [], group, sameTree, depth + 1);\n }\n }\n\n function clearStorage(storage) {\n var willDeleteEls = createStorage();\n storage && each(storage, function (store, storageName) {\n var delEls = willDeleteEls[storageName];\n each(store, function (el) {\n el && (delEls.push(el), el.__tmWillDelete = 1);\n });\n });\n return willDeleteEls;\n }\n\n function renderFinally() {\n each(willDeleteEls, function (els) {\n each(els, function (el) {\n el.parent && el.parent.remove(el);\n });\n });\n each(willInvisibleEls, function (el) {\n el.invisible = true; // Setting invisible is for optimizing, so no need to set dirty,\n // just mark as invisible.\n\n el.dirty();\n });\n }\n },\n\n /**\n * @private\n */\n _doAnimation: function (containerGroup, renderResult, seriesModel, reRoot) {\n if (!seriesModel.get('animation')) {\n return;\n }\n\n var duration = seriesModel.get('animationDurationUpdate');\n var easing = seriesModel.get('animationEasing');\n var animationWrap = animationUtil.createWrap(); // Make delete animations.\n\n each(renderResult.willDeleteEls, function (store, storageName) {\n each(store, function (el, rawIndex) {\n if (el.invisible) {\n return;\n }\n\n var parent = el.parent; // Always has parent, and parent is nodeGroup.\n\n var target;\n\n if (reRoot && reRoot.direction === 'drillDown') {\n target = parent === reRoot.rootNodeGroup // This is the content element of view root.\n // Only `content` will enter this branch, because\n // `background` and `nodeGroup` will not be deleted.\n ? {\n shape: {\n x: 0,\n y: 0,\n width: parent.__tmNodeWidth,\n height: parent.__tmNodeHeight\n },\n style: {\n opacity: 0\n } // Others.\n\n } : {\n style: {\n opacity: 0\n }\n };\n } else {\n var targetX = 0;\n var targetY = 0;\n\n if (!parent.__tmWillDelete) {\n // Let node animate to right-bottom corner, cooperating with fadeout,\n // which is appropriate for user understanding.\n // Divided by 2 for reRoot rolling up effect.\n targetX = parent.__tmNodeWidth / 2;\n targetY = parent.__tmNodeHeight / 2;\n }\n\n target = storageName === 'nodeGroup' ? {\n position: [targetX, targetY],\n style: {\n opacity: 0\n }\n } : {\n shape: {\n x: targetX,\n y: targetY,\n width: 0,\n height: 0\n },\n style: {\n opacity: 0\n }\n };\n }\n\n target && animationWrap.add(el, target, duration, easing);\n });\n }); // Make other animations\n\n each(this._storage, function (store, storageName) {\n each(store, function (el, rawIndex) {\n var last = renderResult.lastsForAnimation[storageName][rawIndex];\n var target = {};\n\n if (!last) {\n return;\n }\n\n if (storageName === 'nodeGroup') {\n if (last.old) {\n target.position = el.position.slice();\n el.attr('position', last.old);\n }\n } else {\n if (last.old) {\n target.shape = zrUtil.extend({}, el.shape);\n el.setShape(last.old);\n }\n\n if (last.fadein) {\n el.setStyle('opacity', 0);\n target.style = {\n opacity: 1\n };\n } // When animation is stopped for succedent animation starting,\n // el.style.opacity might not be 1\n else if (el.style.opacity !== 1) {\n target.style = {\n opacity: 1\n };\n }\n }\n\n animationWrap.add(el, target, duration, easing);\n });\n }, this);\n this._state = 'animating';\n animationWrap.done(bind(function () {\n this._state = 'ready';\n renderResult.renderFinally();\n }, this)).start();\n },\n\n /**\n * @private\n */\n _resetController: function (api) {\n var controller = this._controller; // Init controller.\n\n if (!controller) {\n controller = this._controller = new RoamController(api.getZr());\n controller.enable(this.seriesModel.get('roam'));\n controller.on('pan', bind(this._onPan, this));\n controller.on('zoom', bind(this._onZoom, this));\n }\n\n var rect = new BoundingRect(0, 0, api.getWidth(), api.getHeight());\n controller.setPointerChecker(function (e, x, y) {\n return rect.contain(x, y);\n });\n },\n\n /**\n * @private\n */\n _clearController: function () {\n var controller = this._controller;\n\n if (controller) {\n controller.dispose();\n controller = null;\n }\n },\n\n /**\n * @private\n */\n _onPan: function (e) {\n if (this._state !== 'animating' && (Math.abs(e.dx) > DRAG_THRESHOLD || Math.abs(e.dy) > DRAG_THRESHOLD)) {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n\n if (!root) {\n return;\n }\n\n var rootLayout = root.getLayout();\n\n if (!rootLayout) {\n return;\n }\n\n this.api.dispatchAction({\n type: 'treemapMove',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rootLayout.x + e.dx,\n y: rootLayout.y + e.dy,\n width: rootLayout.width,\n height: rootLayout.height\n }\n });\n }\n },\n\n /**\n * @private\n */\n _onZoom: function (e) {\n var mouseX = e.originX;\n var mouseY = e.originY;\n\n if (this._state !== 'animating') {\n // These param must not be cached.\n var root = this.seriesModel.getData().tree.root;\n\n if (!root) {\n return;\n }\n\n var rootLayout = root.getLayout();\n\n if (!rootLayout) {\n return;\n }\n\n var rect = new BoundingRect(rootLayout.x, rootLayout.y, rootLayout.width, rootLayout.height);\n var layoutInfo = this.seriesModel.layoutInfo; // Transform mouse coord from global to containerGroup.\n\n mouseX -= layoutInfo.x;\n mouseY -= layoutInfo.y; // Scale root bounding rect.\n\n var m = matrix.create();\n matrix.translate(m, m, [-mouseX, -mouseY]);\n matrix.scale(m, m, [e.scale, e.scale]);\n matrix.translate(m, m, [mouseX, mouseY]);\n rect.applyTransform(m);\n this.api.dispatchAction({\n type: 'treemapRender',\n from: this.uid,\n seriesId: this.seriesModel.id,\n rootRect: {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n }\n });\n }\n },\n\n /**\n * @private\n */\n _initEvents: function (containerGroup) {\n containerGroup.on('click', function (e) {\n if (this._state !== 'ready') {\n return;\n }\n\n var nodeClick = this.seriesModel.get('nodeClick', true);\n\n if (!nodeClick) {\n return;\n }\n\n var targetInfo = this.findTarget(e.offsetX, e.offsetY);\n\n if (!targetInfo) {\n return;\n }\n\n var node = targetInfo.node;\n\n if (node.getLayout().isLeafRoot) {\n this._rootToNode(targetInfo);\n } else {\n if (nodeClick === 'zoomToNode') {\n this._zoomToNode(targetInfo);\n } else if (nodeClick === 'link') {\n var itemModel = node.hostTree.data.getItemModel(node.dataIndex);\n var link = itemModel.get('link', true);\n var linkTarget = itemModel.get('target', true) || 'blank';\n link && windowOpen(link, linkTarget);\n }\n }\n }, this);\n },\n\n /**\n * @private\n */\n _renderBreadcrumb: function (seriesModel, api, targetInfo) {\n if (!targetInfo) {\n targetInfo = seriesModel.get('leafDepth', true) != null ? {\n node: seriesModel.getViewRoot() // FIXME\n // better way?\n // Find breadcrumb tail on center of containerGroup.\n\n } : this.findTarget(api.getWidth() / 2, api.getHeight() / 2);\n\n if (!targetInfo) {\n targetInfo = {\n node: seriesModel.getData().tree.root\n };\n }\n }\n\n (this._breadcrumb || (this._breadcrumb = new Breadcrumb(this.group))).render(seriesModel, api, targetInfo.node, bind(onSelect, this));\n\n function onSelect(node) {\n if (this._state !== 'animating') {\n helper.aboveViewRoot(seriesModel.getViewRoot(), node) ? this._rootToNode({\n node: node\n }) : this._zoomToNode({\n node: node\n });\n }\n }\n },\n\n /**\n * @override\n */\n remove: function () {\n this._clearController();\n\n this._containerGroup && this._containerGroup.removeAll();\n this._storage = createStorage();\n this._state = 'ready';\n this._breadcrumb && this._breadcrumb.remove();\n },\n dispose: function () {\n this._clearController();\n },\n\n /**\n * @private\n */\n _zoomToNode: function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapZoomToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n },\n\n /**\n * @private\n */\n _rootToNode: function (targetInfo) {\n this.api.dispatchAction({\n type: 'treemapRootToNode',\n from: this.uid,\n seriesId: this.seriesModel.id,\n targetNode: targetInfo.node\n });\n },\n\n /**\n * @public\n * @param {number} x Global coord x.\n * @param {number} y Global coord y.\n * @return {Object} info If not found, return undefined;\n * @return {number} info.node Target node.\n * @return {number} info.offsetX x refer to target node.\n * @return {number} info.offsetY y refer to target node.\n */\n findTarget: function (x, y) {\n var targetInfo;\n var viewRoot = this.seriesModel.getViewRoot();\n viewRoot.eachNode({\n attr: 'viewChildren',\n order: 'preorder'\n }, function (node) {\n var bgEl = this._storage.background[node.getRawIndex()]; // If invisible, there might be no element.\n\n\n if (bgEl) {\n var point = bgEl.transformCoordToLocal(x, y);\n var shape = bgEl.shape; // For performance consideration, dont use 'getBoundingRect'.\n\n if (shape.x <= point[0] && point[0] <= shape.x + shape.width && shape.y <= point[1] && point[1] <= shape.y + shape.height) {\n targetInfo = {\n node: node,\n offsetX: point[0],\n offsetY: point[1]\n };\n } else {\n return false; // Suppress visit subtree.\n }\n }\n }, this);\n return targetInfo;\n }\n});\n/**\n * @inner\n */\n\n\nfunction createStorage() {\n return {\n nodeGroup: [],\n background: [],\n content: []\n };\n}\n/**\n * @inner\n * @return Return undefined means do not travel further.\n */\n\n\nfunction renderNode(seriesModel, thisStorage, oldStorage, reRoot, lastsForAnimation, willInvisibleEls, thisNode, oldNode, parentGroup, depth) {\n // Whether under viewRoot.\n if (!thisNode) {\n // Deleting nodes will be performed finally. This method just find\n // element from old storage, or create new element, set them to new\n // storage, and set styles.\n return;\n } // -------------------------------------------------------------------\n // Start of closure variables available in \"Procedures in renderNode\".\n\n\n var thisLayout = thisNode.getLayout();\n var data = seriesModel.getData(); // Only for enabling highlight/downplay. Clear firstly.\n // Because some node will not be rendered.\n\n data.setItemGraphicEl(thisNode.dataIndex, null);\n\n if (!thisLayout || !thisLayout.isInView) {\n return;\n }\n\n var thisWidth = thisLayout.width;\n var thisHeight = thisLayout.height;\n var borderWidth = thisLayout.borderWidth;\n var thisInvisible = thisLayout.invisible;\n var thisRawIndex = thisNode.getRawIndex();\n var oldRawIndex = oldNode && oldNode.getRawIndex();\n var thisViewChildren = thisNode.viewChildren;\n var upperHeight = thisLayout.upperHeight;\n var isParent = thisViewChildren && thisViewChildren.length;\n var itemStyleNormalModel = thisNode.getModel('itemStyle');\n var itemStyleEmphasisModel = thisNode.getModel('emphasis.itemStyle'); // End of closure ariables available in \"Procedures in renderNode\".\n // -----------------------------------------------------------------\n // Node group\n\n var group = giveGraphic('nodeGroup', Group);\n\n if (!group) {\n return;\n }\n\n parentGroup.add(group); // x,y are not set when el is above view root.\n\n group.attr('position', [thisLayout.x || 0, thisLayout.y || 0]);\n group.__tmNodeWidth = thisWidth;\n group.__tmNodeHeight = thisHeight;\n\n if (thisLayout.isAboveViewRoot) {\n return group;\n }\n\n var nodeModel = thisNode.getModel(); // Background\n\n var bg = giveGraphic('background', Rect, depth, Z_BG);\n bg && renderBackground(group, bg, isParent && thisLayout.upperLabelHeight); // No children, render content.\n\n if (isParent) {\n // Because of the implementation about \"traverse\" in graphic hover style, we\n // can not set hover listener on the \"group\" of non-leaf node. Otherwise the\n // hover event from the descendents will be listenered.\n if (graphic.isHighDownDispatcher(group)) {\n graphic.setAsHighDownDispatcher(group, false);\n }\n\n if (bg) {\n graphic.setAsHighDownDispatcher(bg, true); // Only for enabling highlight/downplay.\n\n data.setItemGraphicEl(thisNode.dataIndex, bg);\n }\n } else {\n var content = giveGraphic('content', Rect, depth, Z_CONTENT);\n content && renderContent(group, content);\n\n if (bg && graphic.isHighDownDispatcher(bg)) {\n graphic.setAsHighDownDispatcher(bg, false);\n }\n\n graphic.setAsHighDownDispatcher(group, true); // Only for enabling highlight/downplay.\n\n data.setItemGraphicEl(thisNode.dataIndex, group);\n }\n\n return group; // ----------------------------\n // | Procedures in renderNode |\n // ----------------------------\n\n function renderBackground(group, bg, useUpperLabel) {\n // For tooltip.\n bg.dataIndex = thisNode.dataIndex;\n bg.seriesIndex = seriesModel.seriesIndex;\n bg.setShape({\n x: 0,\n y: 0,\n width: thisWidth,\n height: thisHeight\n });\n\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(bg);\n } else {\n bg.invisible = false;\n var visualBorderColor = thisNode.getVisual('borderColor', true);\n var emphasisBorderColor = itemStyleEmphasisModel.get('borderColor');\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualBorderColor;\n var emphasisStyle = getItemStyleEmphasis(itemStyleEmphasisModel);\n emphasisStyle.fill = emphasisBorderColor;\n\n if (useUpperLabel) {\n var upperLabelWidth = thisWidth - 2 * borderWidth;\n prepareText(normalStyle, emphasisStyle, visualBorderColor, upperLabelWidth, upperHeight, {\n x: borderWidth,\n y: 0,\n width: upperLabelWidth,\n height: upperHeight\n });\n } // For old bg.\n else {\n normalStyle.text = emphasisStyle.text = null;\n }\n\n bg.setStyle(normalStyle);\n graphic.setElementHoverStyle(bg, emphasisStyle);\n }\n\n group.add(bg);\n }\n\n function renderContent(group, content) {\n // For tooltip.\n content.dataIndex = thisNode.dataIndex;\n content.seriesIndex = seriesModel.seriesIndex;\n var contentWidth = Math.max(thisWidth - 2 * borderWidth, 0);\n var contentHeight = Math.max(thisHeight - 2 * borderWidth, 0);\n content.culling = true;\n content.setShape({\n x: borderWidth,\n y: borderWidth,\n width: contentWidth,\n height: contentHeight\n });\n\n if (thisInvisible) {\n // If invisible, do not set visual, otherwise the element will\n // change immediately before animation. We think it is OK to\n // remain its origin color when moving out of the view window.\n processInvisible(content);\n } else {\n content.invisible = false;\n var visualColor = thisNode.getVisual('color', true);\n var normalStyle = getItemStyleNormal(itemStyleNormalModel);\n normalStyle.fill = visualColor;\n var emphasisStyle = getItemStyleEmphasis(itemStyleEmphasisModel);\n prepareText(normalStyle, emphasisStyle, visualColor, contentWidth, contentHeight);\n content.setStyle(normalStyle);\n graphic.setElementHoverStyle(content, emphasisStyle);\n }\n\n group.add(content);\n }\n\n function processInvisible(element) {\n // Delay invisible setting utill animation finished,\n // avoid element vanish suddenly before animation.\n !element.invisible && willInvisibleEls.push(element);\n }\n\n function prepareText(normalStyle, emphasisStyle, visualColor, width, height, upperLabelRect) {\n var defaultText = nodeModel.get('name');\n var normalLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_NORMAL : PATH_LABEL_NOAMAL);\n var emphasisLabelModel = nodeModel.getModel(upperLabelRect ? PATH_UPPERLABEL_EMPHASIS : PATH_LABEL_EMPHASIS);\n var isShow = normalLabelModel.getShallow('show');\n graphic.setLabelStyle(normalStyle, emphasisStyle, normalLabelModel, emphasisLabelModel, {\n defaultText: isShow ? defaultText : null,\n autoColor: visualColor,\n isRectText: true,\n labelFetcher: seriesModel,\n labelDataIndex: thisNode.dataIndex,\n labelProp: upperLabelRect ? 'upperLabel' : 'label'\n });\n addDrillDownIcon(normalStyle, upperLabelRect, thisLayout);\n addDrillDownIcon(emphasisStyle, upperLabelRect, thisLayout);\n upperLabelRect && (normalStyle.textRect = zrUtil.clone(upperLabelRect));\n normalStyle.truncate = isShow && normalLabelModel.get('ellipsis') ? {\n outerWidth: width,\n outerHeight: height,\n minChar: 2\n } : null;\n }\n\n function addDrillDownIcon(style, upperLabelRect, thisLayout) {\n var text = style.text;\n\n if (!upperLabelRect && thisLayout.isLeafRoot && text != null) {\n var iconChar = seriesModel.get('drillDownIcon', true);\n style.text = iconChar ? iconChar + ' ' + text : text;\n }\n }\n\n function giveGraphic(storageName, Ctor, depth, z) {\n var element = oldRawIndex != null && oldStorage[storageName][oldRawIndex];\n var lasts = lastsForAnimation[storageName];\n\n if (element) {\n // Remove from oldStorage\n oldStorage[storageName][oldRawIndex] = null;\n prepareAnimationWhenHasOld(lasts, element, storageName);\n } // If invisible and no old element, do not create new element (for optimizing).\n else if (!thisInvisible) {\n element = new Ctor({\n z: calculateZ(depth, z)\n });\n element.__tmDepth = depth;\n element.__tmStorageName = storageName;\n prepareAnimationWhenNoOld(lasts, element, storageName);\n } // Set to thisStorage\n\n\n return thisStorage[storageName][thisRawIndex] = element;\n }\n\n function prepareAnimationWhenHasOld(lasts, element, storageName) {\n var lastCfg = lasts[thisRawIndex] = {};\n lastCfg.old = storageName === 'nodeGroup' ? element.position.slice() : zrUtil.extend({}, element.shape);\n } // If a element is new, we need to find the animation start point carefully,\n // otherwise it will looks strange when 'zoomToNode'.\n\n\n function prepareAnimationWhenNoOld(lasts, element, storageName) {\n var lastCfg = lasts[thisRawIndex] = {};\n var parentNode = thisNode.parentNode;\n\n if (parentNode && (!reRoot || reRoot.direction === 'drillDown')) {\n var parentOldX = 0;\n var parentOldY = 0; // New nodes appear from right-bottom corner in 'zoomToNode' animation.\n // For convenience, get old bounding rect from background.\n\n var parentOldBg = lastsForAnimation.background[parentNode.getRawIndex()];\n\n if (!reRoot && parentOldBg && parentOldBg.old) {\n parentOldX = parentOldBg.old.width;\n parentOldY = parentOldBg.old.height;\n } // When no parent old shape found, its parent is new too,\n // so we can just use {x:0, y:0}.\n\n\n lastCfg.old = storageName === 'nodeGroup' ? [0, parentOldY] : {\n x: parentOldX,\n y: parentOldY,\n width: 0,\n height: 0\n };\n } // Fade in, user can be aware that these nodes are new.\n\n\n lastCfg.fadein = storageName !== 'nodeGroup';\n }\n} // We can not set all backgroud with the same z, Because the behaviour of\n// drill down and roll up differ background creation sequence from tree\n// hierarchy sequence, which cause that lowser background element overlap\n// upper ones. So we calculate z based on depth.\n// Moreover, we try to shrink down z interval to [0, 1] to avoid that\n// treemap with large z overlaps other components.\n\n\nfunction calculateZ(depth, zInLevel) {\n var zb = depth * Z_BASE + zInLevel;\n return (zb - 1) / zb;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar makeStyleMapper = require(\"../../model/mixin/makeStyleMapper\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar getBarItemStyle = makeStyleMapper([['fill', 'color'], ['stroke', 'borderColor'], ['lineWidth', 'borderWidth'], // Compatitable with 2\n['stroke', 'barBorderColor'], ['lineWidth', 'barBorderWidth'], ['opacity'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor']]);\nvar _default = {\n getBarItemStyle: function (excludes) {\n var style = getBarItemStyle(this, excludes);\n\n if (this.getBorderLineDash) {\n var lineDash = this.getBorderLineDash();\n lineDash && (style.lineDash = lineDash);\n }\n\n return style;\n }\n};\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\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 * payload: {\n * brushIndex: number, or,\n * brushId: string, or,\n * brushName: string,\n * globalRanges: Array\n * }\n */\necharts.registerAction({\n type: 'brush',\n event: 'brush'\n /*, update: 'updateView' */\n\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'brush',\n query: payload\n }, function (brushModel) {\n brushModel.setAreas(payload.areas);\n });\n});\n/**\n * payload: {\n * brushComponents: [\n * {\n * brushId,\n * brushIndex,\n * brushName,\n * series: [\n * {\n * seriesId,\n * seriesIndex,\n * seriesName,\n * rawIndices: [21, 34, ...]\n * },\n * ...\n * ]\n * },\n * ...\n * ]\n * }\n */\n\necharts.registerAction({\n type: 'brushSelect',\n event: 'brushSelected',\n update: 'none'\n}, function () {});\necharts.registerAction({\n type: 'brushEnd',\n event: 'brushEnd',\n update: 'none'\n}, function () {});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// FIXME emphasis label position is not same with normal label position\nvar RADIAN = Math.PI / 180;\n\nfunction adjustSingleSide(list, cx, cy, r, dir, viewWidth, viewHeight, viewLeft, viewTop, farthestX) {\n list.sort(function (a, b) {\n return a.y - b.y;\n });\n\n function shiftDown(start, end, delta, dir) {\n for (var j = start; j < end; j++) {\n if (list[j].y + delta > viewTop + viewHeight) {\n break;\n }\n\n list[j].y += delta;\n\n if (j > start && j + 1 < end && list[j + 1].y > list[j].y + list[j].height) {\n shiftUp(j, delta / 2);\n return;\n }\n }\n\n shiftUp(end - 1, delta / 2);\n }\n\n function shiftUp(end, delta) {\n for (var j = end; j >= 0; j--) {\n if (list[j].y - delta < viewTop) {\n break;\n }\n\n list[j].y -= delta;\n\n if (j > 0 && list[j].y > list[j - 1].y + list[j - 1].height) {\n break;\n }\n }\n }\n\n function changeX(list, isDownList, cx, cy, r, dir) {\n var lastDeltaX = dir > 0 ? isDownList // right-side\n ? Number.MAX_VALUE // down\n : 0 // up\n : isDownList // left-side\n ? Number.MAX_VALUE // down\n : 0; // up\n\n for (var i = 0, l = list.length; i < l; i++) {\n if (list[i].labelAlignTo !== 'none') {\n continue;\n }\n\n var deltaY = Math.abs(list[i].y - cy);\n var length = list[i].len;\n var length2 = list[i].len2;\n var deltaX = deltaY < r + length ? Math.sqrt((r + length + length2) * (r + length + length2) - deltaY * deltaY) : Math.abs(list[i].x - cx);\n\n if (isDownList && deltaX >= lastDeltaX) {\n // right-down, left-down\n deltaX = lastDeltaX - 10;\n }\n\n if (!isDownList && deltaX <= lastDeltaX) {\n // right-up, left-up\n deltaX = lastDeltaX + 10;\n }\n\n list[i].x = cx + deltaX * dir;\n lastDeltaX = deltaX;\n }\n }\n\n var lastY = 0;\n var delta;\n var len = list.length;\n var upList = [];\n var downList = [];\n\n for (var i = 0; i < len; i++) {\n if (list[i].position === 'outer' && list[i].labelAlignTo === 'labelLine') {\n var dx = list[i].x - farthestX;\n list[i].linePoints[1][0] += dx;\n list[i].x = farthestX;\n }\n\n delta = list[i].y - lastY;\n\n if (delta < 0) {\n shiftDown(i, len, -delta, dir);\n }\n\n lastY = list[i].y + list[i].height;\n }\n\n if (viewHeight - lastY < 0) {\n shiftUp(len - 1, lastY - viewHeight);\n }\n\n for (var i = 0; i < len; i++) {\n if (list[i].y >= cy) {\n downList.push(list[i]);\n } else {\n upList.push(list[i]);\n }\n }\n\n changeX(upList, false, cx, cy, r, dir);\n changeX(downList, true, cx, cy, r, dir);\n}\n\nfunction avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop) {\n var leftList = [];\n var rightList = [];\n var leftmostX = Number.MAX_VALUE;\n var rightmostX = -Number.MAX_VALUE;\n\n for (var i = 0; i < labelLayoutList.length; i++) {\n if (isPositionCenter(labelLayoutList[i])) {\n continue;\n }\n\n if (labelLayoutList[i].x < cx) {\n leftmostX = Math.min(leftmostX, labelLayoutList[i].x);\n leftList.push(labelLayoutList[i]);\n } else {\n rightmostX = Math.max(rightmostX, labelLayoutList[i].x);\n rightList.push(labelLayoutList[i]);\n }\n }\n\n adjustSingleSide(rightList, cx, cy, r, 1, viewWidth, viewHeight, viewLeft, viewTop, rightmostX);\n adjustSingleSide(leftList, cx, cy, r, -1, viewWidth, viewHeight, viewLeft, viewTop, leftmostX);\n\n for (var i = 0; i < labelLayoutList.length; i++) {\n var layout = labelLayoutList[i];\n\n if (isPositionCenter(layout)) {\n continue;\n }\n\n var linePoints = layout.linePoints;\n\n if (linePoints) {\n var isAlignToEdge = layout.labelAlignTo === 'edge';\n var realTextWidth = layout.textRect.width;\n var targetTextWidth;\n\n if (isAlignToEdge) {\n if (layout.x < cx) {\n targetTextWidth = linePoints[2][0] - layout.labelDistance - viewLeft - layout.labelMargin;\n } else {\n targetTextWidth = viewLeft + viewWidth - layout.labelMargin - linePoints[2][0] - layout.labelDistance;\n }\n } else {\n if (layout.x < cx) {\n targetTextWidth = layout.x - viewLeft - layout.bleedMargin;\n } else {\n targetTextWidth = viewLeft + viewWidth - layout.x - layout.bleedMargin;\n }\n }\n\n if (targetTextWidth < layout.textRect.width) {\n layout.text = textContain.truncateText(layout.text, targetTextWidth, layout.font);\n\n if (layout.labelAlignTo === 'edge') {\n realTextWidth = textContain.getWidth(layout.text, layout.font);\n }\n }\n\n var dist = linePoints[1][0] - linePoints[2][0];\n\n if (isAlignToEdge) {\n if (layout.x < cx) {\n linePoints[2][0] = viewLeft + layout.labelMargin + realTextWidth + layout.labelDistance;\n } else {\n linePoints[2][0] = viewLeft + viewWidth - layout.labelMargin - realTextWidth - layout.labelDistance;\n }\n } else {\n if (layout.x < cx) {\n linePoints[2][0] = layout.x + layout.labelDistance;\n } else {\n linePoints[2][0] = layout.x - layout.labelDistance;\n }\n\n linePoints[1][0] = linePoints[2][0] + dist;\n }\n\n linePoints[1][1] = linePoints[2][1] = layout.y;\n }\n }\n}\n\nfunction isPositionCenter(layout) {\n // Not change x for center label\n return layout.position === 'center';\n}\n\nfunction _default(seriesModel, r, viewWidth, viewHeight, viewLeft, viewTop) {\n var data = seriesModel.getData();\n var labelLayoutList = [];\n var cx;\n var cy;\n var hasLabelRotate = false;\n var minShowLabelRadian = (seriesModel.get('minShowLabelAngle') || 0) * RADIAN;\n data.each(function (idx) {\n var layout = data.getItemLayout(idx);\n var itemModel = data.getItemModel(idx);\n var labelModel = itemModel.getModel('label'); // Use position in normal or emphasis\n\n var labelPosition = labelModel.get('position') || itemModel.get('emphasis.label.position');\n var labelDistance = labelModel.get('distanceToLabelLine');\n var labelAlignTo = labelModel.get('alignTo');\n var labelMargin = parsePercent(labelModel.get('margin'), viewWidth);\n var bleedMargin = labelModel.get('bleedMargin');\n var font = labelModel.getFont();\n var labelLineModel = itemModel.getModel('labelLine');\n var labelLineLen = labelLineModel.get('length');\n labelLineLen = parsePercent(labelLineLen, viewWidth);\n var labelLineLen2 = labelLineModel.get('length2');\n labelLineLen2 = parsePercent(labelLineLen2, viewWidth);\n\n if (layout.angle < minShowLabelRadian) {\n return;\n }\n\n var midAngle = (layout.startAngle + layout.endAngle) / 2;\n var dx = Math.cos(midAngle);\n var dy = Math.sin(midAngle);\n var textX;\n var textY;\n var linePoints;\n var textAlign;\n cx = layout.cx;\n cy = layout.cy;\n var text = seriesModel.getFormattedLabel(idx, 'normal') || data.getName(idx);\n var textRect = textContain.getBoundingRect(text, font, textAlign, 'top');\n var isLabelInside = labelPosition === 'inside' || labelPosition === 'inner';\n\n if (labelPosition === 'center') {\n textX = layout.cx;\n textY = layout.cy;\n textAlign = 'center';\n } else {\n var x1 = (isLabelInside ? (layout.r + layout.r0) / 2 * dx : layout.r * dx) + cx;\n var y1 = (isLabelInside ? (layout.r + layout.r0) / 2 * dy : layout.r * dy) + cy;\n textX = x1 + dx * 3;\n textY = y1 + dy * 3;\n\n if (!isLabelInside) {\n // For roseType\n var x2 = x1 + dx * (labelLineLen + r - layout.r);\n var y2 = y1 + dy * (labelLineLen + r - layout.r);\n var x3 = x2 + (dx < 0 ? -1 : 1) * labelLineLen2;\n var y3 = y2;\n\n if (labelAlignTo === 'edge') {\n // Adjust textX because text align of edge is opposite\n textX = dx < 0 ? viewLeft + labelMargin : viewLeft + viewWidth - labelMargin;\n } else {\n textX = x3 + (dx < 0 ? -labelDistance : labelDistance);\n }\n\n textY = y3;\n linePoints = [[x1, y1], [x2, y2], [x3, y3]];\n }\n\n textAlign = isLabelInside ? 'center' : labelAlignTo === 'edge' ? dx > 0 ? 'right' : 'left' : dx > 0 ? 'left' : 'right';\n }\n\n var labelRotate;\n var rotate = labelModel.get('rotate');\n\n if (typeof rotate === 'number') {\n labelRotate = rotate * (Math.PI / 180);\n } else {\n labelRotate = rotate ? dx < 0 ? -midAngle + Math.PI : -midAngle : 0;\n }\n\n hasLabelRotate = !!labelRotate;\n layout.label = {\n x: textX,\n y: textY,\n position: labelPosition,\n height: textRect.height,\n len: labelLineLen,\n len2: labelLineLen2,\n linePoints: linePoints,\n textAlign: textAlign,\n verticalAlign: 'middle',\n rotation: labelRotate,\n inside: isLabelInside,\n labelDistance: labelDistance,\n labelAlignTo: labelAlignTo,\n labelMargin: labelMargin,\n bleedMargin: bleedMargin,\n textRect: textRect,\n text: text,\n font: font\n }; // Not layout the inside label\n\n if (!isLabelInside) {\n labelLayoutList.push(layout.label);\n }\n });\n\n if (!hasLabelRotate && seriesModel.get('avoidLabelOverlap')) {\n avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLeft, viewTop);\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Component = require(\"../../model/Component\");\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*/\nComponent.registerSubTypeDefaulter('visualMap', function (option) {\n // Compatible with ec2, when splitNumber === 0, continuous visualMap will be used.\n return !option.categories && (!(option.pieces ? option.pieces.length > 0 : option.splitNumber > 0) || option.calculable) ? 'continuous' : 'piecewise';\n});","var Definable = require(\"./Definable\");\n\nvar zrUtil = require(\"../../core/util\");\n\n/**\n * @file Manages SVG shadow elements.\n * @author Zhang Wenli\n */\n\n/**\n * Manages SVG shadow elements.\n *\n * @class\n * @extends Definable\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n */\nfunction ShadowManager(zrId, svgRoot) {\n Definable.call(this, zrId, svgRoot, ['filter'], '__filter_in_use__', '_shadowDom');\n}\n\nzrUtil.inherits(ShadowManager, Definable);\n/**\n * Create new shadow DOM for fill or stroke if not exist,\n * but will not update shadow if exists.\n *\n * @param {SvgElement} svgElement SVG element to paint\n * @param {Displayable} displayable zrender displayable element\n */\n\nShadowManager.prototype.addWithoutUpdate = function (svgElement, displayable) {\n if (displayable && hasShadow(displayable.style)) {\n // Create dom in if not exists\n var dom;\n\n if (displayable._shadowDom) {\n // Gradient exists\n dom = displayable._shadowDom;\n var defs = this.getDefs(true);\n\n if (!defs.contains(displayable._shadowDom)) {\n // _shadowDom is no longer in defs, recreate\n this.addDom(dom);\n }\n } else {\n // New dom\n dom = this.add(displayable);\n }\n\n this.markUsed(displayable);\n var id = dom.getAttribute('id');\n svgElement.style.filter = 'url(#' + id + ')';\n }\n};\n/**\n * Add a new shadow tag in \n *\n * @param {Displayable} displayable zrender displayable element\n * @return {SVGFilterElement} created DOM\n */\n\n\nShadowManager.prototype.add = function (displayable) {\n var dom = this.createElement('filter'); // Set dom id with shadow id, since each shadow instance\n // will have no more than one dom element.\n // id may exists before for those dirty elements, in which case\n // id should remain the same, and other attributes should be\n // updated.\n\n displayable._shadowDomId = displayable._shadowDomId || this.nextId++;\n dom.setAttribute('id', 'zr' + this._zrId + '-shadow-' + displayable._shadowDomId);\n this.updateDom(displayable, dom);\n this.addDom(dom);\n return dom;\n};\n/**\n * Update shadow.\n *\n * @param {Displayable} displayable zrender displayable element\n */\n\n\nShadowManager.prototype.update = function (svgElement, displayable) {\n var style = displayable.style;\n\n if (hasShadow(style)) {\n var that = this;\n Definable.prototype.update.call(this, displayable, function () {\n that.updateDom(displayable, displayable._shadowDom);\n });\n } else {\n // Remove shadow\n this.remove(svgElement, displayable);\n }\n};\n/**\n * Remove DOM and clear parent filter\n */\n\n\nShadowManager.prototype.remove = function (svgElement, displayable) {\n if (displayable._shadowDomId != null) {\n this.removeDom(svgElement);\n svgElement.style.filter = '';\n }\n};\n/**\n * Update shadow dom\n *\n * @param {Displayable} displayable zrender displayable element\n * @param {SVGFilterElement} dom DOM to update\n */\n\n\nShadowManager.prototype.updateDom = function (displayable, dom) {\n var domChild = dom.getElementsByTagName('feDropShadow');\n\n if (domChild.length === 0) {\n domChild = this.createElement('feDropShadow');\n } else {\n domChild = domChild[0];\n }\n\n var style = displayable.style;\n var scaleX = displayable.scale ? displayable.scale[0] || 1 : 1;\n var scaleY = displayable.scale ? displayable.scale[1] || 1 : 1; // TODO: textBoxShadowBlur is not supported yet\n\n var offsetX;\n var offsetY;\n var blur;\n var color;\n\n if (style.shadowBlur || style.shadowOffsetX || style.shadowOffsetY) {\n offsetX = style.shadowOffsetX || 0;\n offsetY = style.shadowOffsetY || 0;\n blur = style.shadowBlur;\n color = style.shadowColor;\n } else if (style.textShadowBlur) {\n offsetX = style.textShadowOffsetX || 0;\n offsetY = style.textShadowOffsetY || 0;\n blur = style.textShadowBlur;\n color = style.textShadowColor;\n } else {\n // Remove shadow\n this.removeDom(dom, style);\n return;\n }\n\n domChild.setAttribute('dx', offsetX / scaleX);\n domChild.setAttribute('dy', offsetY / scaleY);\n domChild.setAttribute('flood-color', color); // Divide by two here so that it looks the same as in canvas\n // See: https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-shadowblur\n\n var stdDx = blur / 2 / scaleX;\n var stdDy = blur / 2 / scaleY;\n var stdDeviation = stdDx + ' ' + stdDy;\n domChild.setAttribute('stdDeviation', stdDeviation); // Fix filter clipping problem\n\n dom.setAttribute('x', '-100%');\n dom.setAttribute('y', '-100%');\n dom.setAttribute('width', Math.ceil(blur / 2 * 200) + '%');\n dom.setAttribute('height', Math.ceil(blur / 2 * 200) + '%');\n dom.appendChild(domChild); // Store dom element in shadow, to avoid creating multiple\n // dom instances for the same shadow element\n\n displayable._shadowDom = dom;\n};\n/**\n * Mark a single shadow to be used\n *\n * @param {Displayable} displayable displayable element\n */\n\n\nShadowManager.prototype.markUsed = function (displayable) {\n if (displayable._shadowDom) {\n Definable.prototype.markUsed.call(this, displayable._shadowDom);\n }\n};\n\nfunction hasShadow(style) {\n // TODO: textBoxShadowBlur is not supported yet\n return style && (style.shadowBlur || style.shadowOffsetX || style.shadowOffsetY || style.textShadowBlur || style.textShadowOffsetX || style.textShadowOffsetY);\n}\n\nvar _default = ShadowManager;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar AxisBuilder = require(\"./AxisBuilder\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar singleAxisHelper = require(\"../../coord/single/singleAxisHelper\");\n\nvar AxisView = require(\"./AxisView\");\n\nvar _axisSplitHelper = require(\"./axisSplitHelper\");\n\nvar rectCoordAxisBuildSplitArea = _axisSplitHelper.rectCoordAxisBuildSplitArea;\nvar rectCoordAxisHandleRemove = _axisSplitHelper.rectCoordAxisHandleRemove;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitArea', 'splitLine'];\nvar SingleAxisView = AxisView.extend({\n type: 'singleAxis',\n axisPointerClass: 'SingleAxisPointer',\n render: function (axisModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n var layout = singleAxisHelper.layout(axisModel);\n var axisBuilder = new AxisBuilder(axisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n group.add(this._axisGroup);\n group.add(axisBuilder.getGroup());\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get(name + '.show')) {\n this['_' + name](axisModel);\n }\n }, this);\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n SingleAxisView.superCall(this, 'render', axisModel, ecModel, api, payload);\n },\n remove: function () {\n rectCoordAxisHandleRemove(this);\n },\n _splitLine: function (axisModel) {\n var axis = axisModel.axis;\n\n if (axis.scale.isBlank()) {\n return;\n }\n\n var splitLineModel = axisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineWidth = lineStyleModel.get('width');\n var lineColors = lineStyleModel.get('color');\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var gridRect = axisModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var splitLines = [];\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\n var p1 = [];\n var p2 = [];\n\n for (var i = 0; i < ticksCoords.length; ++i) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic.Line({\n subPixelOptimize: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: {\n lineWidth: lineWidth\n },\n silent: true\n }));\n }\n\n for (var i = 0; i < splitLines.length; ++i) {\n this.group.add(graphic.mergePath(splitLines[i], {\n style: {\n stroke: lineColors[i % lineColors.length],\n lineDash: lineStyleModel.getLineDash(lineWidth),\n lineWidth: lineWidth\n },\n silent: true\n }));\n }\n },\n _splitArea: function (axisModel) {\n rectCoordAxisBuildSplitArea(this, this._axisGroup, axisModel, axisModel);\n }\n});\nvar _default = SingleAxisView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar _whiskerBoxCommon = require(\"../helper/whiskerBoxCommon\");\n\nvar seriesModelMixin = _whiskerBoxCommon.seriesModelMixin;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar CandlestickSeries = SeriesModel.extend({\n type: 'series.candlestick',\n dependencies: ['xAxis', 'yAxis', 'grid'],\n\n /**\n * @readOnly\n */\n defaultValueDimensions: [{\n name: 'open',\n defaultTooltip: true\n }, {\n name: 'close',\n defaultTooltip: true\n }, {\n name: 'lowest',\n defaultTooltip: true\n }, {\n name: 'highest',\n defaultTooltip: true\n }],\n\n /**\n * @type {Array.}\n * @readOnly\n */\n dimensions: null,\n\n /**\n * @override\n */\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n hoverAnimation: true,\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n layout: null,\n // 'horizontal' or 'vertical'\n clip: true,\n itemStyle: {\n color: '#c23531',\n // 阳线 positive\n color0: '#314656',\n // 阴线 negative '#c23531', '#314656'\n borderWidth: 1,\n // FIXME\n // ec2中使用的是lineStyle.color 和 lineStyle.color0\n borderColor: '#c23531',\n borderColor0: '#314656'\n },\n emphasis: {\n itemStyle: {\n borderWidth: 2\n }\n },\n barMaxWidth: null,\n barMinWidth: null,\n barWidth: null,\n large: true,\n largeThreshold: 600,\n progressive: 3e3,\n progressiveThreshold: 1e4,\n progressiveChunkMode: 'mod',\n animationUpdate: false,\n animationEasing: 'linear',\n animationDuration: 300\n },\n\n /**\n * Get dimension for shadow in dataZoom\n * @return {string} dimension name\n */\n getShadowDim: function () {\n return 'open';\n },\n brushSelector: function (dataIndex, data, selectors) {\n var itemLayout = data.getItemLayout(dataIndex);\n return itemLayout && selectors.rect(itemLayout.brushRect);\n }\n});\nzrUtil.mixin(CandlestickSeries, seriesModelMixin, true);\nvar _default = CandlestickSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar modelUtil = require(\"../../util/model\");\n\nvar brushHelper = require(\"./brushHelper\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar each = zrUtil.each;\nvar indexOf = zrUtil.indexOf;\nvar curry = zrUtil.curry;\nvar COORD_CONVERTS = ['dataToPoint', 'pointToData']; // FIXME\n// how to genarialize to more coordinate systems.\n\nvar INCLUDE_FINDER_MAIN_TYPES = ['grid', 'xAxis', 'yAxis', 'geo', 'graph', 'polar', 'radiusAxis', 'angleAxis', 'bmap'];\n/**\n * [option in constructor]:\n * {\n * Index/Id/Name of geo, xAxis, yAxis, grid: See util/model#parseFinder.\n * }\n *\n *\n * [targetInfo]:\n *\n * There can be multiple axes in a single targetInfo. Consider the case\n * of `grid` component, a targetInfo represents a grid which contains one or more\n * cartesian and one or more axes. And consider the case of parallel system,\n * which has multiple axes in a coordinate system.\n * Can be {\n * panelId: ...,\n * coordSys: ,\n * coordSyses: all cartesians.\n * gridModel: \n * xAxes: correspond to coordSyses on index\n * yAxes: correspond to coordSyses on index\n * }\n * or {\n * panelId: ...,\n * coordSys: \n * coordSyses: []\n * geoModel: \n * }\n *\n *\n * [panelOpt]:\n *\n * Make from targetInfo. Input to BrushController.\n * {\n * panelId: ...,\n * rect: ...\n * }\n *\n *\n * [area]:\n *\n * Generated by BrushController or user input.\n * {\n * panelId: Used to locate coordInfo directly. If user inpput, no panelId.\n * brushType: determine how to convert to/from coord('rect' or 'polygon' or 'lineX/Y').\n * Index/Id/Name of geo, xAxis, yAxis, grid: See util/model#parseFinder.\n * range: pixel range.\n * coordRange: representitive coord range (the first one of coordRanges).\n * coordRanges: coord ranges, used in multiple cartesian in one grid.\n * }\n */\n\n/**\n * @param {Object} option contains Index/Id/Name of xAxis/yAxis/geo/grid\n * Each can be {number|Array.}. like: {xAxisIndex: [3, 4]}\n * @param {module:echarts/model/Global} ecModel\n * @param {Object} [opt]\n * @param {Array.} [opt.include] include coordinate system types.\n */\n\nfunction BrushTargetManager(option, ecModel, opt) {\n /**\n * @private\n * @type {Array.}\n */\n var targetInfoList = this._targetInfoList = [];\n var info = {};\n var foundCpts = parseFinder(ecModel, option);\n each(targetInfoBuilders, function (builder, type) {\n if (!opt || !opt.include || indexOf(opt.include, type) >= 0) {\n builder(foundCpts, targetInfoList, info);\n }\n });\n}\n\nvar proto = BrushTargetManager.prototype;\n\nproto.setOutputRanges = function (areas, ecModel) {\n this.matchOutputRanges(areas, ecModel, function (area, coordRange, coordSys) {\n (area.coordRanges || (area.coordRanges = [])).push(coordRange); // area.coordRange is the first of area.coordRanges\n\n if (!area.coordRange) {\n area.coordRange = coordRange; // In 'category' axis, coord to pixel is not reversible, so we can not\n // rebuild range by coordRange accrately, which may bring trouble when\n // brushing only one item. So we use __rangeOffset to rebuilding range\n // by coordRange. And this it only used in brush component so it is no\n // need to be adapted to coordRanges.\n\n var result = coordConvert[area.brushType](0, coordSys, coordRange);\n area.__rangeOffset = {\n offset: diffProcessor[area.brushType](result.values, area.range, [1, 1]),\n xyMinMax: result.xyMinMax\n };\n }\n });\n};\n\nproto.matchOutputRanges = function (areas, ecModel, cb) {\n each(areas, function (area) {\n var targetInfo = this.findTargetInfo(area, ecModel);\n\n if (targetInfo && targetInfo !== true) {\n zrUtil.each(targetInfo.coordSyses, function (coordSys) {\n var result = coordConvert[area.brushType](1, coordSys, area.range);\n cb(area, result.values, coordSys, ecModel);\n });\n }\n }, this);\n};\n\nproto.setInputRanges = function (areas, ecModel) {\n each(areas, function (area) {\n var targetInfo = this.findTargetInfo(area, ecModel);\n area.range = area.range || []; // convert coordRange to global range and set panelId.\n\n if (targetInfo && targetInfo !== true) {\n area.panelId = targetInfo.panelId; // (1) area.range shoule always be calculate from coordRange but does\n // not keep its original value, for the sake of the dataZoom scenario,\n // where area.coordRange remains unchanged but area.range may be changed.\n // (2) Only support converting one coordRange to pixel range in brush\n // component. So do not consider `coordRanges`.\n // (3) About __rangeOffset, see comment above.\n\n var result = coordConvert[area.brushType](0, targetInfo.coordSys, area.coordRange);\n var rangeOffset = area.__rangeOffset;\n area.range = rangeOffset ? diffProcessor[area.brushType](result.values, rangeOffset.offset, getScales(result.xyMinMax, rangeOffset.xyMinMax)) : result.values;\n }\n }, this);\n};\n\nproto.makePanelOpts = function (api, getDefaultBrushType) {\n return zrUtil.map(this._targetInfoList, function (targetInfo) {\n var rect = targetInfo.getPanelRect();\n return {\n panelId: targetInfo.panelId,\n defaultBrushType: getDefaultBrushType && getDefaultBrushType(targetInfo),\n clipPath: brushHelper.makeRectPanelClipPath(rect),\n isTargetByCursor: brushHelper.makeRectIsTargetByCursor(rect, api, targetInfo.coordSysModel),\n getLinearBrushOtherExtent: brushHelper.makeLinearBrushOtherExtent(rect)\n };\n });\n};\n\nproto.controlSeries = function (area, seriesModel, ecModel) {\n // Check whether area is bound in coord, and series do not belong to that coord.\n // If do not do this check, some brush (like lineX) will controll all axes.\n var targetInfo = this.findTargetInfo(area, ecModel);\n return targetInfo === true || targetInfo && indexOf(targetInfo.coordSyses, seriesModel.coordinateSystem) >= 0;\n};\n/**\n * If return Object, a coord found.\n * If reutrn true, global found.\n * Otherwise nothing found.\n *\n * @param {Object} area\n * @param {Array} targetInfoList\n * @return {Object|boolean}\n */\n\n\nproto.findTargetInfo = function (area, ecModel) {\n var targetInfoList = this._targetInfoList;\n var foundCpts = parseFinder(ecModel, area);\n\n for (var i = 0; i < targetInfoList.length; i++) {\n var targetInfo = targetInfoList[i];\n var areaPanelId = area.panelId;\n\n if (areaPanelId) {\n if (targetInfo.panelId === areaPanelId) {\n return targetInfo;\n }\n } else {\n for (var i = 0; i < targetInfoMatchers.length; i++) {\n if (targetInfoMatchers[i](foundCpts, targetInfo)) {\n return targetInfo;\n }\n }\n }\n }\n\n return true;\n};\n\nfunction formatMinMax(minMax) {\n minMax[0] > minMax[1] && minMax.reverse();\n return minMax;\n}\n\nfunction parseFinder(ecModel, option) {\n return modelUtil.parseFinder(ecModel, option, {\n includeMainTypes: INCLUDE_FINDER_MAIN_TYPES\n });\n}\n\nvar targetInfoBuilders = {\n grid: function (foundCpts, targetInfoList) {\n var xAxisModels = foundCpts.xAxisModels;\n var yAxisModels = foundCpts.yAxisModels;\n var gridModels = foundCpts.gridModels; // Remove duplicated.\n\n var gridModelMap = zrUtil.createHashMap();\n var xAxesHas = {};\n var yAxesHas = {};\n\n if (!xAxisModels && !yAxisModels && !gridModels) {\n return;\n }\n\n each(xAxisModels, function (axisModel) {\n var gridModel = axisModel.axis.grid.model;\n gridModelMap.set(gridModel.id, gridModel);\n xAxesHas[gridModel.id] = true;\n });\n each(yAxisModels, function (axisModel) {\n var gridModel = axisModel.axis.grid.model;\n gridModelMap.set(gridModel.id, gridModel);\n yAxesHas[gridModel.id] = true;\n });\n each(gridModels, function (gridModel) {\n gridModelMap.set(gridModel.id, gridModel);\n xAxesHas[gridModel.id] = true;\n yAxesHas[gridModel.id] = true;\n });\n gridModelMap.each(function (gridModel) {\n var grid = gridModel.coordinateSystem;\n var cartesians = [];\n each(grid.getCartesians(), function (cartesian, index) {\n if (indexOf(xAxisModels, cartesian.getAxis('x').model) >= 0 || indexOf(yAxisModels, cartesian.getAxis('y').model) >= 0) {\n cartesians.push(cartesian);\n }\n });\n targetInfoList.push({\n panelId: 'grid--' + gridModel.id,\n gridModel: gridModel,\n coordSysModel: gridModel,\n // Use the first one as the representitive coordSys.\n coordSys: cartesians[0],\n coordSyses: cartesians,\n getPanelRect: panelRectBuilder.grid,\n xAxisDeclared: xAxesHas[gridModel.id],\n yAxisDeclared: yAxesHas[gridModel.id]\n });\n });\n },\n geo: function (foundCpts, targetInfoList) {\n each(foundCpts.geoModels, function (geoModel) {\n var coordSys = geoModel.coordinateSystem;\n targetInfoList.push({\n panelId: 'geo--' + geoModel.id,\n geoModel: geoModel,\n coordSysModel: geoModel,\n coordSys: coordSys,\n coordSyses: [coordSys],\n getPanelRect: panelRectBuilder.geo\n });\n });\n }\n};\nvar targetInfoMatchers = [// grid\nfunction (foundCpts, targetInfo) {\n var xAxisModel = foundCpts.xAxisModel;\n var yAxisModel = foundCpts.yAxisModel;\n var gridModel = foundCpts.gridModel;\n !gridModel && xAxisModel && (gridModel = xAxisModel.axis.grid.model);\n !gridModel && yAxisModel && (gridModel = yAxisModel.axis.grid.model);\n return gridModel && gridModel === targetInfo.gridModel;\n}, // geo\nfunction (foundCpts, targetInfo) {\n var geoModel = foundCpts.geoModel;\n return geoModel && geoModel === targetInfo.geoModel;\n}];\nvar panelRectBuilder = {\n grid: function () {\n // grid is not Transformable.\n return this.coordSys.grid.getRect().clone();\n },\n geo: function () {\n var coordSys = this.coordSys;\n var rect = coordSys.getBoundingRect().clone(); // geo roam and zoom transform\n\n rect.applyTransform(graphic.getTransform(coordSys));\n return rect;\n }\n};\nvar coordConvert = {\n lineX: curry(axisConvert, 0),\n lineY: curry(axisConvert, 1),\n rect: function (to, coordSys, rangeOrCoordRange) {\n var xminymin = coordSys[COORD_CONVERTS[to]]([rangeOrCoordRange[0][0], rangeOrCoordRange[1][0]]);\n var xmaxymax = coordSys[COORD_CONVERTS[to]]([rangeOrCoordRange[0][1], rangeOrCoordRange[1][1]]);\n var values = [formatMinMax([xminymin[0], xmaxymax[0]]), formatMinMax([xminymin[1], xmaxymax[1]])];\n return {\n values: values,\n xyMinMax: values\n };\n },\n polygon: function (to, coordSys, rangeOrCoordRange) {\n var xyMinMax = [[Infinity, -Infinity], [Infinity, -Infinity]];\n var values = zrUtil.map(rangeOrCoordRange, function (item) {\n var p = coordSys[COORD_CONVERTS[to]](item);\n xyMinMax[0][0] = Math.min(xyMinMax[0][0], p[0]);\n xyMinMax[1][0] = Math.min(xyMinMax[1][0], p[1]);\n xyMinMax[0][1] = Math.max(xyMinMax[0][1], p[0]);\n xyMinMax[1][1] = Math.max(xyMinMax[1][1], p[1]);\n return p;\n });\n return {\n values: values,\n xyMinMax: xyMinMax\n };\n }\n};\n\nfunction axisConvert(axisNameIndex, to, coordSys, rangeOrCoordRange) {\n var axis = coordSys.getAxis(['x', 'y'][axisNameIndex]);\n var values = formatMinMax(zrUtil.map([0, 1], function (i) {\n return to ? axis.coordToData(axis.toLocalCoord(rangeOrCoordRange[i])) : axis.toGlobalCoord(axis.dataToCoord(rangeOrCoordRange[i]));\n }));\n var xyMinMax = [];\n xyMinMax[axisNameIndex] = values;\n xyMinMax[1 - axisNameIndex] = [NaN, NaN];\n return {\n values: values,\n xyMinMax: xyMinMax\n };\n}\n\nvar diffProcessor = {\n lineX: curry(axisDiffProcessor, 0),\n lineY: curry(axisDiffProcessor, 1),\n rect: function (values, refer, scales) {\n return [[values[0][0] - scales[0] * refer[0][0], values[0][1] - scales[0] * refer[0][1]], [values[1][0] - scales[1] * refer[1][0], values[1][1] - scales[1] * refer[1][1]]];\n },\n polygon: function (values, refer, scales) {\n return zrUtil.map(values, function (item, idx) {\n return [item[0] - scales[0] * refer[idx][0], item[1] - scales[1] * refer[idx][1]];\n });\n }\n};\n\nfunction axisDiffProcessor(axisNameIndex, values, refer, scales) {\n return [values[0] - scales[axisNameIndex] * refer[0], values[1] - scales[axisNameIndex] * refer[1]];\n} // We have to process scale caused by dataZoom manually,\n// although it might be not accurate.\n\n\nfunction getScales(xyMinMaxCurr, xyMinMaxOrigin) {\n var sizeCurr = getSize(xyMinMaxCurr);\n var sizeOrigin = getSize(xyMinMaxOrigin);\n var scales = [sizeCurr[0] / sizeOrigin[0], sizeCurr[1] / sizeOrigin[1]];\n isNaN(scales[0]) && (scales[0] = 1);\n isNaN(scales[1]) && (scales[1] = 1);\n return scales;\n}\n\nfunction getSize(xyMinMax) {\n return xyMinMax ? [xyMinMax[0][1] - xyMinMax[0][0], xyMinMax[1][1] - xyMinMax[1][0]] : [NaN, NaN];\n}\n\nvar _default = BrushTargetManager;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nrequire(\"../helper/focusNodeAdjacencyAction\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerAction({\n type: 'dragNode',\n event: 'dragnode',\n // here can only use 'update' now, other value is not support in echarts.\n update: 'update'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sankey',\n query: payload\n }, function (seriesModel) {\n seriesModel.setNodePosition(payload.dataIndex, [payload.localX, payload.localY]);\n });\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar _roamHelper = require(\"../../action/roamHelper\");\n\nvar updateCenterAndZoom = _roamHelper.updateCenterAndZoom;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerAction({\n type: 'treeExpandAndCollapse',\n event: 'treeExpandAndCollapse',\n update: 'update'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'tree',\n query: payload\n }, function (seriesModel) {\n var dataIndex = payload.dataIndex;\n var tree = seriesModel.getData().tree;\n var node = tree.getNodeByDataIndex(dataIndex);\n node.isExpand = !node.isExpand;\n });\n});\necharts.registerAction({\n type: 'treeRoam',\n event: 'treeRoam',\n // Here we set 'none' instead of 'update', because roam action\n // just need to update the transform matrix without having to recalculate\n // the layout. So don't need to go through the whole update process, such\n // as 'dataPrcocess', 'coordSystemUpdate', 'layout' and so on.\n update: 'none'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'tree',\n query: payload\n }, function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var res = updateCenterAndZoom(coordSys, payload);\n seriesModel.setCenter && seriesModel.setCenter(res.center);\n seriesModel.setZoom && seriesModel.setZoom(res.zoom);\n });\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nrequire(\"./pie/PieSeries\");\n\nrequire(\"./pie/PieView\");\n\nvar createDataSelectAction = require(\"../action/createDataSelectAction\");\n\nvar dataColor = require(\"../visual/dataColor\");\n\nvar pieLayout = require(\"./pie/pieLayout\");\n\nvar dataFilter = require(\"../processor/dataFilter\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\ncreateDataSelectAction('pie', [{\n type: 'pieToggleSelect',\n event: 'pieselectchanged',\n method: 'toggleSelected'\n}, {\n type: 'pieSelect',\n event: 'pieselected',\n method: 'select'\n}, {\n type: 'pieUnSelect',\n event: 'pieunselected',\n method: 'unSelect'\n}]);\necharts.registerVisual(dataColor('pie'));\necharts.registerLayout(zrUtil.curry(pieLayout, 'pie'));\necharts.registerProcessor(dataFilter('pie'));","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _graphic = require(\"../graphic\");\n\nvar extendShape = _graphic.extendShape;\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 * Sausage: similar to sector, but have half circle on both sides\n * @public\n */\nvar _default = extendShape({\n type: 'sausage',\n shape: {\n cx: 0,\n cy: 0,\n r0: 0,\n r: 0,\n startAngle: 0,\n endAngle: Math.PI * 2,\n clockwise: true\n },\n buildPath: function (ctx, shape) {\n var x = shape.cx;\n var y = 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 unitStartX = Math.cos(startAngle);\n var unitStartY = Math.sin(startAngle);\n var unitEndX = Math.cos(endAngle);\n var unitEndY = Math.sin(endAngle);\n var lessThanCircle = clockwise ? endAngle - startAngle < Math.PI * 2 : startAngle - endAngle < Math.PI * 2;\n\n if (lessThanCircle) {\n ctx.moveTo(unitStartX * r0 + x, unitStartY * r0 + y);\n ctx.arc(unitStartX * rCenter + x, unitStartY * rCenter + y, dr, -Math.PI + startAngle, startAngle, !clockwise);\n }\n\n ctx.arc(x, y, r, startAngle, endAngle, !clockwise);\n ctx.moveTo(unitEndX * r + x, unitEndY * r + y);\n ctx.arc(unitEndX * rCenter + x, unitEndY * rCenter + y, dr, endAngle - Math.PI * 2, endAngle - Math.PI, !clockwise);\n\n if (r0 !== 0) {\n ctx.arc(x, y, r0, endAngle, startAngle, clockwise);\n ctx.moveTo(unitStartX * r0 + x, unitEndY * r0 + y);\n }\n\n ctx.closePath();\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar BrushController = require(\"../helper/BrushController\");\n\nvar _visualEncoding = require(\"./visualEncoding\");\n\nvar layoutCovers = _visualEncoding.layoutCovers;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = echarts.extendComponentView({\n type: 'brush',\n init: function (ecModel, api) {\n /**\n * @readOnly\n * @type {module:echarts/model/Global}\n */\n this.ecModel = ecModel;\n /**\n * @readOnly\n * @type {module:echarts/ExtensionAPI}\n */\n\n this.api = api;\n /**\n * @readOnly\n * @type {module:echarts/component/brush/BrushModel}\n */\n\n this.model;\n /**\n * @private\n * @type {module:echarts/component/helper/BrushController}\n */\n\n (this._brushController = new BrushController(api.getZr())).on('brush', zrUtil.bind(this._onBrush, this)).mount();\n },\n\n /**\n * @override\n */\n render: function (brushModel) {\n this.model = brushModel;\n return updateController.apply(this, arguments);\n },\n\n /**\n * @override\n */\n updateTransform: function (brushModel, ecModel) {\n // PENDING: `updateTransform` is a little tricky, whose layout need\n // to be calculate mandatorily and other stages will not be performed.\n // Take care the correctness of the logic. See #11754 .\n layoutCovers(ecModel);\n return updateController.apply(this, arguments);\n },\n\n /**\n * @override\n */\n updateView: updateController,\n // /**\n // * @override\n // */\n // updateLayout: updateController,\n // /**\n // * @override\n // */\n // updateVisual: updateController,\n\n /**\n * @override\n */\n dispose: function () {\n this._brushController.dispose();\n },\n\n /**\n * @private\n */\n _onBrush: function (areas, opt) {\n var modelId = this.model.id;\n this.model.brushTargetManager.setOutputRanges(areas, this.ecModel); // Action is not dispatched on drag end, because the drag end\n // emits the same params with the last drag move event, and\n // may have some delay when using touch pad, which makes\n // animation not smooth (when using debounce).\n\n (!opt.isEnd || opt.removeOnClick) && this.api.dispatchAction({\n type: 'brush',\n brushId: modelId,\n areas: zrUtil.clone(areas),\n $from: modelId\n });\n opt.isEnd && this.api.dispatchAction({\n type: 'brushEnd',\n brushId: modelId,\n areas: zrUtil.clone(areas),\n $from: modelId\n });\n }\n});\n\nfunction updateController(brushModel, ecModel, api, payload) {\n // Do not update controller when drawing.\n (!payload || payload.$from !== brushModel.id) && this._brushController.setPanels(brushModel.brushTargetManager.makePanelOpts(api)).enableBrush(brushModel.brushOption).updateCovers(brushModel.areas.slice());\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\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 * LegendVisualProvider is an bridge that pick encoded color from data and\n * provide to the legend component.\n * @param {Function} getDataWithEncodedVisual Function to get data after filtered. It stores all the encoding info\n * @param {Function} getRawData Function to get raw data before filtered.\n */\nfunction LegendVisualProvider(getDataWithEncodedVisual, getRawData) {\n this.getAllNames = function () {\n var rawData = getRawData(); // We find the name from the raw data. In case it's filtered by the legend component.\n // Normally, the name can be found in rawData, but can't be found in filtered data will display as gray.\n\n return rawData.mapArray(rawData.getName);\n };\n\n this.containName = function (name) {\n var rawData = getRawData();\n return rawData.indexOfName(name) >= 0;\n };\n\n this.indexOfName = function (name) {\n // Only get data when necessary.\n // Because LegendVisualProvider constructor may be new in the stage that data is not prepared yet.\n // Invoking Series#getData immediately will throw an error.\n var dataWithEncodedVisual = getDataWithEncodedVisual();\n return dataWithEncodedVisual.indexOfName(name);\n };\n\n this.getItemVisual = function (dataIndex, key) {\n // Get encoded visual properties from final filtered data.\n var dataWithEncodedVisual = getDataWithEncodedVisual();\n return dataWithEncodedVisual.getItemVisual(dataIndex, key);\n };\n}\n\nvar _default = LegendVisualProvider;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"../coord/parallel/parallelCreator\");\n\nrequire(\"./axis/parallelAxisAction\");\n\nrequire(\"./axis/ParallelAxisView\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar IRRELEVANT_EXCLUDES = {\n 'axisPointer': 1,\n 'tooltip': 1,\n 'brush': 1\n};\n/**\n * Avoid that: mouse click on a elements that is over geo or graph,\n * but roam is triggered.\n */\n\nfunction onIrrelevantElement(e, api, targetCoordSysModel) {\n var model = api.getComponentByElement(e.topTarget); // If model is axisModel, it works only if it is injected with coordinateSystem.\n\n var coordSys = model && model.coordinateSystem;\n return model && model !== targetCoordSysModel && !IRRELEVANT_EXCLUDES[model.mainType] && coordSys && coordSys.model !== targetCoordSysModel;\n}\n\nexports.onIrrelevantElement = onIrrelevantElement;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar ComponentModel = require(\"../../model/Component\");\n\nvar axisModelCreator = require(\"../axisModelCreator\");\n\nvar axisModelCommonMixin = require(\"../axisModelCommonMixin\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar AxisModel = ComponentModel.extend({\n type: 'singleAxis',\n layoutMode: 'box',\n\n /**\n * @type {module:echarts/coord/single/SingleAxis}\n */\n axis: null,\n\n /**\n * @type {module:echarts/coord/single/Single}\n */\n coordinateSystem: null,\n\n /**\n * @override\n */\n getCoordSysModel: function () {\n return this;\n }\n});\nvar defaultOption = {\n left: '5%',\n top: '5%',\n right: '5%',\n bottom: '5%',\n type: 'value',\n position: 'bottom',\n orient: 'horizontal',\n axisLine: {\n show: true,\n lineStyle: {\n width: 1,\n type: 'solid'\n }\n },\n // Single coordinate system and single axis is the,\n // which is used as the parent tooltip model.\n // same model, so we set default tooltip show as true.\n tooltip: {\n show: true\n },\n axisTick: {\n show: true,\n length: 6,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n interval: 'auto'\n },\n splitLine: {\n show: true,\n lineStyle: {\n type: 'dashed',\n opacity: 0.2\n }\n }\n};\n\nfunction getAxisType(axisName, option) {\n return option.type || (option.data ? 'category' : 'value');\n}\n\nzrUtil.merge(AxisModel.prototype, axisModelCommonMixin);\naxisModelCreator('single', AxisModel, getAxisType, defaultOption);\nvar _default = AxisModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar _graphic = require(\"../../util/graphic\");\n\nvar Group = _graphic.Group;\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar SymbolClz = require(\"./Symbol\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Symbol with ripple effect\n * @module echarts/chart/helper/EffectSymbol\n */\nvar EFFECT_RIPPLE_NUMBER = 3;\n\nfunction normalizeSymbolSize(symbolSize) {\n if (!zrUtil.isArray(symbolSize)) {\n symbolSize = [+symbolSize, +symbolSize];\n }\n\n return symbolSize;\n}\n\nfunction updateRipplePath(rippleGroup, effectCfg) {\n var color = effectCfg.rippleEffectColor || effectCfg.color;\n rippleGroup.eachChild(function (ripplePath) {\n ripplePath.attr({\n z: effectCfg.z,\n zlevel: effectCfg.zlevel,\n style: {\n stroke: effectCfg.brushType === 'stroke' ? color : null,\n fill: effectCfg.brushType === 'fill' ? color : null\n }\n });\n });\n}\n/**\n * @constructor\n * @param {module:echarts/data/List} data\n * @param {number} idx\n * @extends {module:zrender/graphic/Group}\n */\n\n\nfunction EffectSymbol(data, idx) {\n Group.call(this);\n var symbol = new SymbolClz(data, idx);\n var rippleGroup = new Group();\n this.add(symbol);\n this.add(rippleGroup);\n\n rippleGroup.beforeUpdate = function () {\n this.attr(symbol.getScale());\n };\n\n this.updateData(data, idx);\n}\n\nvar effectSymbolProto = EffectSymbol.prototype;\n\neffectSymbolProto.stopEffectAnimation = function () {\n this.childAt(1).removeAll();\n};\n\neffectSymbolProto.startEffectAnimation = function (effectCfg) {\n var symbolType = effectCfg.symbolType;\n var color = effectCfg.color;\n var rippleGroup = this.childAt(1);\n\n for (var i = 0; i < EFFECT_RIPPLE_NUMBER; i++) {\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 #4136.\n var ripplePath = createSymbol(symbolType, -1, -1, 2, 2, color);\n ripplePath.attr({\n style: {\n strokeNoScale: true\n },\n z2: 99,\n silent: true,\n scale: [0.5, 0.5]\n });\n var delay = -i / EFFECT_RIPPLE_NUMBER * effectCfg.period + effectCfg.effectOffset; // TODO Configurable effectCfg.period\n\n ripplePath.animate('', true).when(effectCfg.period, {\n scale: [effectCfg.rippleScale / 2, effectCfg.rippleScale / 2]\n }).delay(delay).start();\n ripplePath.animateStyle(true).when(effectCfg.period, {\n opacity: 0\n }).delay(delay).start();\n rippleGroup.add(ripplePath);\n }\n\n updateRipplePath(rippleGroup, effectCfg);\n};\n/**\n * Update effect symbol\n */\n\n\neffectSymbolProto.updateEffectAnimation = function (effectCfg) {\n var oldEffectCfg = this._effectCfg;\n var rippleGroup = this.childAt(1); // Must reinitialize effect if following configuration changed\n\n var DIFFICULT_PROPS = ['symbolType', 'period', 'rippleScale'];\n\n for (var i = 0; i < DIFFICULT_PROPS.length; i++) {\n var propName = DIFFICULT_PROPS[i];\n\n if (oldEffectCfg[propName] !== effectCfg[propName]) {\n this.stopEffectAnimation();\n this.startEffectAnimation(effectCfg);\n return;\n }\n }\n\n updateRipplePath(rippleGroup, effectCfg);\n};\n/**\n * Highlight symbol\n */\n\n\neffectSymbolProto.highlight = function () {\n this.trigger('emphasis');\n};\n/**\n * Downplay symbol\n */\n\n\neffectSymbolProto.downplay = function () {\n this.trigger('normal');\n};\n/**\n * Update symbol properties\n * @param {module:echarts/data/List} data\n * @param {number} idx\n */\n\n\neffectSymbolProto.updateData = function (data, idx) {\n var seriesModel = data.hostModel;\n this.childAt(0).updateData(data, idx);\n var rippleGroup = this.childAt(1);\n var itemModel = data.getItemModel(idx);\n var symbolType = data.getItemVisual(idx, 'symbol');\n var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n var color = data.getItemVisual(idx, 'color');\n rippleGroup.attr('scale', symbolSize);\n rippleGroup.traverse(function (ripplePath) {\n ripplePath.attr({\n fill: color\n });\n });\n var symbolOffset = itemModel.getShallow('symbolOffset');\n\n if (symbolOffset) {\n var pos = rippleGroup.position;\n pos[0] = parsePercent(symbolOffset[0], symbolSize[0]);\n pos[1] = parsePercent(symbolOffset[1], symbolSize[1]);\n }\n\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n rippleGroup.rotation = (symbolRotate || 0) * Math.PI / 180 || 0;\n var effectCfg = {};\n effectCfg.showEffectOn = seriesModel.get('showEffectOn');\n effectCfg.rippleScale = itemModel.get('rippleEffect.scale');\n effectCfg.brushType = itemModel.get('rippleEffect.brushType');\n effectCfg.period = itemModel.get('rippleEffect.period') * 1000;\n effectCfg.effectOffset = idx / data.count();\n effectCfg.z = itemModel.getShallow('z') || 0;\n effectCfg.zlevel = itemModel.getShallow('zlevel') || 0;\n effectCfg.symbolType = symbolType;\n effectCfg.color = color;\n effectCfg.rippleEffectColor = itemModel.get('rippleEffect.color');\n this.off('mouseover').off('mouseout').off('emphasis').off('normal');\n\n if (effectCfg.showEffectOn === 'render') {\n this._effectCfg ? this.updateEffectAnimation(effectCfg) : this.startEffectAnimation(effectCfg);\n this._effectCfg = effectCfg;\n } else {\n // Not keep old effect config\n this._effectCfg = null;\n this.stopEffectAnimation();\n var symbol = this.childAt(0);\n\n var onEmphasis = function () {\n symbol.highlight();\n\n if (effectCfg.showEffectOn !== 'render') {\n this.startEffectAnimation(effectCfg);\n }\n };\n\n var onNormal = function () {\n symbol.downplay();\n\n if (effectCfg.showEffectOn !== 'render') {\n this.stopEffectAnimation();\n }\n };\n\n this.on('mouseover', onEmphasis, this).on('mouseout', onNormal, this).on('emphasis', onEmphasis, this).on('normal', onNormal, this);\n }\n\n this._effectCfg = effectCfg;\n};\n\neffectSymbolProto.fadeOut = function (cb) {\n this.off('mouseover').off('mouseout').off('emphasis').off('normal');\n cb && cb();\n};\n\nzrUtil.inherits(EffectSymbol, Group);\nvar _default = EffectSymbol;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _parseSVG = require(\"zrender/lib/tool/parseSVG\");\n\nvar parseSVG = _parseSVG.parseSVG;\nvar makeViewBoxTransform = _parseSVG.makeViewBoxTransform;\n\nvar Group = require(\"zrender/lib/container/Group\");\n\nvar Rect = require(\"zrender/lib/graphic/shape/Rect\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar assert = _util.assert;\nvar createHashMap = _util.createHashMap;\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar _model = require(\"../../util/model\");\n\nvar makeInner = _model.makeInner;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar inner = makeInner();\nvar _default = {\n /**\n * @param {string} mapName\n * @param {Object} mapRecord {specialAreas, geoJSON}\n * @return {Object} {root, boundingRect}\n */\n load: function (mapName, mapRecord) {\n var originRoot = inner(mapRecord).originRoot;\n\n if (originRoot) {\n return {\n root: originRoot,\n boundingRect: inner(mapRecord).boundingRect\n };\n }\n\n var graphic = buildGraphic(mapRecord);\n inner(mapRecord).originRoot = graphic.root;\n inner(mapRecord).boundingRect = graphic.boundingRect;\n return graphic;\n },\n makeGraphic: function (mapName, mapRecord, hostKey) {\n // For performance consideration (in large SVG), graphic only maked\n // when necessary and reuse them according to hostKey.\n var field = inner(mapRecord);\n var rootMap = field.rootMap || (field.rootMap = createHashMap());\n var root = rootMap.get(hostKey);\n\n if (root) {\n return root;\n }\n\n var originRoot = field.originRoot;\n var boundingRect = field.boundingRect; // For performance, if originRoot is not used by a view,\n // assign it to a view, but not reproduce graphic elements.\n\n if (!field.originRootHostKey) {\n field.originRootHostKey = hostKey;\n root = originRoot;\n } else {\n root = buildGraphic(mapRecord, boundingRect).root;\n }\n\n return rootMap.set(hostKey, root);\n },\n removeGraphic: function (mapName, mapRecord, hostKey) {\n var field = inner(mapRecord);\n var rootMap = field.rootMap;\n rootMap && rootMap.removeKey(hostKey);\n\n if (hostKey === field.originRootHostKey) {\n field.originRootHostKey = null;\n }\n }\n};\n\nfunction buildGraphic(mapRecord, boundingRect) {\n var svgXML = mapRecord.svgXML;\n var result;\n var root;\n\n try {\n result = svgXML && parseSVG(svgXML, {\n ignoreViewBox: true,\n ignoreRootClip: true\n }) || {};\n root = result.root;\n assert(root != null);\n } catch (e) {\n throw new Error('Invalid svg format\\n' + e.message);\n }\n\n var svgWidth = result.width;\n var svgHeight = result.height;\n var viewBoxRect = result.viewBoxRect;\n\n if (!boundingRect) {\n boundingRect = svgWidth == null || svgHeight == null ? // If svg width / height not specified, calculate\n // bounding rect as the width / height\n root.getBoundingRect() : new BoundingRect(0, 0, 0, 0);\n\n if (svgWidth != null) {\n boundingRect.width = svgWidth;\n }\n\n if (svgHeight != null) {\n boundingRect.height = svgHeight;\n }\n }\n\n if (viewBoxRect) {\n var viewBoxTransform = makeViewBoxTransform(viewBoxRect, boundingRect.width, boundingRect.height);\n var elRoot = root;\n root = new Group();\n root.add(elRoot);\n elRoot.scale = viewBoxTransform.scale;\n elRoot.position = viewBoxTransform.position;\n }\n\n root.setClipPath(new Rect({\n shape: boundingRect.plain()\n }));\n return {\n root: root,\n boundingRect: boundingRect\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar IncrementalDisplayable = require(\"zrender/lib/graphic/IncrementalDisplayable\");\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/* global Float32Array */\n// TODO Batch by color\nvar BOOST_SIZE_THRESHOLD = 4;\nvar LargeSymbolPath = graphic.extendShape({\n shape: {\n points: null\n },\n symbolProxy: null,\n softClipShape: null,\n buildPath: function (path, shape) {\n var points = shape.points;\n var size = shape.size;\n var symbolProxy = this.symbolProxy;\n var symbolProxyShape = symbolProxy.shape;\n var ctx = path.getContext ? path.getContext() : path;\n var canBoost = ctx && size[0] < BOOST_SIZE_THRESHOLD; // Do draw in afterBrush.\n\n if (canBoost) {\n return;\n }\n\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n\n if (isNaN(x) || isNaN(y)) {\n continue;\n }\n\n if (this.softClipShape && !this.softClipShape.contain(x, y)) {\n continue;\n }\n\n symbolProxyShape.x = x - size[0] / 2;\n symbolProxyShape.y = y - size[1] / 2;\n symbolProxyShape.width = size[0];\n symbolProxyShape.height = size[1];\n symbolProxy.buildPath(path, symbolProxyShape, true);\n }\n },\n afterBrush: function (ctx) {\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var canBoost = size[0] < BOOST_SIZE_THRESHOLD;\n\n if (!canBoost) {\n return;\n }\n\n this.setTransform(ctx); // PENDING If style or other canvas status changed?\n\n for (var i = 0; i < points.length;) {\n var x = points[i++];\n var y = points[i++];\n\n if (isNaN(x) || isNaN(y)) {\n continue;\n }\n\n if (this.softClipShape && !this.softClipShape.contain(x, y)) {\n continue;\n } // fillRect is faster than building a rect path and draw.\n // And it support light globalCompositeOperation.\n\n\n ctx.fillRect(x - size[0] / 2, y - size[1] / 2, size[0], size[1]);\n }\n\n this.restoreTransform(ctx);\n },\n findDataIndex: function (x, y) {\n // TODO ???\n // Consider transform\n var shape = this.shape;\n var points = shape.points;\n var size = shape.size;\n var w = Math.max(size[0], 4);\n var h = Math.max(size[1], 4); // Not consider transform\n // Treat each element as a rect\n // top down traverse\n\n for (var idx = points.length / 2 - 1; idx >= 0; idx--) {\n var i = idx * 2;\n var x0 = points[i] - w / 2;\n var y0 = points[i + 1] - h / 2;\n\n if (x >= x0 && y >= y0 && x <= x0 + w && y <= y0 + h) {\n return idx;\n }\n }\n\n return -1;\n }\n});\n\nfunction LargeSymbolDraw() {\n this.group = new graphic.Group();\n}\n\nvar largeSymbolProto = LargeSymbolDraw.prototype;\n\nlargeSymbolProto.isPersistent = function () {\n return !this._incremental;\n};\n/**\n * Update symbols draw by new data\n * @param {module:echarts/data/List} data\n * @param {Object} opt\n * @param {Object} [opt.clipShape]\n */\n\n\nlargeSymbolProto.updateData = function (data, opt) {\n this.group.removeAll();\n var symbolEl = new LargeSymbolPath({\n rectHover: true,\n cursor: 'default'\n });\n symbolEl.setShape({\n points: data.getLayout('symbolPoints')\n });\n\n this._setCommon(symbolEl, data, false, opt);\n\n this.group.add(symbolEl);\n this._incremental = null;\n};\n\nlargeSymbolProto.updateLayout = function (data) {\n if (this._incremental) {\n return;\n }\n\n var points = data.getLayout('symbolPoints');\n this.group.eachChild(function (child) {\n if (child.startIndex != null) {\n var len = (child.endIndex - child.startIndex) * 2;\n var byteOffset = child.startIndex * 4 * 2;\n points = new Float32Array(points.buffer, byteOffset, len);\n }\n\n child.setShape('points', points);\n });\n};\n\nlargeSymbolProto.incrementalPrepareUpdate = function (data) {\n this.group.removeAll();\n\n this._clearIncremental(); // Only use incremental displayables when data amount is larger than 2 million.\n // PENDING Incremental data?\n\n\n if (data.count() > 2e6) {\n if (!this._incremental) {\n this._incremental = new IncrementalDisplayable({\n silent: true\n });\n }\n\n this.group.add(this._incremental);\n } else {\n this._incremental = null;\n }\n};\n\nlargeSymbolProto.incrementalUpdate = function (taskParams, data, opt) {\n var symbolEl;\n\n if (this._incremental) {\n symbolEl = new LargeSymbolPath();\n\n this._incremental.addDisplayable(symbolEl, true);\n } else {\n symbolEl = new LargeSymbolPath({\n rectHover: true,\n cursor: 'default',\n startIndex: taskParams.start,\n endIndex: taskParams.end\n });\n symbolEl.incremental = true;\n this.group.add(symbolEl);\n }\n\n symbolEl.setShape({\n points: data.getLayout('symbolPoints')\n });\n\n this._setCommon(symbolEl, data, !!this._incremental, opt);\n};\n\nlargeSymbolProto._setCommon = function (symbolEl, data, isIncremental, opt) {\n var hostModel = data.hostModel;\n opt = opt || {}; // TODO\n // if (data.hasItemVisual.symbolSize) {\n // // TODO typed array?\n // symbolEl.setShape('sizes', data.mapArray(\n // function (idx) {\n // var size = data.getItemVisual(idx, 'symbolSize');\n // return (size instanceof Array) ? size : [size, size];\n // }\n // ));\n // }\n // else {\n\n var size = data.getVisual('symbolSize');\n symbolEl.setShape('size', size instanceof Array ? size : [size, size]); // }\n\n symbolEl.softClipShape = opt.clipShape || null; // Create symbolProxy to build path for each data\n\n symbolEl.symbolProxy = createSymbol(data.getVisual('symbol'), 0, 0, 0, 0); // Use symbolProxy setColor method\n\n symbolEl.setColor = symbolEl.symbolProxy.setColor;\n var extrudeShadow = symbolEl.shape.size[0] < BOOST_SIZE_THRESHOLD;\n symbolEl.useStyle( // Draw shadow when doing fillRect is extremely slow.\n hostModel.getModel('itemStyle').getItemStyle(extrudeShadow ? ['color', 'shadowBlur', 'shadowColor'] : ['color']));\n var visualColor = data.getVisual('color');\n\n if (visualColor) {\n symbolEl.setColor(visualColor);\n }\n\n if (!isIncremental) {\n // Enable tooltip\n // PENDING May have performance issue when path is extremely large\n symbolEl.seriesIndex = hostModel.seriesIndex;\n symbolEl.on('mousemove', function (e) {\n symbolEl.dataIndex = null;\n var dataIndex = symbolEl.findDataIndex(e.offsetX, e.offsetY);\n\n if (dataIndex >= 0) {\n // Provide dataIndex for tooltip\n symbolEl.dataIndex = dataIndex + (symbolEl.startIndex || 0);\n }\n });\n }\n};\n\nlargeSymbolProto.remove = function () {\n this._clearIncremental();\n\n this._incremental = null;\n this.group.removeAll();\n};\n\nlargeSymbolProto._clearIncremental = function () {\n var incremental = this._incremental;\n\n if (incremental) {\n incremental.clearDisplaybles();\n }\n};\n\nvar _default = LargeSymbolDraw;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _traversalHelper = require(\"./traversalHelper\");\n\nvar eachAfter = _traversalHelper.eachAfter;\nvar eachBefore = _traversalHelper.eachBefore;\n\nvar _layoutHelper = require(\"./layoutHelper\");\n\nvar init = _layoutHelper.init;\nvar firstWalk = _layoutHelper.firstWalk;\nvar secondWalk = _layoutHelper.secondWalk;\nvar sep = _layoutHelper.separation;\nvar radialCoordinate = _layoutHelper.radialCoordinate;\nvar getViewRect = _layoutHelper.getViewRect;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel, api) {\n ecModel.eachSeriesByType('tree', function (seriesModel) {\n commonLayout(seriesModel, api);\n });\n}\n\nfunction commonLayout(seriesModel, api) {\n var layoutInfo = getViewRect(seriesModel, api);\n seriesModel.layoutInfo = layoutInfo;\n var layout = seriesModel.get('layout');\n var width = 0;\n var height = 0;\n var separation = null;\n\n if (layout === 'radial') {\n width = 2 * Math.PI;\n height = Math.min(layoutInfo.height, layoutInfo.width) / 2;\n separation = sep(function (node1, node2) {\n return (node1.parentNode === node2.parentNode ? 1 : 2) / node1.depth;\n });\n } else {\n width = layoutInfo.width;\n height = layoutInfo.height;\n separation = sep();\n }\n\n var virtualRoot = seriesModel.getData().tree.root;\n var realRoot = virtualRoot.children[0];\n\n if (realRoot) {\n init(virtualRoot);\n eachAfter(realRoot, firstWalk, separation);\n virtualRoot.hierNode.modifier = -realRoot.hierNode.prelim;\n eachBefore(realRoot, secondWalk);\n var left = realRoot;\n var right = realRoot;\n var bottom = realRoot;\n eachBefore(realRoot, function (node) {\n var x = node.getLayout().x;\n\n if (x < left.getLayout().x) {\n left = node;\n }\n\n if (x > right.getLayout().x) {\n right = node;\n }\n\n if (node.depth > bottom.depth) {\n bottom = node;\n }\n });\n var delta = left === right ? 1 : separation(left, right) / 2;\n var tx = delta - left.getLayout().x;\n var kx = 0;\n var ky = 0;\n var coorX = 0;\n var coorY = 0;\n\n if (layout === 'radial') {\n kx = width / (right.getLayout().x + delta + tx); // here we use (node.depth - 1), bucause the real root's depth is 1\n\n ky = height / (bottom.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorX = (node.getLayout().x + tx) * kx;\n coorY = (node.depth - 1) * ky;\n var finalCoor = radialCoordinate(coorX, coorY);\n node.setLayout({\n x: finalCoor.x,\n y: finalCoor.y,\n rawX: coorX,\n rawY: coorY\n }, true);\n });\n } else {\n var orient = seriesModel.getOrient();\n\n if (orient === 'RL' || orient === 'LR') {\n ky = height / (right.getLayout().x + delta + tx);\n kx = width / (bottom.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorY = (node.getLayout().x + tx) * ky;\n coorX = orient === 'LR' ? (node.depth - 1) * kx : width - (node.depth - 1) * kx;\n node.setLayout({\n x: coorX,\n y: coorY\n }, true);\n });\n } else if (orient === 'TB' || orient === 'BT') {\n kx = width / (right.getLayout().x + delta + tx);\n ky = height / (bottom.depth - 1 || 1);\n eachBefore(realRoot, function (node) {\n coorX = (node.getLayout().x + tx) * kx;\n coorY = orient === 'TB' ? (node.depth - 1) * ky : height - (node.depth - 1) * ky;\n node.setLayout({\n x: coorX,\n y: coorY\n }, true);\n });\n }\n }\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar createListFromArray = require(\"../helper/createListFromArray\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.scatter',\n dependencies: ['grid', 'polar', 'geo', 'singleAxis', 'calendar'],\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {\n useEncodeDefaulter: true\n });\n },\n brushSelector: 'point',\n getProgressive: function () {\n var progressive = this.option.progressive;\n\n if (progressive == null) {\n // PENDING\n return this.option.large ? 5e3 : this.get('progressive');\n }\n\n return progressive;\n },\n getProgressiveThreshold: function () {\n var progressiveThreshold = this.option.progressiveThreshold;\n\n if (progressiveThreshold == null) {\n // PENDING\n return this.option.large ? 1e4 : this.get('progressiveThreshold');\n }\n\n return progressiveThreshold;\n },\n defaultOption: {\n coordinateSystem: 'cartesian2d',\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n hoverAnimation: true,\n // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Polar coordinate system\n // polarIndex: 0,\n // Geo coordinate system\n // geoIndex: 0,\n // symbol: null, // 图形类型\n symbolSize: 10,\n // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2\n // symbolRotate: null, // 图形旋转控制\n large: false,\n // Available when large is true\n largeThreshold: 2000,\n // cursor: null,\n // label: {\n // show: false\n // distance: 5,\n // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n // position: 默认自适应,水平布局为'top',垂直布局为'right',可选为\n // 'inside'|'left'|'right'|'top'|'bottom'\n // 默认使用全局文本样式,详见TEXTSTYLE\n // },\n itemStyle: {\n opacity: 0.8 // color: 各异\n\n },\n // If clip the overflow graphics\n // Works on cartesian / polar series\n clip: true // progressive: null\n\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// var PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\n\nfunction _default(seriesType, ecModel, api, payload) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var center = seriesModel.get('center');\n var radius = seriesModel.get('radius');\n\n if (!zrUtil.isArray(radius)) {\n radius = [0, radius];\n }\n\n if (!zrUtil.isArray(center)) {\n center = [center, center];\n }\n\n var width = api.getWidth();\n var height = api.getHeight();\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], width);\n var cy = parsePercent(center[1], height);\n var r0 = parsePercent(radius[0], size / 2);\n var r = parsePercent(radius[1], size / 2);\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n var virtualRoot = seriesModel.getData().tree.root;\n var treeRoot = seriesModel.getViewRoot();\n var rootDepth = treeRoot.depth;\n var sort = seriesModel.get('sort');\n\n if (sort != null) {\n initChildren(treeRoot, sort);\n }\n\n var validDataCount = 0;\n zrUtil.each(treeRoot.children, function (child) {\n !isNaN(child.getValue()) && validDataCount++;\n });\n var sum = treeRoot.getValue(); // Sum may be 0\n\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n var renderRollupNode = treeRoot.depth > 0;\n var levels = treeRoot.height - (renderRollupNode ? -1 : 1);\n var rPerLevel = (r - r0) / (levels || 1);\n var clockwise = seriesModel.get('clockwise');\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // In the case some sector angle is smaller than minAngle\n // var restAngle = PI2;\n // var valueSumLargerThanMinAngle = 0;\n\n var dir = clockwise ? 1 : -1;\n /**\n * Render a tree\n * @return increased angle\n */\n\n var renderNode = function (node, startAngle) {\n if (!node) {\n return;\n }\n\n var endAngle = startAngle; // Render self\n\n if (node !== virtualRoot) {\n // Tree node is virtual, so it doesn't need to be drawn\n var value = node.getValue();\n var angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian;\n\n if (angle < minAngle) {\n angle = minAngle; // restAngle -= minAngle;\n } // else {\n // valueSumLargerThanMinAngle += value;\n // }\n\n\n endAngle = startAngle + dir * angle;\n var depth = node.depth - rootDepth - (renderRollupNode ? -1 : 1);\n var rStart = r0 + rPerLevel * depth;\n var rEnd = r0 + rPerLevel * (depth + 1);\n var itemModel = node.getModel();\n\n if (itemModel.get('r0') != null) {\n rStart = parsePercent(itemModel.get('r0'), size / 2);\n }\n\n if (itemModel.get('r') != null) {\n rEnd = parsePercent(itemModel.get('r'), size / 2);\n }\n\n node.setLayout({\n angle: angle,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: rStart,\n r: rEnd\n });\n } // Render children\n\n\n if (node.children && node.children.length) {\n // currentAngle = startAngle;\n var siblingAngle = 0;\n zrUtil.each(node.children, function (node) {\n siblingAngle += renderNode(node, startAngle + siblingAngle);\n });\n }\n\n return endAngle - startAngle;\n }; // Virtual root node for roll up\n\n\n if (renderRollupNode) {\n var rStart = r0;\n var rEnd = r0 + rPerLevel;\n var angle = Math.PI * 2;\n virtualRoot.setLayout({\n angle: angle,\n startAngle: startAngle,\n endAngle: startAngle + angle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: rStart,\n r: rEnd\n });\n }\n\n renderNode(treeRoot, startAngle);\n });\n}\n/**\n * Init node children by order and update visual\n *\n * @param {TreeNode} node root node\n * @param {boolean} isAsc if is in ascendant order\n */\n\n\nfunction initChildren(node, isAsc) {\n var children = node.children || [];\n node.children = sort(children, isAsc); // Init children recursively\n\n if (children.length) {\n zrUtil.each(node.children, function (child) {\n initChildren(child, isAsc);\n });\n }\n}\n/**\n * Sort children nodes\n *\n * @param {TreeNode[]} children children of node to be sorted\n * @param {string | function | null} sort sort method\n * See SunburstSeries.js for details.\n */\n\n\nfunction sort(children, sortOrder) {\n if (typeof sortOrder === 'function') {\n return children.sort(sortOrder);\n } else {\n var isAsc = sortOrder === 'asc';\n return children.sort(function (a, b) {\n var diff = (a.getValue() - b.getValue()) * (isAsc ? 1 : -1);\n return diff === 0 ? (a.dataIndex - b.dataIndex) * (isAsc ? -1 : 1) : diff;\n });\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _layout = require(\"../../util/layout\");\n\nvar getLayoutRect = _layout.getLayoutRect;\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 * @param {module:echarts/component/visualMap/VisualMapModel} visualMapModel\\\n * @param {module:echarts/ExtensionAPI} api\n * @param {Array.} itemSize always [short, long]\n * @return {string} 'left' or 'right' or 'top' or 'bottom'\n */\nfunction getItemAlign(visualMapModel, api, itemSize) {\n var modelOption = visualMapModel.option;\n var itemAlign = modelOption.align;\n\n if (itemAlign != null && itemAlign !== 'auto') {\n return itemAlign;\n } // Auto decision align.\n\n\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var realIndex = modelOption.orient === 'horizontal' ? 1 : 0;\n var paramsSet = [['left', 'right', 'width'], ['top', 'bottom', 'height']];\n var reals = paramsSet[realIndex];\n var fakeValue = [0, null, 10];\n var layoutInput = {};\n\n for (var i = 0; i < 3; i++) {\n layoutInput[paramsSet[1 - realIndex][i]] = fakeValue[i];\n layoutInput[reals[i]] = i === 2 ? itemSize[0] : modelOption[reals[i]];\n }\n\n var rParam = [['x', 'width', 3], ['y', 'height', 0]][realIndex];\n var rect = getLayoutRect(layoutInput, ecSize, modelOption.padding);\n return reals[(rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5 < ecSize[rParam[1]] * 0.5 ? 0 : 1];\n}\n/**\n * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and\n * dataIndexInside means filtered index.\n */\n\n\nfunction makeHighDownBatch(batch, visualMapModel) {\n zrUtil.each(batch || [], function (batchItem) {\n if (batchItem.dataIndex != null) {\n batchItem.dataIndexInside = batchItem.dataIndex;\n batchItem.dataIndex = null;\n }\n\n batchItem.highlightKey = 'visualMap' + (visualMapModel ? visualMapModel.componentIndex : '');\n });\n return batch;\n}\n\nexports.getItemAlign = getItemAlign;\nexports.makeHighDownBatch = makeHighDownBatch;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar helper = require(\"./helper\");\n\nvar sliderMove = require(\"../helper/sliderMove\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar each = zrUtil.each;\nvar asc = numberUtil.asc;\n/**\n * Operate single axis.\n * One axis can only operated by one axis operator.\n * Different dataZoomModels may be defined to operate the same axis.\n * (i.e. 'inside' data zoom and 'slider' data zoom components)\n * So dataZoomModels share one axisProxy in that case.\n *\n * @class\n */\n\nvar AxisProxy = function (dimName, axisIndex, dataZoomModel, ecModel) {\n /**\n * @private\n * @type {string}\n */\n this._dimName = dimName;\n /**\n * @private\n */\n\n this._axisIndex = axisIndex;\n /**\n * @private\n * @type {Array.}\n */\n\n this._valueWindow;\n /**\n * @private\n * @type {Array.}\n */\n\n this._percentWindow;\n /**\n * @private\n * @type {Array.}\n */\n\n this._dataExtent;\n /**\n * {minSpan, maxSpan, minValueSpan, maxValueSpan}\n * @private\n * @type {Object}\n */\n\n this._minMaxSpan;\n /**\n * @readOnly\n * @type {module: echarts/model/Global}\n */\n\n this.ecModel = ecModel;\n /**\n * @private\n * @type {module: echarts/component/dataZoom/DataZoomModel}\n */\n\n this._dataZoomModel = dataZoomModel; // /**\n // * @readOnly\n // * @private\n // */\n // this.hasSeriesStacked;\n};\n\nAxisProxy.prototype = {\n constructor: AxisProxy,\n\n /**\n * Whether the axisProxy is hosted by dataZoomModel.\n *\n * @public\n * @param {module: echarts/component/dataZoom/DataZoomModel} dataZoomModel\n * @return {boolean}\n */\n hostedBy: function (dataZoomModel) {\n return this._dataZoomModel === dataZoomModel;\n },\n\n /**\n * @return {Array.} Value can only be NaN or finite value.\n */\n getDataValueWindow: function () {\n return this._valueWindow.slice();\n },\n\n /**\n * @return {Array.}\n */\n getDataPercentWindow: function () {\n return this._percentWindow.slice();\n },\n\n /**\n * @public\n * @param {number} axisIndex\n * @return {Array} seriesModels\n */\n getTargetSeriesModels: function () {\n var seriesModels = [];\n var ecModel = this.ecModel;\n ecModel.eachSeries(function (seriesModel) {\n if (helper.isCoordSupported(seriesModel.get('coordinateSystem'))) {\n var dimName = this._dimName;\n var axisModel = ecModel.queryComponents({\n mainType: dimName + 'Axis',\n index: seriesModel.get(dimName + 'AxisIndex'),\n id: seriesModel.get(dimName + 'AxisId')\n })[0];\n\n if (this._axisIndex === (axisModel && axisModel.componentIndex)) {\n seriesModels.push(seriesModel);\n }\n }\n }, this);\n return seriesModels;\n },\n getAxisModel: function () {\n return this.ecModel.getComponent(this._dimName + 'Axis', this._axisIndex);\n },\n getOtherAxisModel: function () {\n var axisDim = this._dimName;\n var ecModel = this.ecModel;\n var axisModel = this.getAxisModel();\n var isCartesian = axisDim === 'x' || axisDim === 'y';\n var otherAxisDim;\n var coordSysIndexName;\n\n if (isCartesian) {\n coordSysIndexName = 'gridIndex';\n otherAxisDim = axisDim === 'x' ? 'y' : 'x';\n } else {\n coordSysIndexName = 'polarIndex';\n otherAxisDim = axisDim === 'angle' ? 'radius' : 'angle';\n }\n\n var foundOtherAxisModel;\n ecModel.eachComponent(otherAxisDim + 'Axis', function (otherAxisModel) {\n if ((otherAxisModel.get(coordSysIndexName) || 0) === (axisModel.get(coordSysIndexName) || 0)) {\n foundOtherAxisModel = otherAxisModel;\n }\n });\n return foundOtherAxisModel;\n },\n getMinMaxSpan: function () {\n return zrUtil.clone(this._minMaxSpan);\n },\n\n /**\n * Only calculate by given range and this._dataExtent, do not change anything.\n *\n * @param {Object} opt\n * @param {number} [opt.start]\n * @param {number} [opt.end]\n * @param {number} [opt.startValue]\n * @param {number} [opt.endValue]\n */\n calculateDataWindow: function (opt) {\n var dataExtent = this._dataExtent;\n var axisModel = this.getAxisModel();\n var scale = axisModel.axis.scale;\n\n var rangePropMode = this._dataZoomModel.getRangePropMode();\n\n var percentExtent = [0, 100];\n var percentWindow = [];\n var valueWindow = [];\n var hasPropModeValue;\n each(['start', 'end'], function (prop, idx) {\n var boundPercent = opt[prop];\n var boundValue = opt[prop + 'Value']; // Notice: dataZoom is based either on `percentProp` ('start', 'end') or\n // on `valueProp` ('startValue', 'endValue'). (They are based on the data extent\n // but not min/max of axis, which will be calculated by data window then).\n // The former one is suitable for cases that a dataZoom component controls multiple\n // axes with different unit or extent, and the latter one is suitable for accurate\n // zoom by pixel (e.g., in dataZoomSelect).\n // we use `getRangePropMode()` to mark which prop is used. `rangePropMode` is updated\n // only when setOption or dispatchAction, otherwise it remains its original value.\n // (Why not only record `percentProp` and always map to `valueProp`? Because\n // the map `valueProp` -> `percentProp` -> `valueProp` probably not the original\n // `valueProp`. consider two axes constrolled by one dataZoom. They have different\n // data extent. All of values that are overflow the `dataExtent` will be calculated\n // to percent '100%').\n\n if (rangePropMode[idx] === 'percent') {\n boundPercent == null && (boundPercent = percentExtent[idx]); // Use scale.parse to math round for category or time axis.\n\n boundValue = scale.parse(numberUtil.linearMap(boundPercent, percentExtent, dataExtent));\n } else {\n hasPropModeValue = true;\n boundValue = boundValue == null ? dataExtent[idx] : scale.parse(boundValue); // Calculating `percent` from `value` may be not accurate, because\n // This calculation can not be inversed, because all of values that\n // are overflow the `dataExtent` will be calculated to percent '100%'\n\n boundPercent = numberUtil.linearMap(boundValue, dataExtent, percentExtent);\n } // valueWindow[idx] = round(boundValue);\n // percentWindow[idx] = round(boundPercent);\n\n\n valueWindow[idx] = boundValue;\n percentWindow[idx] = boundPercent;\n });\n asc(valueWindow);\n asc(percentWindow); // The windows from user calling of `dispatchAction` might be out of the extent,\n // or do not obey the `min/maxSpan`, `min/maxValueSpan`. But we dont restrict window\n // by `zoomLock` here, because we see `zoomLock` just as a interaction constraint,\n // where API is able to initialize/modify the window size even though `zoomLock`\n // specified.\n\n var spans = this._minMaxSpan;\n hasPropModeValue ? restrictSet(valueWindow, percentWindow, dataExtent, percentExtent, false) : restrictSet(percentWindow, valueWindow, percentExtent, dataExtent, true);\n\n function restrictSet(fromWindow, toWindow, fromExtent, toExtent, toValue) {\n var suffix = toValue ? 'Span' : 'ValueSpan';\n sliderMove(0, fromWindow, fromExtent, 'all', spans['min' + suffix], spans['max' + suffix]);\n\n for (var i = 0; i < 2; i++) {\n toWindow[i] = numberUtil.linearMap(fromWindow[i], fromExtent, toExtent, true);\n toValue && (toWindow[i] = scale.parse(toWindow[i]));\n }\n }\n\n return {\n valueWindow: valueWindow,\n percentWindow: percentWindow\n };\n },\n\n /**\n * Notice: reset should not be called before series.restoreData() called,\n * so it is recommanded to be called in \"process stage\" but not \"model init\n * stage\".\n *\n * @param {module: echarts/component/dataZoom/DataZoomModel} dataZoomModel\n */\n reset: function (dataZoomModel) {\n if (dataZoomModel !== this._dataZoomModel) {\n return;\n }\n\n var targetSeries = this.getTargetSeriesModels(); // Culculate data window and data extent, and record them.\n\n this._dataExtent = calculateDataExtent(this, this._dimName, targetSeries); // this.hasSeriesStacked = false;\n // each(targetSeries, function (series) {\n // var data = series.getData();\n // var dataDim = data.mapDimension(this._dimName);\n // var stackedDimension = data.getCalculationInfo('stackedDimension');\n // if (stackedDimension && stackedDimension === dataDim) {\n // this.hasSeriesStacked = true;\n // }\n // }, this);\n // `calculateDataWindow` uses min/maxSpan.\n\n setMinMaxSpan(this);\n var dataWindow = this.calculateDataWindow(dataZoomModel.settledOption);\n this._valueWindow = dataWindow.valueWindow;\n this._percentWindow = dataWindow.percentWindow; // Update axis setting then.\n\n setAxisModel(this);\n },\n\n /**\n * @param {module: echarts/component/dataZoom/DataZoomModel} dataZoomModel\n */\n restore: function (dataZoomModel) {\n if (dataZoomModel !== this._dataZoomModel) {\n return;\n }\n\n this._valueWindow = this._percentWindow = null;\n setAxisModel(this, true);\n },\n\n /**\n * @param {module: echarts/component/dataZoom/DataZoomModel} dataZoomModel\n */\n filterData: function (dataZoomModel, api) {\n if (dataZoomModel !== this._dataZoomModel) {\n return;\n }\n\n var axisDim = this._dimName;\n var seriesModels = this.getTargetSeriesModels();\n var filterMode = dataZoomModel.get('filterMode');\n var valueWindow = this._valueWindow;\n\n if (filterMode === 'none') {\n return;\n } // FIXME\n // Toolbox may has dataZoom injected. And if there are stacked bar chart\n // with NaN data, NaN will be filtered and stack will be wrong.\n // So we need to force the mode to be set empty.\n // In fect, it is not a big deal that do not support filterMode-'filter'\n // when using toolbox#dataZoom, utill tooltip#dataZoom support \"single axis\n // selection\" some day, which might need \"adapt to data extent on the\n // otherAxis\", which is disabled by filterMode-'empty'.\n // But currently, stack has been fixed to based on value but not index,\n // so this is not an issue any more.\n // var otherAxisModel = this.getOtherAxisModel();\n // if (dataZoomModel.get('$fromToolbox')\n // && otherAxisModel\n // && otherAxisModel.hasSeriesStacked\n // ) {\n // filterMode = 'empty';\n // }\n // TODO\n // filterMode 'weakFilter' and 'empty' is not optimized for huge data yet.\n\n\n each(seriesModels, function (seriesModel) {\n var seriesData = seriesModel.getData();\n var dataDims = seriesData.mapDimension(axisDim, true);\n\n if (!dataDims.length) {\n return;\n }\n\n if (filterMode === 'weakFilter') {\n seriesData.filterSelf(function (dataIndex) {\n var leftOut;\n var rightOut;\n var hasValue;\n\n for (var i = 0; i < dataDims.length; i++) {\n var value = seriesData.get(dataDims[i], dataIndex);\n var thisHasValue = !isNaN(value);\n var thisLeftOut = value < valueWindow[0];\n var thisRightOut = value > valueWindow[1];\n\n if (thisHasValue && !thisLeftOut && !thisRightOut) {\n return true;\n }\n\n thisHasValue && (hasValue = true);\n thisLeftOut && (leftOut = true);\n thisRightOut && (rightOut = true);\n } // If both left out and right out, do not filter.\n\n\n return hasValue && leftOut && rightOut;\n });\n } else {\n each(dataDims, function (dim) {\n if (filterMode === 'empty') {\n seriesModel.setData(seriesData = seriesData.map(dim, function (value) {\n return !isInWindow(value) ? NaN : value;\n }));\n } else {\n var range = {};\n range[dim] = valueWindow; // console.time('select');\n\n seriesData.selectRange(range); // console.timeEnd('select');\n }\n });\n }\n\n each(dataDims, function (dim) {\n seriesData.setApproximateExtent(valueWindow, dim);\n });\n });\n\n function isInWindow(value) {\n return value >= valueWindow[0] && value <= valueWindow[1];\n }\n }\n};\n\nfunction calculateDataExtent(axisProxy, axisDim, seriesModels) {\n var dataExtent = [Infinity, -Infinity];\n each(seriesModels, function (seriesModel) {\n var seriesData = seriesModel.getData();\n\n if (seriesData) {\n each(seriesData.mapDimension(axisDim, true), function (dim) {\n var seriesExtent = seriesData.getApproximateExtent(dim);\n seriesExtent[0] < dataExtent[0] && (dataExtent[0] = seriesExtent[0]);\n seriesExtent[1] > dataExtent[1] && (dataExtent[1] = seriesExtent[1]);\n });\n }\n });\n\n if (dataExtent[1] < dataExtent[0]) {\n dataExtent = [NaN, NaN];\n } // It is important to get \"consistent\" extent when more then one axes is\n // controlled by a `dataZoom`, otherwise those axes will not be synchronized\n // when zooming. But it is difficult to know what is \"consistent\", considering\n // axes have different type or even different meanings (For example, two\n // time axes are used to compare data of the same date in different years).\n // So basically dataZoom just obtains extent by series.data (in category axis\n // extent can be obtained from axis.data).\n // Nevertheless, user can set min/max/scale on axes to make extent of axes\n // consistent.\n\n\n fixExtentByAxis(axisProxy, dataExtent);\n return dataExtent;\n}\n\nfunction fixExtentByAxis(axisProxy, dataExtent) {\n var axisModel = axisProxy.getAxisModel();\n var min = axisModel.getMin(true); // For category axis, if min/max/scale are not set, extent is determined\n // by axis.data by default.\n\n var isCategoryAxis = axisModel.get('type') === 'category';\n var axisDataLen = isCategoryAxis && axisModel.getCategories().length;\n\n if (min != null && min !== 'dataMin' && typeof min !== 'function') {\n dataExtent[0] = min;\n } else if (isCategoryAxis) {\n dataExtent[0] = axisDataLen > 0 ? 0 : NaN;\n }\n\n var max = axisModel.getMax(true);\n\n if (max != null && max !== 'dataMax' && typeof max !== 'function') {\n dataExtent[1] = max;\n } else if (isCategoryAxis) {\n dataExtent[1] = axisDataLen > 0 ? axisDataLen - 1 : NaN;\n }\n\n if (!axisModel.get('scale', true)) {\n dataExtent[0] > 0 && (dataExtent[0] = 0);\n dataExtent[1] < 0 && (dataExtent[1] = 0);\n } // For value axis, if min/max/scale are not set, we just use the extent obtained\n // by series data, which may be a little different from the extent calculated by\n // `axisHelper.getScaleExtent`. But the different just affects the experience a\n // little when zooming. So it will not be fixed until some users require it strongly.\n\n\n return dataExtent;\n}\n\nfunction setAxisModel(axisProxy, isRestore) {\n var axisModel = axisProxy.getAxisModel();\n var percentWindow = axisProxy._percentWindow;\n var valueWindow = axisProxy._valueWindow;\n\n if (!percentWindow) {\n return;\n } // [0, 500]: arbitrary value, guess axis extent.\n\n\n var precision = numberUtil.getPixelPrecision(valueWindow, [0, 500]);\n precision = Math.min(precision, 20); // isRestore or isFull\n\n var useOrigin = isRestore || percentWindow[0] === 0 && percentWindow[1] === 100;\n axisModel.setRange(useOrigin ? null : +valueWindow[0].toFixed(precision), useOrigin ? null : +valueWindow[1].toFixed(precision));\n}\n\nfunction setMinMaxSpan(axisProxy) {\n var minMaxSpan = axisProxy._minMaxSpan = {};\n var dataZoomModel = axisProxy._dataZoomModel;\n var dataExtent = axisProxy._dataExtent;\n each(['min', 'max'], function (minMax) {\n var percentSpan = dataZoomModel.get(minMax + 'Span');\n var valueSpan = dataZoomModel.get(minMax + 'ValueSpan');\n valueSpan != null && (valueSpan = axisProxy.getAxisModel().axis.scale.parse(valueSpan)); // minValueSpan and maxValueSpan has higher priority than minSpan and maxSpan\n\n if (valueSpan != null) {\n percentSpan = numberUtil.linearMap(dataExtent[0] + valueSpan, dataExtent, [0, 100], true);\n } else if (percentSpan != null) {\n valueSpan = numberUtil.linearMap(percentSpan, [0, 100], dataExtent, true) - dataExtent[0];\n }\n\n minMaxSpan[minMax + 'Span'] = percentSpan;\n minMaxSpan[minMax + 'ValueSpan'] = valueSpan;\n });\n}\n\nvar _default = AxisProxy;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"./gridSimple\");\n\nrequire(\"./axisPointer/CartesianAxisPointer\");\n\nrequire(\"./axisPointer\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/* global Uint8ClampedArray */\nvar GRADIENT_LEVELS = 256;\n/**\n * Heatmap Chart\n *\n * @class\n */\n\nfunction Heatmap() {\n var canvas = zrUtil.createCanvas();\n this.canvas = canvas;\n this.blurSize = 30;\n this.pointSize = 20;\n this.maxOpacity = 1;\n this.minOpacity = 0;\n this._gradientPixels = {};\n}\n\nHeatmap.prototype = {\n /**\n * Renders Heatmap and returns the rendered canvas\n * @param {Array} data array of data, each has x, y, value\n * @param {number} width canvas width\n * @param {number} height canvas height\n */\n update: function (data, width, height, normalize, colorFunc, isInRange) {\n var brush = this._getBrush();\n\n var gradientInRange = this._getGradient(data, colorFunc, 'inRange');\n\n var gradientOutOfRange = this._getGradient(data, colorFunc, 'outOfRange');\n\n var r = this.pointSize + this.blurSize;\n var canvas = this.canvas;\n var ctx = canvas.getContext('2d');\n var len = data.length;\n canvas.width = width;\n canvas.height = height;\n\n for (var i = 0; i < len; ++i) {\n var p = data[i];\n var x = p[0];\n var y = p[1];\n var value = p[2]; // calculate alpha using value\n\n var alpha = normalize(value); // draw with the circle brush with alpha\n\n ctx.globalAlpha = alpha;\n ctx.drawImage(brush, x - r, y - r);\n }\n\n if (!canvas.width || !canvas.height) {\n // Avoid \"Uncaught DOMException: Failed to execute 'getImageData' on\n // 'CanvasRenderingContext2D': The source height is 0.\"\n return canvas;\n } // colorize the canvas using alpha value and set with gradient\n\n\n var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n var pixels = imageData.data;\n var offset = 0;\n var pixelLen = pixels.length;\n var minOpacity = this.minOpacity;\n var maxOpacity = this.maxOpacity;\n var diffOpacity = maxOpacity - minOpacity;\n\n while (offset < pixelLen) {\n var alpha = pixels[offset + 3] / 256;\n var gradientOffset = Math.floor(alpha * (GRADIENT_LEVELS - 1)) * 4; // Simple optimize to ignore the empty data\n\n if (alpha > 0) {\n var gradient = isInRange(alpha) ? gradientInRange : gradientOutOfRange; // Any alpha > 0 will be mapped to [minOpacity, maxOpacity]\n\n alpha > 0 && (alpha = alpha * diffOpacity + minOpacity);\n pixels[offset++] = gradient[gradientOffset];\n pixels[offset++] = gradient[gradientOffset + 1];\n pixels[offset++] = gradient[gradientOffset + 2];\n pixels[offset++] = gradient[gradientOffset + 3] * alpha * 256;\n } else {\n offset += 4;\n }\n }\n\n ctx.putImageData(imageData, 0, 0);\n return canvas;\n },\n\n /**\n * get canvas of a black circle brush used for canvas to draw later\n * @private\n * @returns {Object} circle brush canvas\n */\n _getBrush: function () {\n var brushCanvas = this._brushCanvas || (this._brushCanvas = zrUtil.createCanvas()); // set brush size\n\n var r = this.pointSize + this.blurSize;\n var d = r * 2;\n brushCanvas.width = d;\n brushCanvas.height = d;\n var ctx = brushCanvas.getContext('2d');\n ctx.clearRect(0, 0, d, d); // in order to render shadow without the distinct circle,\n // draw the distinct circle in an invisible place,\n // and use shadowOffset to draw shadow in the center of the canvas\n\n ctx.shadowOffsetX = d;\n ctx.shadowBlur = this.blurSize; // draw the shadow in black, and use alpha and shadow blur to generate\n // color in color map\n\n ctx.shadowColor = '#000'; // draw circle in the left to the canvas\n\n ctx.beginPath();\n ctx.arc(-r, r, this.pointSize, 0, Math.PI * 2, true);\n ctx.closePath();\n ctx.fill();\n return brushCanvas;\n },\n\n /**\n * get gradient color map\n * @private\n */\n _getGradient: function (data, colorFunc, state) {\n var gradientPixels = this._gradientPixels;\n var pixelsSingleState = gradientPixels[state] || (gradientPixels[state] = new Uint8ClampedArray(256 * 4));\n var color = [0, 0, 0, 0];\n var off = 0;\n\n for (var i = 0; i < 256; i++) {\n colorFunc[state](i / 255, true, color);\n pixelsSingleState[off++] = color[0];\n pixelsSingleState[off++] = color[1];\n pixelsSingleState[off++] = color[2];\n pixelsSingleState[off++] = color[3];\n }\n\n return pixelsSingleState;\n }\n};\nvar _default = Heatmap;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n var processedMapType = {};\n ecModel.eachSeriesByType('map', function (mapSeries) {\n var mapType = mapSeries.getMapType();\n\n if (mapSeries.getHostGeoModel() || processedMapType[mapType]) {\n return;\n }\n\n var mapSymbolOffsets = {};\n zrUtil.each(mapSeries.seriesGroup, function (subMapSeries) {\n var geo = subMapSeries.coordinateSystem;\n var data = subMapSeries.originalData;\n\n if (subMapSeries.get('showLegendSymbol') && ecModel.getComponent('legend')) {\n data.each(data.mapDimension('value'), function (value, idx) {\n var name = data.getName(idx);\n var region = geo.getRegion(name); // If input series.data is [11, 22, '-'/null/undefined, 44],\n // it will be filled with NaN: [11, 22, NaN, 44] and NaN will\n // not be drawn. So here must validate if value is NaN.\n\n if (!region || isNaN(value)) {\n return;\n }\n\n var offset = mapSymbolOffsets[name] || 0;\n var point = geo.dataToPoint(region.center);\n mapSymbolOffsets[name] = offset + 1;\n data.setItemLayout(idx, {\n point: point,\n offset: offset\n });\n });\n }\n }); // Show label of those region not has legendSymbol(which is offset 0)\n\n var data = mapSeries.getData();\n data.each(function (idx) {\n var name = data.getName(idx);\n var layout = data.getItemLayout(idx) || {};\n layout.showLabel = !mapSymbolOffsets[name];\n data.setItemLayout(idx, layout);\n });\n processedMapType[mapType] = true;\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar createGraphFromNodeEdge = require(\"../helper/createGraphFromNodeEdge\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\n\nvar Model = require(\"../../model/Model\");\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar SankeySeries = SeriesModel.extend({\n type: 'series.sankey',\n layoutInfo: null,\n levelModels: null,\n\n /**\n * Init a graph data structure from data in option series\n *\n * @param {Object} option the object used to config echarts view\n * @return {module:echarts/data/List} storage initial data\n */\n getInitialData: function (option, ecModel) {\n var links = option.edges || option.links;\n var nodes = option.data || option.nodes;\n var levels = option.levels;\n var levelModels = this.levelModels = {};\n\n for (var i = 0; i < levels.length; i++) {\n if (levels[i].depth != null && levels[i].depth >= 0) {\n levelModels[levels[i].depth] = new Model(levels[i], this, ecModel);\n } else {}\n }\n\n if (nodes && links) {\n var graph = createGraphFromNodeEdge(nodes, links, this, true, beforeLink);\n return graph.data;\n }\n\n function beforeLink(nodeData, edgeData) {\n nodeData.wrapMethod('getItemModel', function (model, idx) {\n model.customizeGetParent(function (path) {\n var parentModel = this.parentModel;\n var nodeDepth = parentModel.getData().getItemLayout(idx).depth;\n var levelModel = parentModel.levelModels[nodeDepth];\n return levelModel || this.parentModel;\n });\n return model;\n });\n edgeData.wrapMethod('getItemModel', function (model, idx) {\n model.customizeGetParent(function (path) {\n var parentModel = this.parentModel;\n var edge = parentModel.getGraph().getEdgeByIndex(idx);\n var depth = edge.node1.getLayout().depth;\n var levelModel = parentModel.levelModels[depth];\n return levelModel || this.parentModel;\n });\n return model;\n });\n }\n },\n setNodePosition: function (dataIndex, localPosition) {\n var dataItem = this.option.data[dataIndex];\n dataItem.localX = localPosition[0];\n dataItem.localY = localPosition[1];\n },\n\n /**\n * Return the graphic data structure\n *\n * @return {module:echarts/data/Graph} graphic data structure\n */\n getGraph: function () {\n return this.getData().graph;\n },\n\n /**\n * Get edge data of graphic data structure\n *\n * @return {module:echarts/data/List} data structure of list\n */\n getEdgeData: function () {\n return this.getGraph().edgeData;\n },\n\n /**\n * @override\n */\n formatTooltip: function (dataIndex, multipleSeries, dataType) {\n // dataType === 'node' or empty do not show tooltip by default\n if (dataType === 'edge') {\n var params = this.getDataParams(dataIndex, dataType);\n var rawDataOpt = params.data;\n var html = rawDataOpt.source + ' -- ' + rawDataOpt.target;\n\n if (params.value) {\n html += ' : ' + params.value;\n }\n\n return encodeHTML(html);\n } else if (dataType === 'node') {\n var node = this.getGraph().getNodeByIndex(dataIndex);\n var value = node.getLayout().value;\n var name = this.getDataParams(dataIndex, dataType).data.name;\n\n if (value) {\n var html = name + ' : ' + value;\n }\n\n return encodeHTML(html);\n }\n\n return SankeySeries.superCall(this, 'formatTooltip', dataIndex, multipleSeries);\n },\n optionUpdated: function () {\n var option = this.option;\n\n if (option.focusNodeAdjacency === true) {\n option.focusNodeAdjacency = 'allEdges';\n }\n },\n // Override Series.getDataParams()\n getDataParams: function (dataIndex, dataType) {\n var params = SankeySeries.superCall(this, 'getDataParams', dataIndex, dataType);\n\n if (params.value == null && dataType === 'node') {\n var node = this.getGraph().getNodeByIndex(dataIndex);\n var nodeValue = node.getLayout().value;\n params.value = nodeValue;\n }\n\n return params;\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'view',\n layout: null,\n // The position of the whole view\n left: '5%',\n top: '5%',\n right: '20%',\n bottom: '5%',\n // Value can be 'vertical'\n orient: 'horizontal',\n // The dx of the node\n nodeWidth: 20,\n // The vertical distance between two nodes\n nodeGap: 8,\n // Control if the node can move or not\n draggable: true,\n // Value can be 'inEdges', 'outEdges', 'allEdges', true (the same as 'allEdges').\n focusNodeAdjacency: false,\n // The number of iterations to change the position of the node\n layoutIterations: 32,\n label: {\n show: true,\n position: 'right',\n color: '#000',\n fontSize: 12\n },\n levels: [],\n // Value can be 'left' or 'right'\n nodeAlign: 'justify',\n itemStyle: {\n borderWidth: 1,\n borderColor: '#333'\n },\n lineStyle: {\n color: '#314656',\n opacity: 0.2,\n curveness: 0.5\n },\n emphasis: {\n label: {\n show: true\n },\n lineStyle: {\n opacity: 0.5\n }\n },\n animationEasing: 'linear',\n animationDuration: 1000\n }\n});\nvar _default = SankeySeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nrequire(\"../coord/geo/GeoModel\");\n\nrequire(\"../coord/geo/geoCreator\");\n\nrequire(\"./geo/GeoView\");\n\nrequire(\"../action/geoRoam\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction makeAction(method, actionInfo) {\n actionInfo.update = 'updateView';\n echarts.registerAction(actionInfo, function (payload, ecModel) {\n var selected = {};\n ecModel.eachComponent({\n mainType: 'geo',\n query: payload\n }, function (geoModel) {\n geoModel[method](payload.name);\n var geo = geoModel.coordinateSystem;\n zrUtil.each(geo.regions, function (region) {\n selected[region.name] = geoModel.isSelected(region.name) || false;\n });\n });\n return {\n selected: selected,\n name: payload.name\n };\n });\n}\n\nmakeAction('toggleSelected', {\n type: 'geoToggleSelect',\n event: 'geoselectchanged'\n});\nmakeAction('select', {\n type: 'geoSelect',\n event: 'geoselected'\n});\nmakeAction('unSelect', {\n type: 'geoUnSelect',\n event: 'geounselected'\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar layout = require(\"../../util/layout\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\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// (24*60*60*1000)\nvar PROXIMATE_ONE_DAY = 86400000;\n/**\n * Calendar\n *\n * @constructor\n *\n * @param {Object} calendarModel calendarModel\n * @param {Object} ecModel ecModel\n * @param {Object} api api\n */\n\nfunction Calendar(calendarModel, ecModel, api) {\n this._model = calendarModel;\n}\n\nCalendar.prototype = {\n constructor: Calendar,\n type: 'calendar',\n dimensions: ['time', 'value'],\n // Required in createListFromData\n getDimensionsInfo: function () {\n return [{\n name: 'time',\n type: 'time'\n }, 'value'];\n },\n getRangeInfo: function () {\n return this._rangeInfo;\n },\n getModel: function () {\n return this._model;\n },\n getRect: function () {\n return this._rect;\n },\n getCellWidth: function () {\n return this._sw;\n },\n getCellHeight: function () {\n return this._sh;\n },\n getOrient: function () {\n return this._orient;\n },\n\n /**\n * getFirstDayOfWeek\n *\n * @example\n * 0 : start at Sunday\n * 1 : start at Monday\n *\n * @return {number}\n */\n getFirstDayOfWeek: function () {\n return this._firstDayOfWeek;\n },\n\n /**\n * get date info\n *\n * @param {string|number} date date\n * @return {Object}\n * {\n * y: string, local full year, eg., '1940',\n * m: string, local month, from '01' ot '12',\n * d: string, local date, from '01' to '31' (if exists),\n * day: It is not date.getDay(). It is the location of the cell in a week, from 0 to 6,\n * time: timestamp,\n * formatedDate: string, yyyy-MM-dd,\n * date: original date object.\n * }\n */\n getDateInfo: function (date) {\n date = numberUtil.parseDate(date);\n var y = date.getFullYear();\n var m = date.getMonth() + 1;\n m = m < 10 ? '0' + m : m;\n var d = date.getDate();\n d = d < 10 ? '0' + d : d;\n var day = date.getDay();\n day = Math.abs((day + 7 - this.getFirstDayOfWeek()) % 7);\n return {\n y: y,\n m: m,\n d: d,\n day: day,\n time: date.getTime(),\n formatedDate: y + '-' + m + '-' + d,\n date: date\n };\n },\n getNextNDay: function (date, n) {\n n = n || 0;\n\n if (n === 0) {\n return this.getDateInfo(date);\n }\n\n date = new Date(this.getDateInfo(date).time);\n date.setDate(date.getDate() + n);\n return this.getDateInfo(date);\n },\n update: function (ecModel, api) {\n this._firstDayOfWeek = +this._model.getModel('dayLabel').get('firstDay');\n this._orient = this._model.get('orient');\n this._lineWidth = this._model.getModel('itemStyle').getItemStyle().lineWidth || 0;\n this._rangeInfo = this._getRangeInfo(this._initRangeOption());\n var weeks = this._rangeInfo.weeks || 1;\n var whNames = ['width', 'height'];\n\n var cellSize = this._model.get('cellSize').slice();\n\n var layoutParams = this._model.getBoxLayoutParams();\n\n var cellNumbers = this._orient === 'horizontal' ? [weeks, 7] : [7, weeks];\n zrUtil.each([0, 1], function (idx) {\n if (cellSizeSpecified(cellSize, idx)) {\n layoutParams[whNames[idx]] = cellSize[idx] * cellNumbers[idx];\n }\n });\n var whGlobal = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var calendarRect = this._rect = layout.getLayoutRect(layoutParams, whGlobal);\n zrUtil.each([0, 1], function (idx) {\n if (!cellSizeSpecified(cellSize, idx)) {\n cellSize[idx] = calendarRect[whNames[idx]] / cellNumbers[idx];\n }\n });\n\n function cellSizeSpecified(cellSize, idx) {\n return cellSize[idx] != null && cellSize[idx] !== 'auto';\n }\n\n this._sw = cellSize[0];\n this._sh = cellSize[1];\n },\n\n /**\n * Convert a time data(time, value) item to (x, y) point.\n *\n * @override\n * @param {Array|number} data data\n * @param {boolean} [clamp=true] out of range\n * @return {Array} point\n */\n dataToPoint: function (data, clamp) {\n zrUtil.isArray(data) && (data = data[0]);\n clamp == null && (clamp = true);\n var dayInfo = this.getDateInfo(data);\n var range = this._rangeInfo;\n var date = dayInfo.formatedDate; // if not in range return [NaN, NaN]\n\n if (clamp && !(dayInfo.time >= range.start.time && dayInfo.time < range.end.time + PROXIMATE_ONE_DAY)) {\n return [NaN, NaN];\n }\n\n var week = dayInfo.day;\n\n var nthWeek = this._getRangeInfo([range.start.time, date]).nthWeek;\n\n if (this._orient === 'vertical') {\n return [this._rect.x + week * this._sw + this._sw / 2, this._rect.y + nthWeek * this._sh + this._sh / 2];\n }\n\n return [this._rect.x + nthWeek * this._sw + this._sw / 2, this._rect.y + week * this._sh + this._sh / 2];\n },\n\n /**\n * Convert a (x, y) point to time data\n *\n * @override\n * @param {string} point point\n * @return {string} data\n */\n pointToData: function (point) {\n var date = this.pointToDate(point);\n return date && date.time;\n },\n\n /**\n * Convert a time date item to (x, y) four point.\n *\n * @param {Array} data date[0] is date\n * @param {boolean} [clamp=true] out of range\n * @return {Object} point\n */\n dataToRect: function (data, clamp) {\n var point = this.dataToPoint(data, clamp);\n return {\n contentShape: {\n x: point[0] - (this._sw - this._lineWidth) / 2,\n y: point[1] - (this._sh - this._lineWidth) / 2,\n width: this._sw - this._lineWidth,\n height: this._sh - this._lineWidth\n },\n center: point,\n tl: [point[0] - this._sw / 2, point[1] - this._sh / 2],\n tr: [point[0] + this._sw / 2, point[1] - this._sh / 2],\n br: [point[0] + this._sw / 2, point[1] + this._sh / 2],\n bl: [point[0] - this._sw / 2, point[1] + this._sh / 2]\n };\n },\n\n /**\n * Convert a (x, y) point to time date\n *\n * @param {Array} point point\n * @return {Object} date\n */\n pointToDate: function (point) {\n var nthX = Math.floor((point[0] - this._rect.x) / this._sw) + 1;\n var nthY = Math.floor((point[1] - this._rect.y) / this._sh) + 1;\n var range = this._rangeInfo.range;\n\n if (this._orient === 'vertical') {\n return this._getDateByWeeksAndDay(nthY, nthX - 1, range);\n }\n\n return this._getDateByWeeksAndDay(nthX, nthY - 1, range);\n },\n\n /**\n * @inheritDoc\n */\n convertToPixel: zrUtil.curry(doConvert, 'dataToPoint'),\n\n /**\n * @inheritDoc\n */\n convertFromPixel: zrUtil.curry(doConvert, 'pointToData'),\n\n /**\n * initRange\n *\n * @private\n * @return {Array} [start, end]\n */\n _initRangeOption: function () {\n var range = this._model.get('range');\n\n var rg = range;\n\n if (zrUtil.isArray(rg) && rg.length === 1) {\n rg = rg[0];\n }\n\n if (/^\\d{4}$/.test(rg)) {\n range = [rg + '-01-01', rg + '-12-31'];\n }\n\n if (/^\\d{4}[\\/|-]\\d{1,2}$/.test(rg)) {\n var start = this.getDateInfo(rg);\n var firstDay = start.date;\n firstDay.setMonth(firstDay.getMonth() + 1);\n var end = this.getNextNDay(firstDay, -1);\n range = [start.formatedDate, end.formatedDate];\n }\n\n if (/^\\d{4}[\\/|-]\\d{1,2}[\\/|-]\\d{1,2}$/.test(rg)) {\n range = [rg, rg];\n }\n\n var tmp = this._getRangeInfo(range);\n\n if (tmp.start.time > tmp.end.time) {\n range.reverse();\n }\n\n return range;\n },\n\n /**\n * range info\n *\n * @private\n * @param {Array} range range ['2017-01-01', '2017-07-08']\n * If range[0] > range[1], they will not be reversed.\n * @return {Object} obj\n */\n _getRangeInfo: function (range) {\n range = [this.getDateInfo(range[0]), this.getDateInfo(range[1])];\n var reversed;\n\n if (range[0].time > range[1].time) {\n reversed = true;\n range.reverse();\n }\n\n var allDay = Math.floor(range[1].time / PROXIMATE_ONE_DAY) - Math.floor(range[0].time / PROXIMATE_ONE_DAY) + 1; // Consider case1 (#11677 #10430):\n // Set the system timezone as \"UK\", set the range to `['2016-07-01', '2016-12-31']`\n // Consider case2:\n // Firstly set system timezone as \"Time Zone: America/Toronto\",\n // ```\n // var first = new Date(1478412000000 - 3600 * 1000 * 2.5);\n // var second = new Date(1478412000000);\n // var allDays = Math.floor(second / ONE_DAY) - Math.floor(first / ONE_DAY) + 1;\n // ```\n // will get wrong result because of DST. So we should fix it.\n\n var date = new Date(range[0].time);\n var startDateNum = date.getDate();\n var endDateNum = range[1].date.getDate();\n date.setDate(startDateNum + allDay - 1); // The bias can not over a month, so just compare date.\n\n var dateNum = date.getDate();\n\n if (dateNum !== endDateNum) {\n var sign = date.getTime() - range[1].time > 0 ? 1 : -1;\n\n while ((dateNum = date.getDate()) !== endDateNum && (date.getTime() - range[1].time) * sign > 0) {\n allDay -= sign;\n date.setDate(dateNum - sign);\n }\n }\n\n var weeks = Math.floor((allDay + range[0].day + 6) / 7);\n var nthWeek = reversed ? -weeks + 1 : weeks - 1;\n reversed && range.reverse();\n return {\n range: [range[0].formatedDate, range[1].formatedDate],\n start: range[0],\n end: range[1],\n allDay: allDay,\n weeks: weeks,\n // From 0.\n nthWeek: nthWeek,\n fweek: range[0].day,\n lweek: range[1].day\n };\n },\n\n /**\n * get date by nthWeeks and week day in range\n *\n * @private\n * @param {number} nthWeek the week\n * @param {number} day the week day\n * @param {Array} range [d1, d2]\n * @return {Object}\n */\n _getDateByWeeksAndDay: function (nthWeek, day, range) {\n var rangeInfo = this._getRangeInfo(range);\n\n if (nthWeek > rangeInfo.weeks || nthWeek === 0 && day < rangeInfo.fweek || nthWeek === rangeInfo.weeks && day > rangeInfo.lweek) {\n return false;\n }\n\n var nthDay = (nthWeek - 1) * 7 - rangeInfo.fweek + day;\n var date = new Date(rangeInfo.start.time);\n date.setDate(rangeInfo.start.d + nthDay);\n return this.getDateInfo(date);\n }\n};\nCalendar.dimensions = Calendar.prototype.dimensions;\nCalendar.getDimensionsInfo = Calendar.prototype.getDimensionsInfo;\n\nCalendar.create = function (ecModel, api) {\n var calendarList = [];\n ecModel.eachComponent('calendar', function (calendarModel) {\n var calendar = new Calendar(calendarModel, ecModel, api);\n calendarList.push(calendar);\n calendarModel.coordinateSystem = calendar;\n });\n ecModel.eachSeries(function (calendarSeries) {\n if (calendarSeries.get('coordinateSystem') === 'calendar') {\n // Inject coordinate system\n calendarSeries.coordinateSystem = calendarList[calendarSeries.get('calendarIndex') || 0];\n }\n });\n return calendarList;\n};\n\nfunction doConvert(methodName, ecModel, finder, value) {\n var calendarModel = finder.calendarModel;\n var seriesModel = finder.seriesModel;\n var coordSys = calendarModel ? calendarModel.coordinateSystem : seriesModel ? seriesModel.coordinateSystem : null;\n return coordSys === this ? coordSys[methodName](value) : null;\n}\n\nCoordinateSystem.register('calendar', Calendar);\nvar _default = Calendar;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./legend/LegendModel\");\n\nrequire(\"./legend/legendAction\");\n\nrequire(\"./legend/LegendView\");\n\nvar legendFilter = require(\"./legend/legendFilter\");\n\nvar Component = require(\"../model/Component\");\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// Do not contain scrollable legend, for sake of file size.\n// Series Filter\necharts.registerProcessor(echarts.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);\nComponent.registerSubTypeDefaulter('legend', function () {\n // Default 'plain' when no type specified.\n return 'plain';\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\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 * @payload\n * @property {number} [seriesIndex]\n * @property {string} [seriesId]\n * @property {string} [seriesName]\n * @property {number} [dataIndex]\n */\necharts.registerAction({\n type: 'focusNodeAdjacency',\n event: 'focusNodeAdjacency',\n update: 'series:focusNodeAdjacency'\n}, function () {});\n/**\n * @payload\n * @property {number} [seriesIndex]\n * @property {string} [seriesId]\n * @property {string} [seriesName]\n */\n\necharts.registerAction({\n type: 'unfocusNodeAdjacency',\n event: 'unfocusNodeAdjacency',\n update: 'series:unfocusNodeAdjacency'\n}, function () {});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar each = _util.each;\n\nvar _simpleLayoutHelper = require(\"./simpleLayoutHelper\");\n\nvar simpleLayout = _simpleLayoutHelper.simpleLayout;\nvar simpleLayoutEdge = _simpleLayoutHelper.simpleLayoutEdge;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel, api) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var layout = seriesModel.get('layout');\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && coordSys.type !== 'view') {\n var data = seriesModel.getData();\n var dimensions = [];\n each(coordSys.dimensions, function (coordDim) {\n dimensions = dimensions.concat(data.mapDimension(coordDim, true));\n });\n\n for (var dataIndex = 0; dataIndex < data.count(); dataIndex++) {\n var value = [];\n var hasValue = false;\n\n for (var i = 0; i < dimensions.length; i++) {\n var val = data.get(dimensions[i], dataIndex);\n\n if (!isNaN(val)) {\n hasValue = true;\n }\n\n value.push(val);\n }\n\n if (hasValue) {\n data.setItemLayout(dataIndex, coordSys.dataToPoint(value));\n } else {\n // Also {Array.}, not undefined to avoid if...else... statement\n data.setItemLayout(dataIndex, [NaN, NaN]);\n }\n }\n\n simpleLayoutEdge(data.graph, seriesModel);\n } else if (!layout || layout === 'none') {\n simpleLayout(seriesModel);\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar lang = require(\"../../../lang\");\n\nvar featureManager = require(\"../featureManager\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar magicTypeLang = lang.toolbox.magicType;\nvar INNER_STACK_KEYWORD = '__ec_magicType_stack__';\n\nfunction MagicType(model) {\n this.model = model;\n}\n\nMagicType.defaultOption = {\n show: true,\n type: [],\n // Icon group\n icon: {\n /* eslint-disable */\n line: 'M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4',\n bar: 'M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7',\n stack: 'M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z' // jshint ignore:line\n\n /* eslint-enable */\n\n },\n // `line`, `bar`, `stack`, `tiled`\n title: zrUtil.clone(magicTypeLang.title),\n option: {},\n seriesIndex: {}\n};\nvar proto = MagicType.prototype;\n\nproto.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon');\n var icons = {};\n zrUtil.each(model.get('type'), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n};\n\nvar seriesOptGenreator = {\n 'line': function (seriesType, seriesId, seriesModel, model) {\n if (seriesType === 'bar') {\n return zrUtil.merge({\n id: seriesId,\n type: 'line',\n // Preserve data related option\n data: seriesModel.get('data'),\n stack: seriesModel.get('stack'),\n markPoint: seriesModel.get('markPoint'),\n markLine: seriesModel.get('markLine')\n }, model.get('option.line') || {}, true);\n }\n },\n 'bar': function (seriesType, seriesId, seriesModel, model) {\n if (seriesType === 'line') {\n return zrUtil.merge({\n id: seriesId,\n type: 'bar',\n // Preserve data related option\n data: seriesModel.get('data'),\n stack: seriesModel.get('stack'),\n markPoint: seriesModel.get('markPoint'),\n markLine: seriesModel.get('markLine')\n }, model.get('option.bar') || {}, true);\n }\n },\n 'stack': function (seriesType, seriesId, seriesModel, model) {\n var isStack = seriesModel.get('stack') === INNER_STACK_KEYWORD;\n\n if (seriesType === 'line' || seriesType === 'bar') {\n model.setIconStatus('stack', isStack ? 'normal' : 'emphasis');\n return zrUtil.merge({\n id: seriesId,\n stack: isStack ? '' : INNER_STACK_KEYWORD\n }, model.get('option.stack') || {}, true);\n }\n }\n};\nvar radioTypes = [['line', 'bar'], ['stack']];\n\nproto.onclick = function (ecModel, api, type) {\n var model = this.model;\n var seriesIndex = model.get('seriesIndex.' + type); // Not supported magicType\n\n if (!seriesOptGenreator[type]) {\n return;\n }\n\n var newOption = {\n series: []\n };\n\n var generateNewSeriesTypes = function (seriesModel) {\n var seriesType = seriesModel.subType;\n var seriesId = seriesModel.id;\n var newSeriesOpt = seriesOptGenreator[type](seriesType, seriesId, seriesModel, model);\n\n if (newSeriesOpt) {\n // PENDING If merge original option?\n zrUtil.defaults(newSeriesOpt, seriesModel.option);\n newOption.series.push(newSeriesOpt);\n } // Modify boundaryGap\n\n\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && coordSys.type === 'cartesian2d' && (type === 'line' || type === 'bar')) {\n var categoryAxis = coordSys.getAxesByScale('ordinal')[0];\n\n if (categoryAxis) {\n var axisDim = categoryAxis.dim;\n var axisType = axisDim + 'Axis';\n var axisModel = ecModel.queryComponents({\n mainType: axisType,\n index: seriesModel.get(name + 'Index'),\n id: seriesModel.get(name + 'Id')\n })[0];\n var axisIndex = axisModel.componentIndex;\n newOption[axisType] = newOption[axisType] || [];\n\n for (var i = 0; i <= axisIndex; i++) {\n newOption[axisType][axisIndex] = newOption[axisType][axisIndex] || {};\n }\n\n newOption[axisType][axisIndex].boundaryGap = type === 'bar';\n }\n }\n };\n\n zrUtil.each(radioTypes, function (radio) {\n if (zrUtil.indexOf(radio, type) >= 0) {\n zrUtil.each(radio, function (item) {\n model.setIconStatus(item, 'normal');\n });\n }\n });\n model.setIconStatus(type, 'emphasis');\n ecModel.eachComponent({\n mainType: 'series',\n query: seriesIndex == null ? null : {\n seriesIndex: seriesIndex\n }\n }, generateNewSeriesTypes);\n var newTitle; // Change title of stack\n\n if (type === 'stack') {\n var isStack = newOption.series && newOption.series[0] && newOption.series[0].stack === INNER_STACK_KEYWORD;\n newTitle = isStack ? zrUtil.merge({\n stack: magicTypeLang.title.tiled\n }, magicTypeLang.title) : zrUtil.clone(magicTypeLang.title);\n }\n\n api.dispatchAction({\n type: 'changeMagicType',\n currentType: type,\n newOption: newOption,\n newTitle: newTitle,\n featureName: 'magicType'\n });\n};\n\necharts.registerAction({\n type: 'changeMagicType',\n event: 'magicTypeChanged',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n ecModel.mergeOption(payload.newOption);\n});\nfeatureManager.register('magicType', MagicType);\nvar _default = MagicType;\nmodule.exports = _default;","var env = require(\"../core/env\");\n\nvar urn = 'urn:schemas-microsoft-com:vml';\nvar win = typeof window === 'undefined' ? null : window;\nvar vmlInited = false;\nvar doc = win && win.document;\n\nfunction createNode(tagName) {\n return doCreateNode(tagName);\n} // Avoid assign to an exported variable, for transforming to cjs.\n\n\nvar doCreateNode;\n\nif (doc && !env.canvasSupported) {\n try {\n !doc.namespaces.zrvml && doc.namespaces.add('zrvml', urn);\n\n doCreateNode = function (tagName) {\n return doc.createElement('');\n };\n } catch (e) {\n doCreateNode = function (tagName) {\n return doc.createElement('<' + tagName + ' xmlns=\"' + urn + '\" class=\"zrvml\">');\n };\n }\n} // From raphael\n\n\nfunction initVML() {\n if (vmlInited || !doc) {\n return;\n }\n\n vmlInited = true;\n var styleSheets = doc.styleSheets;\n\n if (styleSheets.length < 31) {\n doc.createStyleSheet().addRule('.zrvml', 'behavior:url(#default#VML)');\n } else {\n // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx\n styleSheets[0].addRule('.zrvml', 'behavior:url(#default#VML)');\n }\n}\n\nexports.doc = doc;\nexports.createNode = createNode;\nexports.initVML = initVML;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(seriesType) {\n return {\n seriesType: seriesType,\n reset: function (seriesModel, ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n\n if (!legendModels || !legendModels.length) {\n return;\n }\n\n var data = seriesModel.getData();\n data.filterSelf(function (idx) {\n var name = data.getName(idx); // If in any legend component the status is not selected.\n\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(name)) {\n return false;\n }\n }\n\n return true;\n });\n }\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar BaseBarSeries = require(\"./BaseBarSeries\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PictorialBarSeries = BaseBarSeries.extend({\n type: 'series.pictorialBar',\n dependencies: ['grid'],\n defaultOption: {\n symbol: 'circle',\n // Customized bar shape\n symbolSize: null,\n // Can be ['100%', '100%'], null means auto.\n symbolRotate: null,\n symbolPosition: null,\n // 'start' or 'end' or 'center', null means auto.\n symbolOffset: null,\n symbolMargin: null,\n // start margin and end margin. Can be a number or a percent string.\n // Auto margin by default.\n symbolRepeat: false,\n // false/null/undefined, means no repeat.\n // Can be true, means auto calculate repeat times and cut by data.\n // Can be a number, specifies repeat times, and do not cut by data.\n // Can be 'fixed', means auto calculate repeat times but do not cut by data.\n symbolRepeatDirection: 'end',\n // 'end' means from 'start' to 'end'.\n symbolClip: false,\n symbolBoundingData: null,\n // Can be 60 or -40 or [-40, 60]\n symbolPatternSize: 400,\n // 400 * 400 px\n barGap: '-100%',\n // In most case, overlap is needed.\n // z can be set in data item, which is z2 actually.\n // Disable progressive\n progressive: 0,\n hoverAnimation: false // Open only when needed.\n\n },\n getInitialData: function (option) {\n // Disable stack.\n option.stack = null;\n return PictorialBarSeries.superApply(this, 'getInitialData', arguments);\n }\n});\nvar _default = PictorialBarSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar actionInfo = {\n type: 'selectDataRange',\n event: 'dataRangeSelected',\n // FIXME use updateView appears wrong\n update: 'update'\n};\necharts.registerAction(actionInfo, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'visualMap',\n query: payload\n }, function (model) {\n model.setSelected(payload.selected);\n });\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nrequire(\"./sunburst/SunburstSeries\");\n\nrequire(\"./sunburst/SunburstView\");\n\nrequire(\"./sunburst/sunburstAction\");\n\nvar dataColor = require(\"../visual/dataColor\");\n\nvar sunburstLayout = require(\"./sunburst/sunburstLayout\");\n\nvar dataFilter = require(\"../processor/dataFilter\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerVisual(zrUtil.curry(dataColor, 'sunburst'));\necharts.registerLayout(zrUtil.curry(sunburstLayout, 'sunburst'));\necharts.registerProcessor(zrUtil.curry(dataFilter, 'sunburst'));","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar _roamHelper = require(\"../../action/roamHelper\");\n\nvar updateCenterAndZoom = _roamHelper.updateCenterAndZoom;\n\nrequire(\"../helper/focusNodeAdjacencyAction\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar actionInfo = {\n type: 'graphRoam',\n event: 'graphRoam',\n update: 'none'\n};\n/**\n * @payload\n * @property {string} name Series name\n * @property {number} [dx]\n * @property {number} [dy]\n * @property {number} [zoom]\n * @property {number} [originX]\n * @property {number} [originY]\n */\n\necharts.registerAction(actionInfo, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n query: payload\n }, function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n var res = updateCenterAndZoom(coordSys, payload);\n seriesModel.setCenter && seriesModel.setCenter(res.center);\n seriesModel.setZoom && seriesModel.setZoom(res.zoom);\n });\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @param {module:echarts/coord/View} view\n * @param {Object} payload\n * @param {Object} [zoomLimit]\n */\nfunction updateCenterAndZoom(view, payload, zoomLimit) {\n var previousZoom = view.getZoom();\n var center = view.getCenter();\n var zoom = payload.zoom;\n var point = view.dataToPoint(center);\n\n if (payload.dx != null && payload.dy != null) {\n point[0] -= payload.dx;\n point[1] -= payload.dy;\n var center = view.pointToData(point);\n view.setCenter(center);\n }\n\n if (zoom != null) {\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n zoom = Math.max(Math.min(previousZoom * zoom, zoomMax), zoomMin) / previousZoom;\n } // Zoom on given point(originX, originY)\n\n\n view.scale[0] *= zoom;\n view.scale[1] *= zoom;\n var position = view.position;\n var fixX = (payload.originX - position[0]) * (zoom - 1);\n var fixY = (payload.originY - position[1]) * (zoom - 1);\n position[0] -= fixX;\n position[1] -= fixY;\n view.updateTransform(); // Get the new center\n\n var center = view.pointToData(point);\n view.setCenter(center);\n view.setZoom(zoom * previousZoom);\n }\n\n return {\n center: view.getCenter(),\n zoom: view.getZoom()\n };\n}\n\nexports.updateCenterAndZoom = updateCenterAndZoom;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar layoutUtil = require(\"../../util/layout\");\n\nvar axisHelper = require(\"../../coord/axisHelper\");\n\nvar ParallelAxis = require(\"./ParallelAxis\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar sliderMove = require(\"../../component/helper/sliderMove\");\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 * Parallel Coordinates\n * \n */\nvar each = zrUtil.each;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathFloor = Math.floor;\nvar mathCeil = Math.ceil;\nvar round = numberUtil.round;\nvar PI = Math.PI;\n\nfunction Parallel(parallelModel, ecModel, api) {\n /**\n * key: dimension\n * @type {Object.}\n * @private\n */\n this._axesMap = zrUtil.createHashMap();\n /**\n * key: dimension\n * value: {position: [], rotation, }\n * @type {Object.}\n * @private\n */\n\n this._axesLayout = {};\n /**\n * Always follow axis order.\n * @type {Array.}\n * @readOnly\n */\n\n this.dimensions = parallelModel.dimensions;\n /**\n * @type {module:zrender/core/BoundingRect}\n */\n\n this._rect;\n /**\n * @type {module:echarts/coord/parallel/ParallelModel}\n */\n\n this._model = parallelModel;\n\n this._init(parallelModel, ecModel, api);\n}\n\nParallel.prototype = {\n type: 'parallel',\n constructor: Parallel,\n\n /**\n * Initialize cartesian coordinate systems\n * @private\n */\n _init: function (parallelModel, ecModel, api) {\n var dimensions = parallelModel.dimensions;\n var parallelAxisIndex = parallelModel.parallelAxisIndex;\n each(dimensions, function (dim, idx) {\n var axisIndex = parallelAxisIndex[idx];\n var axisModel = ecModel.getComponent('parallelAxis', axisIndex);\n\n var axis = this._axesMap.set(dim, new ParallelAxis(dim, axisHelper.createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisIndex));\n\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse'); // Injection\n\n axisModel.axis = axis;\n axis.model = axisModel;\n axis.coordinateSystem = axisModel.coordinateSystem = this;\n }, this);\n },\n\n /**\n * Update axis scale after data processed\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n */\n update: function (ecModel, api) {\n this._updateAxesFromSeries(this._model, ecModel);\n },\n\n /**\n * @override\n */\n containPoint: function (point) {\n var layoutInfo = this._makeLayoutInfo();\n\n var axisBase = layoutInfo.axisBase;\n var layoutBase = layoutInfo.layoutBase;\n var pixelDimIndex = layoutInfo.pixelDimIndex;\n var pAxis = point[1 - pixelDimIndex];\n var pLayout = point[pixelDimIndex];\n return pAxis >= axisBase && pAxis <= axisBase + layoutInfo.axisLength && pLayout >= layoutBase && pLayout <= layoutBase + layoutInfo.layoutLength;\n },\n getModel: function () {\n return this._model;\n },\n\n /**\n * Update properties from series\n * @private\n */\n _updateAxesFromSeries: function (parallelModel, ecModel) {\n ecModel.eachSeries(function (seriesModel) {\n if (!parallelModel.contains(seriesModel, ecModel)) {\n return;\n }\n\n var data = seriesModel.getData();\n each(this.dimensions, function (dim) {\n var axis = this._axesMap.get(dim);\n\n axis.scale.unionExtentFromData(data, data.mapDimension(dim));\n axisHelper.niceScaleExtent(axis.scale, axis.model);\n }, this);\n }, this);\n },\n\n /**\n * Resize the parallel coordinate system.\n * @param {module:echarts/coord/parallel/ParallelModel} parallelModel\n * @param {module:echarts/ExtensionAPI} api\n */\n resize: function (parallelModel, api) {\n this._rect = layoutUtil.getLayoutRect(parallelModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n\n this._layoutAxes();\n },\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n getRect: function () {\n return this._rect;\n },\n\n /**\n * @private\n */\n _makeLayoutInfo: function () {\n var parallelModel = this._model;\n var rect = this._rect;\n var xy = ['x', 'y'];\n var wh = ['width', 'height'];\n var layout = parallelModel.get('layout');\n var pixelDimIndex = layout === 'horizontal' ? 0 : 1;\n var layoutLength = rect[wh[pixelDimIndex]];\n var layoutExtent = [0, layoutLength];\n var axisCount = this.dimensions.length;\n var axisExpandWidth = restrict(parallelModel.get('axisExpandWidth'), layoutExtent);\n var axisExpandCount = restrict(parallelModel.get('axisExpandCount') || 0, [0, axisCount]);\n var axisExpandable = parallelModel.get('axisExpandable') && axisCount > 3 && axisCount > axisExpandCount && axisExpandCount > 1 && axisExpandWidth > 0 && layoutLength > 0; // `axisExpandWindow` is According to the coordinates of [0, axisExpandLength],\n // for sake of consider the case that axisCollapseWidth is 0 (when screen is narrow),\n // where collapsed axes should be overlapped.\n\n var axisExpandWindow = parallelModel.get('axisExpandWindow');\n var winSize;\n\n if (!axisExpandWindow) {\n winSize = restrict(axisExpandWidth * (axisExpandCount - 1), layoutExtent);\n var axisExpandCenter = parallelModel.get('axisExpandCenter') || mathFloor(axisCount / 2);\n axisExpandWindow = [axisExpandWidth * axisExpandCenter - winSize / 2];\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\n } else {\n winSize = restrict(axisExpandWindow[1] - axisExpandWindow[0], layoutExtent);\n axisExpandWindow[1] = axisExpandWindow[0] + winSize;\n }\n\n var axisCollapseWidth = (layoutLength - winSize) / (axisCount - axisExpandCount); // Avoid axisCollapseWidth is too small.\n\n axisCollapseWidth < 3 && (axisCollapseWidth = 0); // Find the first and last indices > ewin[0] and < ewin[1].\n\n var winInnerIndices = [mathFloor(round(axisExpandWindow[0] / axisExpandWidth, 1)) + 1, mathCeil(round(axisExpandWindow[1] / axisExpandWidth, 1)) - 1]; // Pos in ec coordinates.\n\n var axisExpandWindow0Pos = axisCollapseWidth / axisExpandWidth * axisExpandWindow[0];\n return {\n layout: layout,\n pixelDimIndex: pixelDimIndex,\n layoutBase: rect[xy[pixelDimIndex]],\n layoutLength: layoutLength,\n axisBase: rect[xy[1 - pixelDimIndex]],\n axisLength: rect[wh[1 - pixelDimIndex]],\n axisExpandable: axisExpandable,\n axisExpandWidth: axisExpandWidth,\n axisCollapseWidth: axisCollapseWidth,\n axisExpandWindow: axisExpandWindow,\n axisCount: axisCount,\n winInnerIndices: winInnerIndices,\n axisExpandWindow0Pos: axisExpandWindow0Pos\n };\n },\n\n /**\n * @private\n */\n _layoutAxes: function () {\n var rect = this._rect;\n var axes = this._axesMap;\n var dimensions = this.dimensions;\n\n var layoutInfo = this._makeLayoutInfo();\n\n var layout = layoutInfo.layout;\n axes.each(function (axis) {\n var axisExtent = [0, layoutInfo.axisLength];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(axisExtent[idx], axisExtent[1 - idx]);\n });\n each(dimensions, function (dim, idx) {\n var posInfo = (layoutInfo.axisExpandable ? layoutAxisWithExpand : layoutAxisWithoutExpand)(idx, layoutInfo);\n var positionTable = {\n horizontal: {\n x: posInfo.position,\n y: layoutInfo.axisLength\n },\n vertical: {\n x: 0,\n y: posInfo.position\n }\n };\n var rotationTable = {\n horizontal: PI / 2,\n vertical: 0\n };\n var position = [positionTable[layout].x + rect.x, positionTable[layout].y + rect.y];\n var rotation = rotationTable[layout];\n var transform = matrix.create();\n matrix.rotate(transform, transform, rotation);\n matrix.translate(transform, transform, position); // TODO\n // tick等排布信息。\n // TODO\n // 根据axis order 更新 dimensions顺序。\n\n this._axesLayout[dim] = {\n position: position,\n rotation: rotation,\n transform: transform,\n axisNameAvailableWidth: posInfo.axisNameAvailableWidth,\n axisLabelShow: posInfo.axisLabelShow,\n nameTruncateMaxWidth: posInfo.nameTruncateMaxWidth,\n tickDirection: 1,\n labelDirection: 1\n };\n }, this);\n },\n\n /**\n * Get axis by dim.\n * @param {string} dim\n * @return {module:echarts/coord/parallel/ParallelAxis} [description]\n */\n getAxis: function (dim) {\n return this._axesMap.get(dim);\n },\n\n /**\n * Convert a dim value of a single item of series data to Point.\n * @param {*} value\n * @param {string} dim\n * @return {Array}\n */\n dataToPoint: function (value, dim) {\n return this.axisCoordToPoint(this._axesMap.get(dim).dataToCoord(value), dim);\n },\n\n /**\n * Travel data for one time, get activeState of each data item.\n * @param {module:echarts/data/List} data\n * @param {Functio} cb param: {string} activeState 'active' or 'inactive' or 'normal'\n * {number} dataIndex\n * @param {number} [start=0] the start dataIndex that travel from.\n * @param {number} [end=data.count()] the next dataIndex of the last dataIndex will be travel.\n */\n eachActiveState: function (data, callback, start, end) {\n start == null && (start = 0);\n end == null && (end = data.count());\n var axesMap = this._axesMap;\n var dimensions = this.dimensions;\n var dataDimensions = [];\n var axisModels = [];\n zrUtil.each(dimensions, function (axisDim) {\n dataDimensions.push(data.mapDimension(axisDim));\n axisModels.push(axesMap.get(axisDim).model);\n });\n var hasActiveSet = this.hasAxisBrushed();\n\n for (var dataIndex = start; dataIndex < end; dataIndex++) {\n var activeState;\n\n if (!hasActiveSet) {\n activeState = 'normal';\n } else {\n activeState = 'active';\n var values = data.getValues(dataDimensions, dataIndex);\n\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\n var state = axisModels[j].getActiveState(values[j]);\n\n if (state === 'inactive') {\n activeState = 'inactive';\n break;\n }\n }\n }\n\n callback(activeState, dataIndex);\n }\n },\n\n /**\n * Whether has any activeSet.\n * @return {boolean}\n */\n hasAxisBrushed: function () {\n var dimensions = this.dimensions;\n var axesMap = this._axesMap;\n var hasActiveSet = false;\n\n for (var j = 0, lenj = dimensions.length; j < lenj; j++) {\n if (axesMap.get(dimensions[j]).model.getActiveState() !== 'normal') {\n hasActiveSet = true;\n }\n }\n\n return hasActiveSet;\n },\n\n /**\n * Convert coords of each axis to Point.\n * Return point. For example: [10, 20]\n * @param {Array.} coords\n * @param {string} dim\n * @return {Array.}\n */\n axisCoordToPoint: function (coord, dim) {\n var axisLayout = this._axesLayout[dim];\n return graphic.applyTransform([coord, 0], axisLayout.transform);\n },\n\n /**\n * Get axis layout.\n */\n getAxisLayout: function (dim) {\n return zrUtil.clone(this._axesLayout[dim]);\n },\n\n /**\n * @param {Array.} point\n * @return {Object} {axisExpandWindow, delta, behavior: 'jump' | 'slide' | 'none'}.\n */\n getSlidedAxisExpandWindow: function (point) {\n var layoutInfo = this._makeLayoutInfo();\n\n var pixelDimIndex = layoutInfo.pixelDimIndex;\n var axisExpandWindow = layoutInfo.axisExpandWindow.slice();\n var winSize = axisExpandWindow[1] - axisExpandWindow[0];\n var extent = [0, layoutInfo.axisExpandWidth * (layoutInfo.axisCount - 1)]; // Out of the area of coordinate system.\n\n if (!this.containPoint(point)) {\n return {\n behavior: 'none',\n axisExpandWindow: axisExpandWindow\n };\n } // Conver the point from global to expand coordinates.\n\n\n var pointCoord = point[pixelDimIndex] - layoutInfo.layoutBase - layoutInfo.axisExpandWindow0Pos; // For dragging operation convenience, the window should not be\n // slided when mouse is the center area of the window.\n\n var delta;\n var behavior = 'slide';\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n\n var triggerArea = this._model.get('axisExpandSlideTriggerArea'); // But consider touch device, jump is necessary.\n\n\n var useJump = triggerArea[0] != null;\n\n if (axisCollapseWidth) {\n if (useJump && axisCollapseWidth && pointCoord < winSize * triggerArea[0]) {\n behavior = 'jump';\n delta = pointCoord - winSize * triggerArea[2];\n } else if (useJump && axisCollapseWidth && pointCoord > winSize * (1 - triggerArea[0])) {\n behavior = 'jump';\n delta = pointCoord - winSize * (1 - triggerArea[2]);\n } else {\n (delta = pointCoord - winSize * triggerArea[1]) >= 0 && (delta = pointCoord - winSize * (1 - triggerArea[1])) <= 0 && (delta = 0);\n }\n\n delta *= layoutInfo.axisExpandWidth / axisCollapseWidth;\n delta ? sliderMove(delta, axisExpandWindow, extent, 'all') // Avoid nonsense triger on mousemove.\n : behavior = 'none';\n } // When screen is too narrow, make it visible and slidable, although it is hard to interact.\n else {\n var winSize = axisExpandWindow[1] - axisExpandWindow[0];\n var pos = extent[1] * pointCoord / winSize;\n axisExpandWindow = [mathMax(0, pos - winSize / 2)];\n axisExpandWindow[1] = mathMin(extent[1], axisExpandWindow[0] + winSize);\n axisExpandWindow[0] = axisExpandWindow[1] - winSize;\n }\n\n return {\n axisExpandWindow: axisExpandWindow,\n behavior: behavior\n };\n }\n};\n\nfunction restrict(len, extent) {\n return mathMin(mathMax(len, extent[0]), extent[1]);\n}\n\nfunction layoutAxisWithoutExpand(axisIndex, layoutInfo) {\n var step = layoutInfo.layoutLength / (layoutInfo.axisCount - 1);\n return {\n position: step * axisIndex,\n axisNameAvailableWidth: step,\n axisLabelShow: true\n };\n}\n\nfunction layoutAxisWithExpand(axisIndex, layoutInfo) {\n var layoutLength = layoutInfo.layoutLength;\n var axisExpandWidth = layoutInfo.axisExpandWidth;\n var axisCount = layoutInfo.axisCount;\n var axisCollapseWidth = layoutInfo.axisCollapseWidth;\n var winInnerIndices = layoutInfo.winInnerIndices;\n var position;\n var axisNameAvailableWidth = axisCollapseWidth;\n var axisLabelShow = false;\n var nameTruncateMaxWidth;\n\n if (axisIndex < winInnerIndices[0]) {\n position = axisIndex * axisCollapseWidth;\n nameTruncateMaxWidth = axisCollapseWidth;\n } else if (axisIndex <= winInnerIndices[1]) {\n position = layoutInfo.axisExpandWindow0Pos + axisIndex * axisExpandWidth - layoutInfo.axisExpandWindow[0];\n axisNameAvailableWidth = axisExpandWidth;\n axisLabelShow = true;\n } else {\n position = layoutLength - (axisCount - 1 - axisIndex) * axisCollapseWidth;\n nameTruncateMaxWidth = axisCollapseWidth;\n }\n\n return {\n position: position,\n axisNameAvailableWidth: axisNameAvailableWidth,\n axisLabelShow: axisLabelShow,\n nameTruncateMaxWidth: nameTruncateMaxWidth\n };\n}\n\nvar _default = Parallel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./treemap/TreemapSeries\");\n\nrequire(\"./treemap/TreemapView\");\n\nrequire(\"./treemap/treemapAction\");\n\nvar treemapVisual = require(\"./treemap/treemapVisual\");\n\nvar treemapLayout = require(\"./treemap/treemapLayout\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerVisual(treemapVisual);\necharts.registerLayout(treemapLayout);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./marker/MarkPointModel\");\n\nrequire(\"./marker/MarkPointView\");\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// HINT Markpoint can't be used too much\necharts.registerPreprocessor(function (opt) {\n // Make sure markPoint component is enabled\n opt.markPoint = opt.markPoint || {};\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\nvar featureManager = require(\"./featureManager\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar Model = require(\"../../model/Model\");\n\nvar DataDiffer = require(\"../../data/DataDiffer\");\n\nvar listComponentHelper = require(\"../helper/listComponent\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = echarts.extendComponentView({\n type: 'toolbox',\n render: function (toolboxModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n\n if (!toolboxModel.get('show')) {\n return;\n }\n\n var itemSize = +toolboxModel.get('itemSize');\n var featureOpts = toolboxModel.get('feature') || {};\n var features = this._features || (this._features = {});\n var featureNames = [];\n zrUtil.each(featureOpts, function (opt, name) {\n featureNames.push(name);\n });\n new DataDiffer(this._featureNames || [], featureNames).add(processFeature).update(processFeature).remove(zrUtil.curry(processFeature, null)).execute(); // Keep for diff.\n\n this._featureNames = featureNames;\n\n function processFeature(newIndex, oldIndex) {\n var featureName = featureNames[newIndex];\n var oldName = featureNames[oldIndex];\n var featureOpt = featureOpts[featureName];\n var featureModel = new Model(featureOpt, toolboxModel, toolboxModel.ecModel);\n var feature; // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?\n\n if (payload && payload.newTitle != null && payload.featureName === featureName) {\n featureOpt.title = payload.newTitle;\n }\n\n if (featureName && !oldName) {\n // Create\n if (isUserFeatureName(featureName)) {\n feature = {\n model: featureModel,\n onclick: featureModel.option.onclick,\n featureName: featureName\n };\n } else {\n var Feature = featureManager.get(featureName);\n\n if (!Feature) {\n return;\n }\n\n feature = new Feature(featureModel, ecModel, api);\n }\n\n features[featureName] = feature;\n } else {\n feature = features[oldName]; // If feature does not exsit.\n\n if (!feature) {\n return;\n }\n\n feature.model = featureModel;\n feature.ecModel = ecModel;\n feature.api = api;\n }\n\n if (!featureName && oldName) {\n feature.dispose && feature.dispose(ecModel, api);\n return;\n }\n\n if (!featureModel.get('show') || feature.unusable) {\n feature.remove && feature.remove(ecModel, api);\n return;\n }\n\n createIconPaths(featureModel, feature, featureName);\n\n featureModel.setIconStatus = function (iconName, status) {\n var option = this.option;\n var iconPaths = this.iconPaths;\n option.iconStatus = option.iconStatus || {};\n option.iconStatus[iconName] = status; // FIXME\n\n iconPaths[iconName] && iconPaths[iconName].trigger(status);\n };\n\n if (feature.render) {\n feature.render(featureModel, ecModel, api, payload);\n }\n }\n\n function createIconPaths(featureModel, feature, featureName) {\n var iconStyleModel = featureModel.getModel('iconStyle');\n var iconStyleEmphasisModel = featureModel.getModel('emphasis.iconStyle'); // If one feature has mutiple icon. they are orginaized as\n // {\n // icon: {\n // foo: '',\n // bar: ''\n // },\n // title: {\n // foo: '',\n // bar: ''\n // }\n // }\n\n var icons = feature.getIcons ? feature.getIcons() : featureModel.get('icon');\n var titles = featureModel.get('title') || {};\n\n if (typeof icons === 'string') {\n var icon = icons;\n var title = titles;\n icons = {};\n titles = {};\n icons[featureName] = icon;\n titles[featureName] = title;\n }\n\n var iconPaths = featureModel.iconPaths = {};\n zrUtil.each(icons, function (iconStr, iconName) {\n var path = graphic.createIcon(iconStr, {}, {\n x: -itemSize / 2,\n y: -itemSize / 2,\n width: itemSize,\n height: itemSize\n });\n path.setStyle(iconStyleModel.getItemStyle());\n path.hoverStyle = iconStyleEmphasisModel.getItemStyle(); // Text position calculation\n\n path.setStyle({\n text: titles[iconName],\n textAlign: iconStyleEmphasisModel.get('textAlign'),\n textBorderRadius: iconStyleEmphasisModel.get('textBorderRadius'),\n textPadding: iconStyleEmphasisModel.get('textPadding'),\n textFill: null\n });\n var tooltipModel = toolboxModel.getModel('tooltip');\n\n if (tooltipModel && tooltipModel.get('show')) {\n path.attr('tooltip', zrUtil.extend({\n content: titles[iconName],\n formatter: tooltipModel.get('formatter', true) || function () {\n return titles[iconName];\n },\n formatterParams: {\n componentType: 'toolbox',\n name: iconName,\n title: titles[iconName],\n $vars: ['name', 'title']\n },\n position: tooltipModel.get('position', true) || 'bottom'\n }, tooltipModel.option));\n }\n\n graphic.setHoverStyle(path);\n\n if (toolboxModel.get('showTitle')) {\n path.__title = titles[iconName];\n path.on('mouseover', function () {\n // Should not reuse above hoverStyle, which might be modified.\n var hoverStyle = iconStyleEmphasisModel.getItemStyle();\n var defaultTextPosition = toolboxModel.get('orient') === 'vertical' ? toolboxModel.get('right') == null ? 'right' : 'left' : toolboxModel.get('bottom') == null ? 'bottom' : 'top';\n path.setStyle({\n textFill: iconStyleEmphasisModel.get('textFill') || hoverStyle.fill || hoverStyle.stroke || '#000',\n textBackgroundColor: iconStyleEmphasisModel.get('textBackgroundColor'),\n textPosition: iconStyleEmphasisModel.get('textPosition') || defaultTextPosition\n });\n }).on('mouseout', function () {\n path.setStyle({\n textFill: null,\n textBackgroundColor: null\n });\n });\n }\n\n path.trigger(featureModel.get('iconStatus.' + iconName) || 'normal');\n group.add(path);\n path.on('click', zrUtil.bind(feature.onclick, feature, ecModel, api, iconName));\n iconPaths[iconName] = path;\n });\n }\n\n listComponentHelper.layout(group, toolboxModel, api); // Render background after group is layout\n // FIXME\n\n group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel)); // Adjust icon title positions to avoid them out of screen\n\n group.eachChild(function (icon) {\n var titleText = icon.__title;\n var hoverStyle = icon.hoverStyle; // May be background element\n\n if (hoverStyle && titleText) {\n var rect = textContain.getBoundingRect(titleText, textContain.makeFont(hoverStyle));\n var offsetX = icon.position[0] + group.position[0];\n var offsetY = icon.position[1] + group.position[1] + itemSize;\n var needPutOnTop = false;\n\n if (offsetY + rect.height > api.getHeight()) {\n hoverStyle.textPosition = 'top';\n needPutOnTop = true;\n }\n\n var topOffset = needPutOnTop ? -5 - rect.height : itemSize + 8;\n\n if (offsetX + rect.width / 2 > api.getWidth()) {\n hoverStyle.textPosition = ['100%', topOffset];\n hoverStyle.textAlign = 'right';\n } else if (offsetX - rect.width / 2 < 0) {\n hoverStyle.textPosition = [0, topOffset];\n hoverStyle.textAlign = 'left';\n }\n }\n });\n },\n updateView: function (toolboxModel, ecModel, api, payload) {\n zrUtil.each(this._features, function (feature) {\n feature.updateView && feature.updateView(feature.model, ecModel, api, payload);\n });\n },\n // updateLayout: function (toolboxModel, ecModel, api, payload) {\n // zrUtil.each(this._features, function (feature) {\n // feature.updateLayout && feature.updateLayout(feature.model, ecModel, api, payload);\n // });\n // },\n remove: function (ecModel, api) {\n zrUtil.each(this._features, function (feature) {\n feature.remove && feature.remove(ecModel, api);\n });\n this.group.removeAll();\n },\n dispose: function (ecModel, api) {\n zrUtil.each(this._features, function (feature) {\n feature.dispose && feature.dispose(ecModel, api);\n });\n }\n});\n\nfunction isUserFeatureName(featureName) {\n return featureName.indexOf('my') === 0;\n}\n\nmodule.exports = _default;","var _core = require(\"./core\");\n\nvar createElement = _core.createElement;\n\nvar util = require(\"../core/util\");\n\nvar logError = require(\"../core/log\");\n\nvar Path = require(\"../graphic/Path\");\n\nvar ZImage = require(\"../graphic/Image\");\n\nvar ZText = require(\"../graphic/Text\");\n\nvar arrayDiff = require(\"../core/arrayDiff2\");\n\nvar GradientManager = require(\"./helper/GradientManager\");\n\nvar ClippathManager = require(\"./helper/ClippathManager\");\n\nvar ShadowManager = require(\"./helper/ShadowManager\");\n\nvar _graphic = require(\"./graphic\");\n\nvar svgPath = _graphic.path;\nvar svgImage = _graphic.image;\nvar svgText = _graphic.text;\n\n/**\n * SVG Painter\n * @module zrender/svg/Painter\n */\nfunction parseInt10(val) {\n return parseInt(val, 10);\n}\n\nfunction getSvgProxy(el) {\n if (el instanceof Path) {\n return svgPath;\n } else if (el instanceof ZImage) {\n return svgImage;\n } else if (el instanceof ZText) {\n return svgText;\n } else {\n return svgPath;\n }\n}\n\nfunction checkParentAvailable(parent, child) {\n return child && parent && child.parentNode !== parent;\n}\n\nfunction insertAfter(parent, child, prevSibling) {\n if (checkParentAvailable(parent, child) && prevSibling) {\n var nextSibling = prevSibling.nextSibling;\n nextSibling ? parent.insertBefore(child, nextSibling) : parent.appendChild(child);\n }\n}\n\nfunction prepend(parent, child) {\n if (checkParentAvailable(parent, child)) {\n var firstChild = parent.firstChild;\n firstChild ? parent.insertBefore(child, firstChild) : parent.appendChild(child);\n }\n} // function append(parent, child) {\n// if (checkParentAvailable(parent, child)) {\n// parent.appendChild(child);\n// }\n// }\n\n\nfunction remove(parent, child) {\n if (child && parent && child.parentNode === parent) {\n parent.removeChild(child);\n }\n}\n\nfunction getTextSvgElement(displayable) {\n return displayable.__textSvgEl;\n}\n\nfunction getSvgElement(displayable) {\n return displayable.__svgEl;\n}\n/**\n * @alias module:zrender/svg/Painter\n * @constructor\n * @param {HTMLElement} root 绘图容器\n * @param {module:zrender/Storage} storage\n * @param {Object} opts\n */\n\n\nvar SVGPainter = function (root, storage, opts, zrId) {\n this.root = root;\n this.storage = storage;\n this._opts = opts = util.extend({}, opts || {});\n var svgDom = createElement('svg');\n svgDom.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svgDom.setAttribute('version', '1.1');\n svgDom.setAttribute('baseProfile', 'full');\n svgDom.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';\n var bgRoot = createElement('g');\n svgDom.appendChild(bgRoot);\n var svgRoot = createElement('g');\n svgDom.appendChild(svgRoot);\n this.gradientManager = new GradientManager(zrId, svgRoot);\n this.clipPathManager = new ClippathManager(zrId, svgRoot);\n this.shadowManager = new ShadowManager(zrId, svgRoot);\n var viewport = document.createElement('div');\n viewport.style.cssText = 'overflow:hidden;position:relative';\n this._svgDom = svgDom;\n this._svgRoot = svgRoot;\n this._backgroundRoot = bgRoot;\n this._viewport = viewport;\n root.appendChild(viewport);\n viewport.appendChild(svgDom);\n this.resize(opts.width, opts.height);\n this._visibleList = [];\n};\n\nSVGPainter.prototype = {\n constructor: SVGPainter,\n getType: function () {\n return 'svg';\n },\n getViewportRoot: function () {\n return this._viewport;\n },\n getSvgDom: function () {\n return this._svgDom;\n },\n getSvgRoot: function () {\n return this._svgRoot;\n },\n getViewportRootOffset: function () {\n var viewportRoot = this.getViewportRoot();\n\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n },\n refresh: function () {\n var list = this.storage.getDisplayList(true);\n\n this._paintList(list);\n },\n setBackgroundColor: function (backgroundColor) {\n // TODO gradient\n // Insert a bg rect instead of setting background to viewport.\n // Otherwise, the exported SVG don't have background.\n if (this._backgroundRoot && this._backgroundNode) {\n this._backgroundRoot.removeChild(this._backgroundNode);\n }\n\n var bgNode = createElement('rect');\n bgNode.setAttribute('width', this.getWidth());\n bgNode.setAttribute('height', this.getHeight());\n bgNode.setAttribute('x', 0);\n bgNode.setAttribute('y', 0);\n bgNode.setAttribute('id', 0);\n bgNode.style.fill = backgroundColor;\n\n this._backgroundRoot.appendChild(bgNode);\n\n this._backgroundNode = bgNode;\n },\n _paintList: function (list) {\n this.gradientManager.markAllUnused();\n this.clipPathManager.markAllUnused();\n this.shadowManager.markAllUnused();\n var svgRoot = this._svgRoot;\n var visibleList = this._visibleList;\n var listLen = list.length;\n var newVisibleList = [];\n var i;\n\n for (i = 0; i < listLen; i++) {\n var displayable = list[i];\n var svgProxy = getSvgProxy(displayable);\n var svgElement = getSvgElement(displayable) || getTextSvgElement(displayable);\n\n if (!displayable.invisible) {\n if (displayable.__dirty) {\n svgProxy && svgProxy.brush(displayable); // Update clipPath\n\n this.clipPathManager.update(displayable); // Update gradient and shadow\n\n if (displayable.style) {\n this.gradientManager.update(displayable.style.fill);\n this.gradientManager.update(displayable.style.stroke);\n this.shadowManager.update(svgElement, displayable);\n }\n\n displayable.__dirty = false;\n }\n\n newVisibleList.push(displayable);\n }\n }\n\n var diff = arrayDiff(visibleList, newVisibleList);\n var prevSvgElement; // First do remove, in case element moved to the head and do remove\n // after add\n\n for (i = 0; i < diff.length; i++) {\n var item = diff[i];\n\n if (item.removed) {\n for (var k = 0; k < item.count; k++) {\n var displayable = visibleList[item.indices[k]];\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n remove(svgRoot, svgElement);\n remove(svgRoot, textSvgElement);\n }\n }\n }\n\n for (i = 0; i < diff.length; i++) {\n var item = diff[i];\n\n if (item.added) {\n for (var k = 0; k < item.count; k++) {\n var displayable = newVisibleList[item.indices[k]];\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n prevSvgElement ? insertAfter(svgRoot, svgElement, prevSvgElement) : prepend(svgRoot, svgElement);\n\n if (svgElement) {\n insertAfter(svgRoot, textSvgElement, svgElement);\n } else if (prevSvgElement) {\n insertAfter(svgRoot, textSvgElement, prevSvgElement);\n } else {\n prepend(svgRoot, textSvgElement);\n } // Insert text\n\n\n insertAfter(svgRoot, textSvgElement, svgElement);\n prevSvgElement = textSvgElement || svgElement || prevSvgElement; // zrender.Text only create textSvgElement.\n\n this.gradientManager.addWithoutUpdate(svgElement || textSvgElement, displayable);\n this.shadowManager.addWithoutUpdate(svgElement || textSvgElement, displayable);\n this.clipPathManager.markUsed(displayable);\n }\n } else if (!item.removed) {\n for (var k = 0; k < item.count; k++) {\n var displayable = newVisibleList[item.indices[k]];\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n this.gradientManager.markUsed(displayable);\n this.gradientManager.addWithoutUpdate(svgElement || textSvgElement, displayable);\n this.shadowManager.markUsed(displayable);\n this.shadowManager.addWithoutUpdate(svgElement || textSvgElement, displayable);\n this.clipPathManager.markUsed(displayable);\n\n if (textSvgElement) {\n // Insert text.\n insertAfter(svgRoot, textSvgElement, svgElement);\n }\n\n prevSvgElement = svgElement || textSvgElement || prevSvgElement;\n }\n }\n }\n\n this.gradientManager.removeUnused();\n this.clipPathManager.removeUnused();\n this.shadowManager.removeUnused();\n this._visibleList = newVisibleList;\n },\n _getDefs: function (isForceCreating) {\n var svgRoot = this._svgDom;\n var defs = svgRoot.getElementsByTagName('defs');\n\n if (defs.length === 0) {\n // Not exist\n if (isForceCreating) {\n var defs = svgRoot.insertBefore(createElement('defs'), // Create new tag\n svgRoot.firstChild // Insert in the front of svg\n );\n\n if (!defs.contains) {\n // IE doesn't support contains method\n defs.contains = function (el) {\n var children = defs.children;\n\n if (!children) {\n return false;\n }\n\n for (var i = children.length - 1; i >= 0; --i) {\n if (children[i] === el) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n return defs;\n } else {\n return null;\n }\n } else {\n return defs[0];\n }\n },\n resize: function (width, height) {\n var viewport = this._viewport; // FIXME Why ?\n\n viewport.style.display = 'none'; // Save input w/h\n\n var opts = this._opts;\n width != null && (opts.width = width);\n height != null && (opts.height = height);\n width = this._getSize(0);\n height = this._getSize(1);\n viewport.style.display = '';\n\n if (this._width !== width || this._height !== height) {\n this._width = width;\n this._height = height;\n var viewportStyle = viewport.style;\n viewportStyle.width = width + 'px';\n viewportStyle.height = height + 'px';\n var svgRoot = this._svgDom; // Set width by 'svgRoot.width = width' is invalid\n\n svgRoot.setAttribute('width', width);\n svgRoot.setAttribute('height', height);\n }\n\n if (this._backgroundNode) {\n this._backgroundNode.setAttribute('width', width);\n\n this._backgroundNode.setAttribute('height', height);\n }\n },\n\n /**\n * 获取绘图区域宽度\n */\n getWidth: function () {\n return this._width;\n },\n\n /**\n * 获取绘图区域高度\n */\n getHeight: function () {\n return this._height;\n },\n _getSize: function (whIdx) {\n var opts = this._opts;\n var wh = ['width', 'height'][whIdx];\n var cwh = ['clientWidth', 'clientHeight'][whIdx];\n var plt = ['paddingLeft', 'paddingTop'][whIdx];\n var prb = ['paddingRight', 'paddingBottom'][whIdx];\n\n if (opts[wh] != null && opts[wh] !== 'auto') {\n return parseFloat(opts[wh]);\n }\n\n var root = this.root; // IE8 does not support getComputedStyle, but it use VML.\n\n var stl = document.defaultView.getComputedStyle(root);\n return (root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh])) - (parseInt10(stl[plt]) || 0) - (parseInt10(stl[prb]) || 0) | 0;\n },\n dispose: function () {\n this.root.innerHTML = '';\n this._svgRoot = this._backgroundRoot = this._svgDom = this._backgroundNode = this._viewport = this.storage = null;\n },\n clear: function () {\n if (this._viewport) {\n this.root.removeChild(this._viewport);\n }\n },\n toDataURL: function () {\n this.refresh();\n var html = encodeURIComponent(this._svgDom.outerHTML.replace(/>\\n\\r<'));\n return 'data:image/svg+xml;charset=UTF-8,' + html;\n }\n}; // Not supported methods\n\nfunction createMethodNotSupport(method) {\n return function () {\n logError('In SVG mode painter not support method \"' + method + '\"');\n };\n} // Unsuppoted methods\n\n\nutil.each(['getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer', 'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer', 'pathToImage'], function (name) {\n SVGPainter.prototype[name] = createMethodNotSupport(name);\n});\nvar _default = SVGPainter;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar ChartView = require(\"../../view/Chart\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar Path = require(\"zrender/lib/graphic/Path\");\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// Update common properties\nvar NORMAL_ITEM_STYLE_PATH = ['itemStyle'];\nvar EMPHASIS_ITEM_STYLE_PATH = ['emphasis', 'itemStyle'];\nvar BoxplotView = ChartView.extend({\n type: 'boxplot',\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var group = this.group;\n var oldData = this._data; // There is no old data only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n\n if (!this._data) {\n group.removeAll();\n }\n\n var constDim = seriesModel.get('layout') === 'horizontal' ? 1 : 0;\n data.diff(oldData).add(function (newIdx) {\n if (data.hasValue(newIdx)) {\n var itemLayout = data.getItemLayout(newIdx);\n var symbolEl = createNormalBox(itemLayout, data, newIdx, constDim, true);\n data.setItemGraphicEl(newIdx, symbolEl);\n group.add(symbolEl);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx); // Empty data\n\n if (!data.hasValue(newIdx)) {\n group.remove(symbolEl);\n return;\n }\n\n var itemLayout = data.getItemLayout(newIdx);\n\n if (!symbolEl) {\n symbolEl = createNormalBox(itemLayout, data, newIdx, constDim);\n } else {\n updateNormalBoxData(itemLayout, symbolEl, data, newIdx);\n }\n\n group.add(symbolEl);\n data.setItemGraphicEl(newIdx, symbolEl);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n }).execute();\n this._data = data;\n },\n remove: function (ecModel) {\n var group = this.group;\n var data = this._data;\n this._data = null;\n data && data.eachItemGraphicEl(function (el) {\n el && group.remove(el);\n });\n },\n dispose: zrUtil.noop\n});\nvar BoxPath = Path.extend({\n type: 'boxplotBoxPath',\n shape: {},\n buildPath: function (ctx, shape) {\n var ends = shape.points;\n var i = 0;\n ctx.moveTo(ends[i][0], ends[i][1]);\n i++;\n\n for (; i < 4; i++) {\n ctx.lineTo(ends[i][0], ends[i][1]);\n }\n\n ctx.closePath();\n\n for (; i < ends.length; i++) {\n ctx.moveTo(ends[i][0], ends[i][1]);\n i++;\n ctx.lineTo(ends[i][0], ends[i][1]);\n }\n }\n});\n\nfunction createNormalBox(itemLayout, data, dataIndex, constDim, isInit) {\n var ends = itemLayout.ends;\n var el = new BoxPath({\n shape: {\n points: isInit ? transInit(ends, constDim, itemLayout) : ends\n }\n });\n updateNormalBoxData(itemLayout, el, data, dataIndex, isInit);\n return el;\n}\n\nfunction updateNormalBoxData(itemLayout, el, data, dataIndex, isInit) {\n var seriesModel = data.hostModel;\n var updateMethod = graphic[isInit ? 'initProps' : 'updateProps'];\n updateMethod(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, dataIndex);\n var itemModel = data.getItemModel(dataIndex);\n var normalItemStyleModel = itemModel.getModel(NORMAL_ITEM_STYLE_PATH);\n var borderColor = data.getItemVisual(dataIndex, 'color'); // Exclude borderColor.\n\n var itemStyle = normalItemStyleModel.getItemStyle(['borderColor']);\n itemStyle.stroke = borderColor;\n itemStyle.strokeNoScale = true;\n el.useStyle(itemStyle);\n el.z2 = 100;\n var hoverStyle = itemModel.getModel(EMPHASIS_ITEM_STYLE_PATH).getItemStyle();\n graphic.setHoverStyle(el, hoverStyle);\n}\n\nfunction transInit(points, dim, itemLayout) {\n return zrUtil.map(points, function (point) {\n point = point.slice();\n point[dim] = itemLayout.initBaseline;\n return point;\n });\n}\n\nvar _default = BoxplotView;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"./dataZoom/typeDefaulter\");\n\nrequire(\"./dataZoom/DataZoomModel\");\n\nrequire(\"./dataZoom/DataZoomView\");\n\nrequire(\"./dataZoom/SelectZoomModel\");\n\nrequire(\"./dataZoom/SelectZoomView\");\n\nrequire(\"./dataZoom/dataZoomProcessor\");\n\nrequire(\"./dataZoom/dataZoomAction\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar TimelineModel = require(\"./TimelineModel\");\n\nvar dataFormatMixin = require(\"../../model/mixin/dataFormat\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar SliderTimelineModel = TimelineModel.extend({\n type: 'timeline.slider',\n\n /**\n * @protected\n */\n defaultOption: {\n backgroundColor: 'rgba(0,0,0,0)',\n // 时间轴背景颜色\n borderColor: '#ccc',\n // 时间轴边框颜色\n borderWidth: 0,\n // 时间轴边框线宽,单位px,默认为0(无边框)\n orient: 'horizontal',\n // 'vertical'\n inverse: false,\n tooltip: {\n // boolean or Object\n trigger: 'item' // data item may also have tootip attr.\n\n },\n symbol: 'emptyCircle',\n symbolSize: 10,\n lineStyle: {\n show: true,\n width: 2,\n color: '#304654'\n },\n label: {\n // 文本标签\n position: 'auto',\n // auto left right top bottom\n // When using number, label position is not\n // restricted by viewRect.\n // positive: right/bottom, negative: left/top\n show: true,\n interval: 'auto',\n rotate: 0,\n // formatter: null,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#304654'\n },\n itemStyle: {\n color: '#304654',\n borderWidth: 1\n },\n checkpointStyle: {\n symbol: 'circle',\n symbolSize: 13,\n color: '#c23531',\n borderWidth: 5,\n borderColor: 'rgba(194,53,49, 0.5)',\n animation: true,\n animationDuration: 300,\n animationEasing: 'quinticInOut'\n },\n controlStyle: {\n show: true,\n showPlayBtn: true,\n showPrevBtn: true,\n showNextBtn: true,\n itemSize: 22,\n itemGap: 12,\n position: 'left',\n // 'left' 'right' 'top' 'bottom'\n playIcon: 'path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z',\n // jshint ignore:line\n stopIcon: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z',\n // jshint ignore:line\n nextIcon: 'path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z',\n // jshint ignore:line\n prevIcon: 'path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z',\n // jshint ignore:line\n color: '#304654',\n borderColor: '#304654',\n borderWidth: 1\n },\n emphasis: {\n label: {\n show: true,\n // 其余属性默认使用全局文本样式,详见TEXTSTYLE\n color: '#c23531'\n },\n itemStyle: {\n color: '#c23531'\n },\n controlStyle: {\n color: '#c23531',\n borderColor: '#c23531',\n borderWidth: 2\n }\n },\n data: []\n }\n});\nzrUtil.mixin(SliderTimelineModel, dataFormatMixin);\nvar _default = SliderTimelineModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n}\n\nfunction _default(ecModel) {\n ecModel.eachSeriesByType('graph', function (seriesModel) {\n var graph = seriesModel.getGraph();\n var edgeData = seriesModel.getEdgeData();\n var symbolType = normalize(seriesModel.get('edgeSymbol'));\n var symbolSize = normalize(seriesModel.get('edgeSymbolSize'));\n var colorQuery = 'lineStyle.color'.split('.');\n var opacityQuery = 'lineStyle.opacity'.split('.');\n edgeData.setVisual('fromSymbol', symbolType && symbolType[0]);\n edgeData.setVisual('toSymbol', symbolType && symbolType[1]);\n edgeData.setVisual('fromSymbolSize', symbolSize && symbolSize[0]);\n edgeData.setVisual('toSymbolSize', symbolSize && symbolSize[1]);\n edgeData.setVisual('color', seriesModel.get(colorQuery));\n edgeData.setVisual('opacity', seriesModel.get(opacityQuery));\n edgeData.each(function (idx) {\n var itemModel = edgeData.getItemModel(idx);\n var edge = graph.getEdgeByIndex(idx);\n var symbolType = normalize(itemModel.getShallow('symbol', true));\n var symbolSize = normalize(itemModel.getShallow('symbolSize', true)); // Edge visual must after node visual\n\n var color = itemModel.get(colorQuery);\n var opacity = itemModel.get(opacityQuery);\n\n switch (color) {\n case 'source':\n color = edge.node1.getVisual('color');\n break;\n\n case 'target':\n color = edge.node2.getVisual('color');\n break;\n }\n\n symbolType[0] && edge.setVisual('fromSymbol', symbolType[0]);\n symbolType[1] && edge.setVisual('toSymbol', symbolType[1]);\n symbolSize[0] && edge.setVisual('fromSymbolSize', symbolSize[0]);\n symbolSize[1] && edge.setVisual('toSymbolSize', symbolSize[1]);\n edge.setVisual('color', color);\n edge.setVisual('opacity', opacity);\n });\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar ComponentModel = require(\"../../model/Component\");\n\nvar makeStyleMapper = require(\"../../model/mixin/makeStyleMapper\");\n\nvar axisModelCreator = require(\"../axisModelCreator\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar axisModelCommonMixin = require(\"../axisModelCommonMixin\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar AxisModel = ComponentModel.extend({\n type: 'baseParallelAxis',\n\n /**\n * @type {module:echarts/coord/parallel/Axis}\n */\n axis: null,\n\n /**\n * @type {Array.}\n * @readOnly\n */\n activeIntervals: [],\n\n /**\n * @return {Object}\n */\n getAreaSelectStyle: function () {\n return makeStyleMapper([['fill', 'color'], ['lineWidth', 'borderWidth'], ['stroke', 'borderColor'], ['width', 'width'], ['opacity', 'opacity']])(this.getModel('areaSelectStyle'));\n },\n\n /**\n * The code of this feature is put on AxisModel but not ParallelAxis,\n * because axisModel can be alive after echarts updating but instance of\n * ParallelAxis having been disposed. this._activeInterval should be kept\n * when action dispatched (i.e. legend click).\n *\n * @param {Array.>} intervals interval.length === 0\n * means set all active.\n * @public\n */\n setActiveIntervals: function (intervals) {\n var activeIntervals = this.activeIntervals = zrUtil.clone(intervals); // Normalize\n\n if (activeIntervals) {\n for (var i = activeIntervals.length - 1; i >= 0; i--) {\n numberUtil.asc(activeIntervals[i]);\n }\n }\n },\n\n /**\n * @param {number|string} [value] When attempting to detect 'no activeIntervals set',\n * value can not be input.\n * @return {string} 'normal': no activeIntervals set,\n * 'active',\n * 'inactive'.\n * @public\n */\n getActiveState: function (value) {\n var activeIntervals = this.activeIntervals;\n\n if (!activeIntervals.length) {\n return 'normal';\n }\n\n if (value == null || isNaN(value)) {\n return 'inactive';\n } // Simple optimization\n\n\n if (activeIntervals.length === 1) {\n var interval = activeIntervals[0];\n\n if (interval[0] <= value && value <= interval[1]) {\n return 'active';\n }\n } else {\n for (var i = 0, len = activeIntervals.length; i < len; i++) {\n if (activeIntervals[i][0] <= value && value <= activeIntervals[i][1]) {\n return 'active';\n }\n }\n }\n\n return 'inactive';\n }\n});\nvar defaultOption = {\n type: 'value',\n\n /**\n * @type {Array.}\n */\n dim: null,\n // 0, 1, 2, ...\n // parallelIndex: null,\n areaSelectStyle: {\n width: 20,\n borderWidth: 1,\n borderColor: 'rgba(160,197,232)',\n color: 'rgba(160,197,232)',\n opacity: 0.3\n },\n realtime: true,\n // Whether realtime update view when select.\n z: 10\n};\nzrUtil.merge(AxisModel.prototype, axisModelCommonMixin);\n\nfunction getAxisType(axisName, option) {\n return option.type || (option.data ? 'category' : 'value');\n}\n\naxisModelCreator('parallel', AxisModel, getAxisType, defaultOption);\nvar _default = AxisModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../../echarts\");\n\nvar history = require(\"../../dataZoom/history\");\n\nvar lang = require(\"../../../lang\");\n\nvar featureManager = require(\"../featureManager\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar restoreLang = lang.toolbox.restore;\n\nfunction Restore(model) {\n this.model = model;\n}\n\nRestore.defaultOption = {\n show: true,\n\n /* eslint-disable */\n icon: 'M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5',\n\n /* eslint-enable */\n title: restoreLang.title\n};\nvar proto = Restore.prototype;\n\nproto.onclick = function (ecModel, api, type) {\n history.clear(ecModel);\n api.dispatchAction({\n type: 'restore',\n from: this.uid\n });\n};\n\nfeatureManager.register('restore', Restore);\necharts.registerAction({\n type: 'restore',\n event: 'restore',\n update: 'prepareAndUpdate'\n}, function (payload, ecModel) {\n ecModel.resetOption('recreate');\n});\nvar _default = Restore;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphicUtil = require(\"../util/graphic\");\n\nvar _labelHelper = require(\"./helper/labelHelper\");\n\nvar getDefaultLabel = _labelHelper.getDefaultLabel;\n\nvar createListFromArray = require(\"./helper/createListFromArray\");\n\nvar _barGrid = require(\"../layout/barGrid\");\n\nvar getLayoutOnAxis = _barGrid.getLayoutOnAxis;\n\nvar DataDiffer = require(\"../data/DataDiffer\");\n\nvar SeriesModel = require(\"../model/Series\");\n\nvar Model = require(\"../model/Model\");\n\nvar ChartView = require(\"../view/Chart\");\n\nvar _createClipPathFromCoordSys = require(\"./helper/createClipPathFromCoordSys\");\n\nvar createClipPath = _createClipPathFromCoordSys.createClipPath;\n\nvar prepareCartesian2d = require(\"../coord/cartesian/prepareCustom\");\n\nvar prepareGeo = require(\"../coord/geo/prepareCustom\");\n\nvar prepareSingleAxis = require(\"../coord/single/prepareCustom\");\n\nvar preparePolar = require(\"../coord/polar/prepareCustom\");\n\nvar prepareCalendar = require(\"../coord/calendar/prepareCustom\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar CACHED_LABEL_STYLE_PROPERTIES = graphicUtil.CACHED_LABEL_STYLE_PROPERTIES;\nvar ITEM_STYLE_NORMAL_PATH = ['itemStyle'];\nvar ITEM_STYLE_EMPHASIS_PATH = ['emphasis', 'itemStyle'];\nvar LABEL_NORMAL = ['label'];\nvar LABEL_EMPHASIS = ['emphasis', 'label']; // Use prefix to avoid index to be the same as el.name,\n// which will cause weird udpate animation.\n\nvar GROUP_DIFF_PREFIX = 'e\\0\\0';\n/**\n * To reduce total package size of each coordinate systems, the modules `prepareCustom`\n * of each coordinate systems are not required by each coordinate systems directly, but\n * required by the module `custom`.\n *\n * prepareInfoForCustomSeries {Function}: optional\n * @return {Object} {coordSys: {...}, api: {\n * coord: function (data, clamp) {}, // return point in global.\n * size: function (dataSize, dataItem) {} // return size of each axis in coordSys.\n * }}\n */\n\nvar prepareCustoms = {\n cartesian2d: prepareCartesian2d,\n geo: prepareGeo,\n singleAxis: prepareSingleAxis,\n polar: preparePolar,\n calendar: prepareCalendar\n}; // ------\n// Model\n// ------\n\nSeriesModel.extend({\n type: 'series.custom',\n dependencies: ['grid', 'polar', 'geo', 'singleAxis', 'calendar'],\n defaultOption: {\n coordinateSystem: 'cartesian2d',\n // Can be set as 'none'\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n useTransform: true,\n // Custom series will not clip by default.\n // Some case will use custom series to draw label\n // For example https://echarts.apache.org/examples/en/editor.html?c=custom-gantt-flight\n // Only works on polar and cartesian2d coordinate system.\n clip: false // Cartesian coordinate system\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // Polar coordinate system\n // polarIndex: 0,\n // Geo coordinate system\n // geoIndex: 0,\n // label: {}\n // itemStyle: {}\n\n },\n\n /**\n * @override\n */\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this);\n },\n\n /**\n * @override\n */\n getDataParams: function (dataIndex, dataType, el) {\n var params = SeriesModel.prototype.getDataParams.apply(this, arguments);\n el && (params.info = el.info);\n return params;\n }\n}); // -----\n// View\n// -----\n\nChartView.extend({\n type: 'custom',\n\n /**\n * @private\n * @type {module:echarts/data/List}\n */\n _data: null,\n\n /**\n * @override\n */\n render: function (customSeries, ecModel, api, payload) {\n var oldData = this._data;\n var data = customSeries.getData();\n var group = this.group;\n var renderItem = makeRenderItem(customSeries, data, ecModel, api); // By default, merge mode is applied. In most cases, custom series is\n // used in the scenario that data amount is not large but graphic elements\n // is complicated, where merge mode is probably necessary for optimization.\n // For example, reuse graphic elements and only update the transform when\n // roam or data zoom according to `actionType`.\n\n data.diff(oldData).add(function (newIdx) {\n createOrUpdate(null, newIdx, renderItem(newIdx, payload), customSeries, group, data);\n }).update(function (newIdx, oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n createOrUpdate(el, newIdx, renderItem(newIdx, payload), customSeries, group, data);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n }).execute(); // Do clipping\n\n var clipPath = customSeries.get('clip', true) ? createClipPath(customSeries.coordinateSystem, false, customSeries) : null;\n\n if (clipPath) {\n group.setClipPath(clipPath);\n } else {\n group.removeClipPath();\n }\n\n this._data = data;\n },\n incrementalPrepareRender: function (customSeries, ecModel, api) {\n this.group.removeAll();\n this._data = null;\n },\n incrementalRender: function (params, customSeries, ecModel, api, payload) {\n var data = customSeries.getData();\n var renderItem = makeRenderItem(customSeries, data, ecModel, api);\n\n function setIncrementalAndHoverLayer(el) {\n if (!el.isGroup) {\n el.incremental = true;\n el.useHoverLayer = true;\n }\n }\n\n for (var idx = params.start; idx < params.end; idx++) {\n var el = createOrUpdate(null, idx, renderItem(idx, payload), customSeries, this.group, data);\n el.traverse(setIncrementalAndHoverLayer);\n }\n },\n\n /**\n * @override\n */\n dispose: zrUtil.noop,\n\n /**\n * @override\n */\n filterForExposedEvent: function (eventType, query, targetEl, packedEvent) {\n var elementName = query.element;\n\n if (elementName == null || targetEl.name === elementName) {\n return true;\n } // Enable to give a name on a group made by `renderItem`, and listen\n // events that triggerd by its descendents.\n\n\n while ((targetEl = targetEl.parent) && targetEl !== this.group) {\n if (targetEl.name === elementName) {\n return true;\n }\n }\n\n return false;\n }\n});\n\nfunction createEl(elOption) {\n var graphicType = elOption.type;\n var el; // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n\n if (graphicType === 'path') {\n var shape = elOption.shape; // Using pathRect brings convenience to users sacle svg path.\n\n var pathRect = shape.width != null && shape.height != null ? {\n x: shape.x || 0,\n y: shape.y || 0,\n width: shape.width,\n height: shape.height\n } : null;\n var pathData = getPathData(shape); // Path is also used for icon, so layout 'center' by default.\n\n el = graphicUtil.makePath(pathData, null, pathRect, shape.layout || 'center');\n el.__customPathData = pathData;\n } else if (graphicType === 'image') {\n el = new graphicUtil.Image({});\n el.__customImagePath = elOption.style.image;\n } else if (graphicType === 'text') {\n el = new graphicUtil.Text({});\n el.__customText = elOption.style.text;\n } else if (graphicType === 'group') {\n el = new graphicUtil.Group();\n } else if (graphicType === 'compoundPath') {\n throw new Error('\"compoundPath\" is not supported yet.');\n } else {\n var Clz = graphicUtil.getShapeClass(graphicType);\n el = new Clz();\n }\n\n el.__customGraphicType = graphicType;\n el.name = elOption.name;\n return el;\n}\n\nfunction updateEl(el, dataIndex, elOption, animatableModel, data, isInit, isRoot) {\n var transitionProps = {};\n var elOptionStyle = elOption.style || {};\n elOption.shape && (transitionProps.shape = zrUtil.clone(elOption.shape));\n elOption.position && (transitionProps.position = elOption.position.slice());\n elOption.scale && (transitionProps.scale = elOption.scale.slice());\n elOption.origin && (transitionProps.origin = elOption.origin.slice());\n elOption.rotation && (transitionProps.rotation = elOption.rotation);\n\n if (el.type === 'image' && elOption.style) {\n var targetStyle = transitionProps.style = {};\n zrUtil.each(['x', 'y', 'width', 'height'], function (prop) {\n prepareStyleTransition(prop, targetStyle, elOptionStyle, el.style, isInit);\n });\n }\n\n if (el.type === 'text' && elOption.style) {\n var targetStyle = transitionProps.style = {};\n zrUtil.each(['x', 'y'], function (prop) {\n prepareStyleTransition(prop, targetStyle, elOptionStyle, el.style, isInit);\n }); // Compatible with previous: both support\n // textFill and fill, textStroke and stroke in 'text' element.\n\n !elOptionStyle.hasOwnProperty('textFill') && elOptionStyle.fill && (elOptionStyle.textFill = elOptionStyle.fill);\n !elOptionStyle.hasOwnProperty('textStroke') && elOptionStyle.stroke && (elOptionStyle.textStroke = elOptionStyle.stroke);\n }\n\n if (el.type !== 'group') {\n el.useStyle(elOptionStyle); // Init animation.\n\n if (isInit) {\n el.style.opacity = 0;\n var targetOpacity = elOptionStyle.opacity;\n targetOpacity == null && (targetOpacity = 1);\n graphicUtil.initProps(el, {\n style: {\n opacity: targetOpacity\n }\n }, animatableModel, dataIndex);\n }\n }\n\n if (isInit) {\n el.attr(transitionProps);\n } else {\n graphicUtil.updateProps(el, transitionProps, animatableModel, dataIndex);\n } // Merge by default.\n // z2 must not be null/undefined, otherwise sort error may occur.\n\n\n elOption.hasOwnProperty('z2') && el.attr('z2', elOption.z2 || 0);\n elOption.hasOwnProperty('silent') && el.attr('silent', elOption.silent);\n elOption.hasOwnProperty('invisible') && el.attr('invisible', elOption.invisible);\n elOption.hasOwnProperty('ignore') && el.attr('ignore', elOption.ignore); // `elOption.info` enables user to mount some info on\n // elements and use them in event handlers.\n // Update them only when user specified, otherwise, remain.\n\n elOption.hasOwnProperty('info') && el.attr('info', elOption.info); // If `elOption.styleEmphasis` is `false`, remove hover style. The\n // logic is ensured by `graphicUtil.setElementHoverStyle`.\n\n var styleEmphasis = elOption.styleEmphasis; // hoverStyle should always be set here, because if the hover style\n // may already be changed, where the inner cache should be reset.\n\n graphicUtil.setElementHoverStyle(el, styleEmphasis);\n\n if (isRoot) {\n graphicUtil.setAsHighDownDispatcher(el, styleEmphasis !== false);\n }\n}\n\nfunction prepareStyleTransition(prop, targetStyle, elOptionStyle, oldElStyle, isInit) {\n if (elOptionStyle[prop] != null && !isInit) {\n targetStyle[prop] = elOptionStyle[prop];\n elOptionStyle[prop] = oldElStyle[prop];\n }\n}\n\nfunction makeRenderItem(customSeries, data, ecModel, api) {\n var renderItem = customSeries.get('renderItem');\n var coordSys = customSeries.coordinateSystem;\n var prepareResult = {};\n\n if (coordSys) {\n prepareResult = coordSys.prepareCustoms ? coordSys.prepareCustoms() : prepareCustoms[coordSys.type](coordSys);\n }\n\n var userAPI = zrUtil.defaults({\n getWidth: api.getWidth,\n getHeight: api.getHeight,\n getZr: api.getZr,\n getDevicePixelRatio: api.getDevicePixelRatio,\n value: value,\n style: style,\n styleEmphasis: styleEmphasis,\n visual: visual,\n barLayout: barLayout,\n currentSeriesIndices: currentSeriesIndices,\n font: font\n }, prepareResult.api || {});\n var userParams = {\n // The life cycle of context: current round of rendering.\n // The global life cycle is probably not necessary, because\n // user can store global status by themselves.\n context: {},\n seriesId: customSeries.id,\n seriesName: customSeries.name,\n seriesIndex: customSeries.seriesIndex,\n coordSys: prepareResult.coordSys,\n dataInsideLength: data.count(),\n encode: wrapEncodeDef(customSeries.getData())\n }; // Do not support call `api` asynchronously without dataIndexInside input.\n\n var currDataIndexInside;\n var currDirty = true;\n var currItemModel;\n var currLabelNormalModel;\n var currLabelEmphasisModel;\n var currVisualColor;\n return function (dataIndexInside, payload) {\n currDataIndexInside = dataIndexInside;\n currDirty = true;\n return renderItem && renderItem(zrUtil.defaults({\n dataIndexInside: dataIndexInside,\n dataIndex: data.getRawIndex(dataIndexInside),\n // Can be used for optimization when zoom or roam.\n actionType: payload ? payload.type : null\n }, userParams), userAPI);\n }; // Do not update cache until api called.\n\n function updateCache(dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n\n if (currDirty) {\n currItemModel = data.getItemModel(dataIndexInside);\n currLabelNormalModel = currItemModel.getModel(LABEL_NORMAL);\n currLabelEmphasisModel = currItemModel.getModel(LABEL_EMPHASIS);\n currVisualColor = data.getItemVisual(dataIndexInside, 'color');\n currDirty = false;\n }\n }\n /**\n * @public\n * @param {number|string} dim\n * @param {number} [dataIndexInside=currDataIndexInside]\n * @return {number|string} value\n */\n\n\n function value(dim, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n return data.get(data.getDimension(dim || 0), dataIndexInside);\n }\n /**\n * By default, `visual` is applied to style (to support visualMap).\n * `visual.color` is applied at `fill`. If user want apply visual.color on `stroke`,\n * it can be implemented as:\n * `api.style({stroke: api.visual('color'), fill: null})`;\n * @public\n * @param {Object} [extra]\n * @param {number} [dataIndexInside=currDataIndexInside]\n */\n\n\n function style(extra, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n updateCache(dataIndexInside);\n var itemStyle = currItemModel.getModel(ITEM_STYLE_NORMAL_PATH).getItemStyle();\n currVisualColor != null && (itemStyle.fill = currVisualColor);\n var opacity = data.getItemVisual(dataIndexInside, 'opacity');\n opacity != null && (itemStyle.opacity = opacity);\n var labelModel = extra ? applyExtraBefore(extra, currLabelNormalModel) : currLabelNormalModel;\n graphicUtil.setTextStyle(itemStyle, labelModel, null, {\n autoColor: currVisualColor,\n isRectText: true\n });\n itemStyle.text = labelModel.getShallow('show') ? zrUtil.retrieve2(customSeries.getFormattedLabel(dataIndexInside, 'normal'), getDefaultLabel(data, dataIndexInside)) : null;\n extra && applyExtraAfter(itemStyle, extra);\n return itemStyle;\n }\n /**\n * @public\n * @param {Object} [extra]\n * @param {number} [dataIndexInside=currDataIndexInside]\n */\n\n\n function styleEmphasis(extra, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n updateCache(dataIndexInside);\n var itemStyle = currItemModel.getModel(ITEM_STYLE_EMPHASIS_PATH).getItemStyle();\n var labelModel = extra ? applyExtraBefore(extra, currLabelEmphasisModel) : currLabelEmphasisModel;\n graphicUtil.setTextStyle(itemStyle, labelModel, null, {\n isRectText: true\n }, true);\n itemStyle.text = labelModel.getShallow('show') ? zrUtil.retrieve3(customSeries.getFormattedLabel(dataIndexInside, 'emphasis'), customSeries.getFormattedLabel(dataIndexInside, 'normal'), getDefaultLabel(data, dataIndexInside)) : null;\n extra && applyExtraAfter(itemStyle, extra);\n return itemStyle;\n }\n /**\n * @public\n * @param {string} visualType\n * @param {number} [dataIndexInside=currDataIndexInside]\n */\n\n\n function visual(visualType, dataIndexInside) {\n dataIndexInside == null && (dataIndexInside = currDataIndexInside);\n return data.getItemVisual(dataIndexInside, visualType);\n }\n /**\n * @public\n * @param {number} opt.count Positive interger.\n * @param {number} [opt.barWidth]\n * @param {number} [opt.barMaxWidth]\n * @param {number} [opt.barMinWidth]\n * @param {number} [opt.barGap]\n * @param {number} [opt.barCategoryGap]\n * @return {Object} {width, offset, offsetCenter} is not support, return undefined.\n */\n\n\n function barLayout(opt) {\n if (coordSys.getBaseAxis) {\n var baseAxis = coordSys.getBaseAxis();\n return getLayoutOnAxis(zrUtil.defaults({\n axis: baseAxis\n }, opt), api);\n }\n }\n /**\n * @public\n * @return {Array.}\n */\n\n\n function currentSeriesIndices() {\n return ecModel.getCurrentSeriesIndices();\n }\n /**\n * @public\n * @param {Object} opt\n * @param {string} [opt.fontStyle]\n * @param {number} [opt.fontWeight]\n * @param {number} [opt.fontSize]\n * @param {string} [opt.fontFamily]\n * @return {string} font string\n */\n\n\n function font(opt) {\n return graphicUtil.getFont(opt, ecModel);\n }\n}\n\nfunction wrapEncodeDef(data) {\n var encodeDef = {};\n zrUtil.each(data.dimensions, function (dimName, dataDimIndex) {\n var dimInfo = data.getDimensionInfo(dimName);\n\n if (!dimInfo.isExtraCoord) {\n var coordDim = dimInfo.coordDim;\n var dataDims = encodeDef[coordDim] = encodeDef[coordDim] || [];\n dataDims[dimInfo.coordDimIndex] = dataDimIndex;\n }\n });\n return encodeDef;\n}\n\nfunction createOrUpdate(el, dataIndex, elOption, animatableModel, group, data) {\n el = doCreateOrUpdate(el, dataIndex, elOption, animatableModel, group, data, true);\n el && data.setItemGraphicEl(dataIndex, el);\n return el;\n}\n\nfunction doCreateOrUpdate(el, dataIndex, elOption, animatableModel, group, data, isRoot) {\n // [Rule]\n // By default, follow merge mode.\n // (It probably brings benifit for performance in some cases of large data, where\n // user program can be optimized to that only updated props needed to be re-calculated,\n // or according to `actionType` some calculation can be skipped.)\n // If `renderItem` returns `null`/`undefined`/`false`, remove the previous el if existing.\n // (It seems that violate the \"merge\" principle, but most of users probably intuitively\n // regard \"return;\" as \"show nothing element whatever\", so make a exception to meet the\n // most cases.)\n var simplyRemove = !elOption; // `null`/`undefined`/`false`\n\n elOption = elOption || {};\n var elOptionType = elOption.type;\n var elOptionShape = elOption.shape;\n var elOptionStyle = elOption.style;\n\n if (el && (simplyRemove // || elOption.$merge === false\n // If `elOptionType` is `null`, follow the merge principle.\n || elOptionType != null && elOptionType !== el.__customGraphicType || elOptionType === 'path' && hasOwnPathData(elOptionShape) && getPathData(elOptionShape) !== el.__customPathData || elOptionType === 'image' && hasOwn(elOptionStyle, 'image') && elOptionStyle.image !== el.__customImagePath // FIXME test and remove this restriction?\n || elOptionType === 'text' && hasOwn(elOptionShape, 'text') && elOptionStyle.text !== el.__customText)) {\n group.remove(el);\n el = null;\n } // `elOption.type` is undefined when `renderItem` returns nothing.\n\n\n if (simplyRemove) {\n return;\n }\n\n var isInit = !el;\n !el && (el = createEl(elOption));\n updateEl(el, dataIndex, elOption, animatableModel, data, isInit, isRoot);\n\n if (elOptionType === 'group') {\n mergeChildren(el, dataIndex, elOption, animatableModel, data);\n } // Always add whatever already added to ensure sequence.\n\n\n group.add(el);\n return el;\n} // Usage:\n// (1) By default, `elOption.$mergeChildren` is `'byIndex'`, which indicates that\n// the existing children will not be removed, and enables the feature that\n// update some of the props of some of the children simply by construct\n// the returned children of `renderItem` like:\n// `var children = group.children = []; children[3] = {opacity: 0.5};`\n// (2) If `elOption.$mergeChildren` is `'byName'`, add/update/remove children\n// by child.name. But that might be lower performance.\n// (3) If `elOption.$mergeChildren` is `false`, the existing children will be\n// replaced totally.\n// (4) If `!elOption.children`, following the \"merge\" principle, nothing will happen.\n//\n// For implementation simpleness, do not provide a direct way to remove sinlge\n// child (otherwise the total indicies of the children array have to be modified).\n// User can remove a single child by set its `ignore` as `true` or replace\n// it by another element, where its `$merge` can be set as `true` if necessary.\n\n\nfunction mergeChildren(el, dataIndex, elOption, animatableModel, data) {\n var newChildren = elOption.children;\n var newLen = newChildren ? newChildren.length : 0;\n var mergeChildren = elOption.$mergeChildren; // `diffChildrenByName` has been deprecated.\n\n var byName = mergeChildren === 'byName' || elOption.diffChildrenByName;\n var notMerge = mergeChildren === false; // For better performance on roam update, only enter if necessary.\n\n if (!newLen && !byName && !notMerge) {\n return;\n }\n\n if (byName) {\n diffGroupChildren({\n oldChildren: el.children() || [],\n newChildren: newChildren || [],\n dataIndex: dataIndex,\n animatableModel: animatableModel,\n group: el,\n data: data\n });\n return;\n }\n\n notMerge && el.removeAll(); // Mapping children of a group simply by index, which\n // might be better performance.\n\n var index = 0;\n\n for (; index < newLen; index++) {\n newChildren[index] && doCreateOrUpdate(el.childAt(index), dataIndex, newChildren[index], animatableModel, el, data);\n }\n}\n\nfunction diffGroupChildren(context) {\n new DataDiffer(context.oldChildren, context.newChildren, getKey, getKey, context).add(processAddUpdate).update(processAddUpdate).remove(processRemove).execute();\n}\n\nfunction getKey(item, idx) {\n var name = item && item.name;\n return name != null ? name : GROUP_DIFF_PREFIX + idx;\n}\n\nfunction processAddUpdate(newIndex, oldIndex) {\n var context = this.context;\n var childOption = newIndex != null ? context.newChildren[newIndex] : null;\n var child = oldIndex != null ? context.oldChildren[oldIndex] : null;\n doCreateOrUpdate(child, context.dataIndex, childOption, context.animatableModel, context.group, context.data);\n} // `graphic#applyDefaultTextStyle` will cache\n// textFill, textStroke, textStrokeWidth.\n// We have to do this trick.\n\n\nfunction applyExtraBefore(extra, model) {\n var dummyModel = new Model({}, model);\n zrUtil.each(CACHED_LABEL_STYLE_PROPERTIES, function (stylePropName, modelPropName) {\n if (extra.hasOwnProperty(stylePropName)) {\n dummyModel.option[modelPropName] = extra[stylePropName];\n }\n });\n return dummyModel;\n}\n\nfunction applyExtraAfter(itemStyle, extra) {\n for (var key in extra) {\n if (extra.hasOwnProperty(key) || !CACHED_LABEL_STYLE_PROPERTIES.hasOwnProperty(key)) {\n itemStyle[key] = extra[key];\n }\n }\n}\n\nfunction processRemove(oldIndex) {\n var context = this.context;\n var child = context.oldChildren[oldIndex];\n child && context.group.remove(child);\n}\n\nfunction getPathData(shape) {\n // \"d\" follows the SVG convention.\n return shape && (shape.pathData || shape.d);\n}\n\nfunction hasOwnPathData(shape) {\n return shape && (shape.hasOwnProperty('pathData') || shape.hasOwnProperty('d'));\n}\n\nfunction hasOwn(host, prop) {\n return host && host.hasOwnProperty(prop);\n}","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar createListSimply = require(\"../helper/createListSimply\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _dimensionHelper = require(\"../../data/helper/dimensionHelper\");\n\nvar getDimensionTypeByAxis = _dimensionHelper.getDimensionTypeByAxis;\n\nvar _sourceHelper = require(\"../../data/helper/sourceHelper\");\n\nvar makeSeriesEncodeForAxisCoordSys = _sourceHelper.makeSeriesEncodeForAxisCoordSys;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar seriesModelMixin = {\n /**\n * @private\n * @type {string}\n */\n _baseAxisDim: null,\n\n /**\n * @override\n */\n getInitialData: function (option, ecModel) {\n // When both types of xAxis and yAxis are 'value', layout is\n // needed to be specified by user. Otherwise, layout can be\n // judged by which axis is category.\n var ordinalMeta;\n var xAxisModel = ecModel.getComponent('xAxis', this.get('xAxisIndex'));\n var yAxisModel = ecModel.getComponent('yAxis', this.get('yAxisIndex'));\n var xAxisType = xAxisModel.get('type');\n var yAxisType = yAxisModel.get('type');\n var addOrdinal; // FIXME\n // Consider time axis.\n\n if (xAxisType === 'category') {\n option.layout = 'horizontal';\n ordinalMeta = xAxisModel.getOrdinalMeta();\n addOrdinal = true;\n } else if (yAxisType === 'category') {\n option.layout = 'vertical';\n ordinalMeta = yAxisModel.getOrdinalMeta();\n addOrdinal = true;\n } else {\n option.layout = option.layout || 'horizontal';\n }\n\n var coordDims = ['x', 'y'];\n var baseAxisDimIndex = option.layout === 'horizontal' ? 0 : 1;\n var baseAxisDim = this._baseAxisDim = coordDims[baseAxisDimIndex];\n var otherAxisDim = coordDims[1 - baseAxisDimIndex];\n var axisModels = [xAxisModel, yAxisModel];\n var baseAxisType = axisModels[baseAxisDimIndex].get('type');\n var otherAxisType = axisModels[1 - baseAxisDimIndex].get('type');\n var data = option.data; // ??? FIXME make a stage to perform data transfrom.\n // MUST create a new data, consider setOption({}) again.\n\n if (data && addOrdinal) {\n var newOptionData = [];\n zrUtil.each(data, function (item, index) {\n var newItem;\n\n if (item.value && zrUtil.isArray(item.value)) {\n newItem = item.value.slice();\n item.value.unshift(index);\n } else if (zrUtil.isArray(item)) {\n newItem = item.slice();\n item.unshift(index);\n } else {\n newItem = item;\n }\n\n newOptionData.push(newItem);\n });\n option.data = newOptionData;\n }\n\n var defaultValueDimensions = this.defaultValueDimensions;\n var coordDimensions = [{\n name: baseAxisDim,\n type: getDimensionTypeByAxis(baseAxisType),\n ordinalMeta: ordinalMeta,\n otherDims: {\n tooltip: false,\n itemName: 0\n },\n dimsDef: ['base']\n }, {\n name: otherAxisDim,\n type: getDimensionTypeByAxis(otherAxisType),\n dimsDef: defaultValueDimensions.slice()\n }];\n return createListSimply(this, {\n coordDimensions: coordDimensions,\n dimensionsCount: defaultValueDimensions.length + 1,\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForAxisCoordSys, coordDimensions, this)\n });\n },\n\n /**\n * If horizontal, base axis is x, otherwise y.\n * @override\n */\n getBaseAxis: function () {\n var dim = this._baseAxisDim;\n return this.ecModel.getComponent(dim + 'Axis', this.get(dim + 'AxisIndex')).axis;\n }\n};\nexports.seriesModelMixin = seriesModelMixin;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar createDimensions = require(\"../../data/helper/createDimensions\");\n\nvar List = require(\"../../data/List\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar extend = _util.extend;\nvar isArray = _util.isArray;\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 * [Usage]:\n * (1)\n * createListSimply(seriesModel, ['value']);\n * (2)\n * createListSimply(seriesModel, {\n * coordDimensions: ['value'],\n * dimensionsCount: 5\n * });\n *\n * @param {module:echarts/model/Series} seriesModel\n * @param {Object|Array.} opt opt or coordDimensions\n * The options in opt, see `echarts/data/helper/createDimensions`\n * @param {Array.} [nameList]\n * @return {module:echarts/data/List}\n */\nfunction _default(seriesModel, opt, nameList) {\n opt = isArray(opt) && {\n coordDimensions: opt\n } || extend({}, opt);\n var source = seriesModel.getSource();\n var dimensionsInfo = createDimensions(source, opt);\n var list = new List(dimensionsInfo, seriesModel);\n list.initData(source, nameList);\n return list;\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nrequire(\"./dataZoom/typeDefaulter\");\n\nrequire(\"./dataZoom/DataZoomModel\");\n\nrequire(\"./dataZoom/DataZoomView\");\n\nrequire(\"./dataZoom/SliderZoomModel\");\n\nrequire(\"./dataZoom/SliderZoomView\");\n\nrequire(\"./dataZoom/dataZoomProcessor\");\n\nrequire(\"./dataZoom/dataZoomAction\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @param {number} [time=500] Time in ms\n * @param {string} [easing='linear']\n * @param {number} [delay=0]\n * @param {Function} [callback]\n *\n * @example\n * // Animate position\n * animation\n * .createWrap()\n * .add(el1, {position: [10, 10]})\n * .add(el2, {shape: {width: 500}, style: {fill: 'red'}}, 400)\n * .done(function () { // done })\n * .start('cubicOut');\n */\nfunction createWrap() {\n var storage = [];\n var elExistsMap = {};\n var doneCallback;\n return {\n /**\n * Caution: a el can only be added once, otherwise 'done'\n * might not be called. This method checks this (by el.id),\n * suppresses adding and returns false when existing el found.\n *\n * @param {modele:zrender/Element} el\n * @param {Object} target\n * @param {number} [time=500]\n * @param {number} [delay=0]\n * @param {string} [easing='linear']\n * @return {boolean} Whether adding succeeded.\n *\n * @example\n * add(el, target, time, delay, easing);\n * add(el, target, time, easing);\n * add(el, target, time);\n * add(el, target);\n */\n add: function (el, target, time, delay, easing) {\n if (zrUtil.isString(delay)) {\n easing = delay;\n delay = 0;\n }\n\n if (elExistsMap[el.id]) {\n return false;\n }\n\n elExistsMap[el.id] = 1;\n storage.push({\n el: el,\n target: target,\n time: time,\n delay: delay,\n easing: easing\n });\n return true;\n },\n\n /**\n * Only execute when animation finished. Will not execute when any\n * of 'stop' or 'stopAnimation' called.\n *\n * @param {Function} callback\n */\n done: function (callback) {\n doneCallback = callback;\n return this;\n },\n\n /**\n * Will stop exist animation firstly.\n */\n start: function () {\n var count = storage.length;\n\n for (var i = 0, len = storage.length; i < len; i++) {\n var item = storage[i];\n item.el.animateTo(item.target, item.time, item.delay, item.easing, done);\n }\n\n return this;\n\n function done() {\n count--;\n\n if (!count) {\n storage.length = 0;\n elExistsMap = {};\n doneCallback && doneCallback();\n }\n }\n }\n };\n}\n\nexports.createWrap = createWrap;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _labelHelper = require(\"../helper/labelHelper\");\n\nvar getDefaultLabel = _labelHelper.getDefaultLabel;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction setLabel(normalStyle, hoverStyle, itemModel, color, seriesModel, dataIndex, labelPositionOutside) {\n var labelModel = itemModel.getModel('label');\n var hoverLabelModel = itemModel.getModel('emphasis.label');\n graphic.setLabelStyle(normalStyle, hoverStyle, labelModel, hoverLabelModel, {\n labelFetcher: seriesModel,\n labelDataIndex: dataIndex,\n defaultText: getDefaultLabel(seriesModel.getData(), dataIndex),\n isRectText: true,\n autoColor: color\n });\n fixPosition(normalStyle);\n fixPosition(hoverStyle);\n}\n\nfunction fixPosition(style, labelPositionOutside) {\n if (style.textPosition === 'outside') {\n style.textPosition = labelPositionOutside;\n }\n}\n\nexports.setLabel = setLabel;","var logError = require(\"../core/log\");\n\nvar vmlCore = require(\"./core\");\n\nvar _util = require(\"../core/util\");\n\nvar each = _util.each;\n\n/**\n * VML Painter.\n *\n * @module zrender/vml/Painter\n */\nfunction parseInt10(val) {\n return parseInt(val, 10);\n}\n/**\n * @alias module:zrender/vml/Painter\n */\n\n\nfunction VMLPainter(root, storage) {\n vmlCore.initVML();\n this.root = root;\n this.storage = storage;\n var vmlViewport = document.createElement('div');\n var vmlRoot = document.createElement('div');\n vmlViewport.style.cssText = 'display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;';\n vmlRoot.style.cssText = 'position:absolute;left:0;top:0;';\n root.appendChild(vmlViewport);\n this._vmlRoot = vmlRoot;\n this._vmlViewport = vmlViewport;\n this.resize(); // Modify storage\n\n var oldDelFromStorage = storage.delFromStorage;\n var oldAddToStorage = storage.addToStorage;\n\n storage.delFromStorage = function (el) {\n oldDelFromStorage.call(storage, el);\n\n if (el) {\n el.onRemove && el.onRemove(vmlRoot);\n }\n };\n\n storage.addToStorage = function (el) {\n // Displayable already has a vml node\n el.onAdd && el.onAdd(vmlRoot);\n oldAddToStorage.call(storage, el);\n };\n\n this._firstPaint = true;\n}\n\nVMLPainter.prototype = {\n constructor: VMLPainter,\n getType: function () {\n return 'vml';\n },\n\n /**\n * @return {HTMLDivElement}\n */\n getViewportRoot: function () {\n return this._vmlViewport;\n },\n getViewportRootOffset: function () {\n var viewportRoot = this.getViewportRoot();\n\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n },\n\n /**\n * 刷新\n */\n refresh: function () {\n var list = this.storage.getDisplayList(true, true);\n\n this._paintList(list);\n },\n _paintList: function (list) {\n var vmlRoot = this._vmlRoot;\n\n for (var i = 0; i < list.length; i++) {\n var el = list[i];\n\n if (el.invisible || el.ignore) {\n if (!el.__alreadyNotVisible) {\n el.onRemove(vmlRoot);\n } // Set as already invisible\n\n\n el.__alreadyNotVisible = true;\n } else {\n if (el.__alreadyNotVisible) {\n el.onAdd(vmlRoot);\n }\n\n el.__alreadyNotVisible = false;\n\n if (el.__dirty) {\n el.beforeBrush && el.beforeBrush();\n (el.brushVML || el.brush).call(el, vmlRoot);\n el.afterBrush && el.afterBrush();\n }\n }\n\n el.__dirty = false;\n }\n\n if (this._firstPaint) {\n // Detached from document at first time\n // to avoid page refreshing too many times\n // FIXME 如果每次都先 removeChild 可能会导致一些填充和描边的效果改变\n this._vmlViewport.appendChild(vmlRoot);\n\n this._firstPaint = false;\n }\n },\n resize: function (width, height) {\n var width = width == null ? this._getWidth() : width;\n var height = height == null ? this._getHeight() : height;\n\n if (this._width !== width || this._height !== height) {\n this._width = width;\n this._height = height;\n var vmlViewportStyle = this._vmlViewport.style;\n vmlViewportStyle.width = width + 'px';\n vmlViewportStyle.height = height + 'px';\n }\n },\n dispose: function () {\n this.root.innerHTML = '';\n this._vmlRoot = this._vmlViewport = this.storage = null;\n },\n getWidth: function () {\n return this._width;\n },\n getHeight: function () {\n return this._height;\n },\n clear: function () {\n if (this._vmlViewport) {\n this.root.removeChild(this._vmlViewport);\n }\n },\n _getWidth: function () {\n var root = this.root;\n var stl = root.currentStyle;\n return (root.clientWidth || parseInt10(stl.width)) - parseInt10(stl.paddingLeft) - parseInt10(stl.paddingRight) | 0;\n },\n _getHeight: function () {\n var root = this.root;\n var stl = root.currentStyle;\n return (root.clientHeight || parseInt10(stl.height)) - parseInt10(stl.paddingTop) - parseInt10(stl.paddingBottom) | 0;\n }\n}; // Not supported methods\n\nfunction createMethodNotSupport(method) {\n return function () {\n logError('In IE8.0 VML mode painter not support method \"' + method + '\"');\n };\n} // Unsupported methods\n\n\neach(['getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer', 'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer', 'toDataURL', 'pathToImage'], function (name) {\n VMLPainter.prototype[name] = createMethodNotSupport(name);\n});\nvar _default = VMLPainter;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(option) {\n if (!option || !zrUtil.isArray(option.series)) {\n return;\n } // Translate 'k' to 'candlestick'.\n\n\n zrUtil.each(option.series, function (seriesItem) {\n if (zrUtil.isObject(seriesItem) && seriesItem.type === 'k') {\n seriesItem.type = 'candlestick';\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar visualDefault = require(\"../../visual/visualDefault\");\n\nvar VisualMapping = require(\"../../visual/VisualMapping\");\n\nvar visualSolution = require(\"../../visual/visualSolution\");\n\nvar modelUtil = require(\"../../util/model\");\n\nvar numberUtil = require(\"../../util/number\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar mapVisual = VisualMapping.mapVisual;\nvar eachVisual = VisualMapping.eachVisual;\nvar isArray = zrUtil.isArray;\nvar each = zrUtil.each;\nvar asc = numberUtil.asc;\nvar linearMap = numberUtil.linearMap;\nvar noop = zrUtil.noop;\nvar VisualMapModel = echarts.extendComponentModel({\n type: 'visualMap',\n dependencies: ['series'],\n\n /**\n * @readOnly\n * @type {Array.}\n */\n stateList: ['inRange', 'outOfRange'],\n\n /**\n * @readOnly\n * @type {Array.}\n */\n replacableOptionKeys: ['inRange', 'outOfRange', 'target', 'controller', 'color'],\n\n /**\n * [lowerBound, upperBound]\n *\n * @readOnly\n * @type {Array.}\n */\n dataBound: [-Infinity, Infinity],\n\n /**\n * @readOnly\n * @type {string|Object}\n */\n layoutMode: {\n type: 'box',\n ignoreSize: true\n },\n\n /**\n * @protected\n */\n defaultOption: {\n show: true,\n zlevel: 0,\n z: 4,\n seriesIndex: 'all',\n // 'all' or null/undefined: all series.\n // A number or an array of number: the specified series.\n // set min: 0, max: 200, only for campatible with ec2.\n // In fact min max should not have default value.\n min: 0,\n // min value, must specified if pieces is not specified.\n max: 200,\n // max value, must specified if pieces is not specified.\n dimension: null,\n inRange: null,\n // 'color', 'colorHue', 'colorSaturation', 'colorLightness', 'colorAlpha',\n // 'symbol', 'symbolSize'\n outOfRange: null,\n // 'color', 'colorHue', 'colorSaturation',\n // 'colorLightness', 'colorAlpha',\n // 'symbol', 'symbolSize'\n left: 0,\n // 'center' ¦ 'left' ¦ 'right' ¦ {number} (px)\n right: null,\n // The same as left.\n top: null,\n // 'top' ¦ 'bottom' ¦ 'center' ¦ {number} (px)\n bottom: 0,\n // The same as top.\n itemWidth: null,\n itemHeight: null,\n inverse: false,\n orient: 'vertical',\n // 'horizontal' ¦ 'vertical'\n backgroundColor: 'rgba(0,0,0,0)',\n borderColor: '#ccc',\n // 值域边框颜色\n contentColor: '#5793f3',\n inactiveColor: '#aaa',\n borderWidth: 0,\n // 值域边框线宽,单位px,默认为0(无边框)\n padding: 5,\n // 值域内边距,单位px,默认各方向内边距为5,\n // 接受数组分别设定上右下左边距,同css\n textGap: 10,\n //\n precision: 0,\n // 小数精度,默认为0,无小数点\n color: null,\n //颜色(deprecated,兼容ec2,顺序同pieces,不同于inRange/outOfRange)\n formatter: null,\n text: null,\n // 文本,如['高', '低'],兼容ec2,text[0]对应高值,text[1]对应低值\n textStyle: {\n color: '#333' // 值域文字颜色\n\n }\n },\n\n /**\n * @protected\n */\n init: function (option, parentModel, ecModel) {\n /**\n * @private\n * @type {Array.}\n */\n this._dataExtent;\n /**\n * @readOnly\n */\n\n this.targetVisuals = {};\n /**\n * @readOnly\n */\n\n this.controllerVisuals = {};\n /**\n * @readOnly\n */\n\n this.textStyleModel;\n /**\n * [width, height]\n * @readOnly\n * @type {Array.}\n */\n\n this.itemSize;\n this.mergeDefaultAndTheme(option, ecModel);\n },\n\n /**\n * @protected\n */\n optionUpdated: function (newOption, isInit) {\n var thisOption = this.option; // FIXME\n // necessary?\n // Disable realtime view update if canvas is not supported.\n\n if (!env.canvasSupported) {\n thisOption.realtime = false;\n }\n\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, this.replacableOptionKeys);\n this.textStyleModel = this.getModel('textStyle');\n this.resetItemSize();\n this.completeVisualOption();\n },\n\n /**\n * @protected\n */\n resetVisual: function (supplementVisualOption) {\n var stateList = this.stateList;\n supplementVisualOption = zrUtil.bind(supplementVisualOption, this);\n this.controllerVisuals = visualSolution.createVisualMappings(this.option.controller, stateList, supplementVisualOption);\n this.targetVisuals = visualSolution.createVisualMappings(this.option.target, stateList, supplementVisualOption);\n },\n\n /**\n * @protected\n * @return {Array.} An array of series indices.\n */\n getTargetSeriesIndices: function () {\n var optionSeriesIndex = this.option.seriesIndex;\n var seriesIndices = [];\n\n if (optionSeriesIndex == null || optionSeriesIndex === 'all') {\n this.ecModel.eachSeries(function (seriesModel, index) {\n seriesIndices.push(index);\n });\n } else {\n seriesIndices = modelUtil.normalizeToArray(optionSeriesIndex);\n }\n\n return seriesIndices;\n },\n\n /**\n * @public\n */\n eachTargetSeries: function (callback, context) {\n zrUtil.each(this.getTargetSeriesIndices(), function (seriesIndex) {\n callback.call(context, this.ecModel.getSeriesByIndex(seriesIndex));\n }, this);\n },\n\n /**\n * @pubilc\n */\n isTargetSeries: function (seriesModel) {\n var is = false;\n this.eachTargetSeries(function (model) {\n model === seriesModel && (is = true);\n });\n return is;\n },\n\n /**\n * @example\n * this.formatValueText(someVal); // format single numeric value to text.\n * this.formatValueText(someVal, true); // format single category value to text.\n * this.formatValueText([min, max]); // format numeric min-max to text.\n * this.formatValueText([this.dataBound[0], max]); // using data lower bound.\n * this.formatValueText([min, this.dataBound[1]]); // using data upper bound.\n *\n * @param {number|Array.} value Real value, or this.dataBound[0 or 1].\n * @param {boolean} [isCategory=false] Only available when value is number.\n * @param {Array.} edgeSymbols Open-close symbol when value is interval.\n * @return {string}\n * @protected\n */\n formatValueText: function (value, isCategory, edgeSymbols) {\n var option = this.option;\n var precision = option.precision;\n var dataBound = this.dataBound;\n var formatter = option.formatter;\n var isMinMax;\n var textValue;\n edgeSymbols = edgeSymbols || ['<', '>'];\n\n if (zrUtil.isArray(value)) {\n value = value.slice();\n isMinMax = true;\n }\n\n textValue = isCategory ? value : isMinMax ? [toFixed(value[0]), toFixed(value[1])] : toFixed(value);\n\n if (zrUtil.isString(formatter)) {\n return formatter.replace('{value}', isMinMax ? textValue[0] : textValue).replace('{value2}', isMinMax ? textValue[1] : textValue);\n } else if (zrUtil.isFunction(formatter)) {\n return isMinMax ? formatter(value[0], value[1]) : formatter(value);\n }\n\n if (isMinMax) {\n if (value[0] === dataBound[0]) {\n return edgeSymbols[0] + ' ' + textValue[1];\n } else if (value[1] === dataBound[1]) {\n return edgeSymbols[1] + ' ' + textValue[0];\n } else {\n return textValue[0] + ' - ' + textValue[1];\n }\n } else {\n // Format single value (includes category case).\n return textValue;\n }\n\n function toFixed(val) {\n return val === dataBound[0] ? 'min' : val === dataBound[1] ? 'max' : (+val).toFixed(Math.min(precision, 20));\n }\n },\n\n /**\n * @protected\n */\n resetExtent: function () {\n var thisOption = this.option; // Can not calculate data extent by data here.\n // Because series and data may be modified in processing stage.\n // So we do not support the feature \"auto min/max\".\n\n var extent = asc([thisOption.min, thisOption.max]);\n this._dataExtent = extent;\n },\n\n /**\n * @public\n * @param {module:echarts/data/List} list\n * @return {string} Concrete dimention. If return null/undefined,\n * no dimension used.\n */\n getDataDimension: function (list) {\n var optDim = this.option.dimension;\n var listDimensions = list.dimensions;\n\n if (optDim == null && !listDimensions.length) {\n return;\n }\n\n if (optDim != null) {\n return list.getDimension(optDim);\n }\n\n var dimNames = list.dimensions;\n\n for (var i = dimNames.length - 1; i >= 0; i--) {\n var dimName = dimNames[i];\n var dimInfo = list.getDimensionInfo(dimName);\n\n if (!dimInfo.isCalculationCoord) {\n return dimName;\n }\n }\n },\n\n /**\n * @public\n * @override\n */\n getExtent: function () {\n return this._dataExtent.slice();\n },\n\n /**\n * @protected\n */\n completeVisualOption: function () {\n var ecModel = this.ecModel;\n var thisOption = this.option;\n var base = {\n inRange: thisOption.inRange,\n outOfRange: thisOption.outOfRange\n };\n var target = thisOption.target || (thisOption.target = {});\n var controller = thisOption.controller || (thisOption.controller = {});\n zrUtil.merge(target, base); // Do not override\n\n zrUtil.merge(controller, base); // Do not override\n\n var isCategory = this.isCategory();\n completeSingle.call(this, target);\n completeSingle.call(this, controller);\n completeInactive.call(this, target, 'inRange', 'outOfRange'); // completeInactive.call(this, target, 'outOfRange', 'inRange');\n\n completeController.call(this, controller);\n\n function completeSingle(base) {\n // Compatible with ec2 dataRange.color.\n // The mapping order of dataRange.color is: [high value, ..., low value]\n // whereas inRange.color and outOfRange.color is [low value, ..., high value]\n // Notice: ec2 has no inverse.\n if (isArray(thisOption.color) // If there has been inRange: {symbol: ...}, adding color is a mistake.\n // So adding color only when no inRange defined.\n && !base.inRange) {\n base.inRange = {\n color: thisOption.color.slice().reverse()\n };\n } // Compatible with previous logic, always give a defautl color, otherwise\n // simple config with no inRange and outOfRange will not work.\n // Originally we use visualMap.color as the default color, but setOption at\n // the second time the default color will be erased. So we change to use\n // constant DEFAULT_COLOR.\n // If user do not want the default color, set inRange: {color: null}.\n\n\n base.inRange = base.inRange || {\n color: ecModel.get('gradientColor')\n }; // If using shortcut like: {inRange: 'symbol'}, complete default value.\n\n each(this.stateList, function (state) {\n var visualType = base[state];\n\n if (zrUtil.isString(visualType)) {\n var defa = visualDefault.get(visualType, 'active', isCategory);\n\n if (defa) {\n base[state] = {};\n base[state][visualType] = defa;\n } else {\n // Mark as not specified.\n delete base[state];\n }\n }\n }, this);\n }\n\n function completeInactive(base, stateExist, stateAbsent) {\n var optExist = base[stateExist];\n var optAbsent = base[stateAbsent];\n\n if (optExist && !optAbsent) {\n optAbsent = base[stateAbsent] = {};\n each(optExist, function (visualData, visualType) {\n if (!VisualMapping.isValidType(visualType)) {\n return;\n }\n\n var defa = visualDefault.get(visualType, 'inactive', isCategory);\n\n if (defa != null) {\n optAbsent[visualType] = defa; // Compatibable with ec2:\n // Only inactive color to rgba(0,0,0,0) can not\n // make label transparent, so use opacity also.\n\n if (visualType === 'color' && !optAbsent.hasOwnProperty('opacity') && !optAbsent.hasOwnProperty('colorAlpha')) {\n optAbsent.opacity = [0, 0];\n }\n }\n });\n }\n }\n\n function completeController(controller) {\n var symbolExists = (controller.inRange || {}).symbol || (controller.outOfRange || {}).symbol;\n var symbolSizeExists = (controller.inRange || {}).symbolSize || (controller.outOfRange || {}).symbolSize;\n var inactiveColor = this.get('inactiveColor');\n each(this.stateList, function (state) {\n var itemSize = this.itemSize;\n var visuals = controller[state]; // Set inactive color for controller if no other color\n // attr (like colorAlpha) specified.\n\n if (!visuals) {\n visuals = controller[state] = {\n color: isCategory ? inactiveColor : [inactiveColor]\n };\n } // Consistent symbol and symbolSize if not specified.\n\n\n if (visuals.symbol == null) {\n visuals.symbol = symbolExists && zrUtil.clone(symbolExists) || (isCategory ? 'roundRect' : ['roundRect']);\n }\n\n if (visuals.symbolSize == null) {\n visuals.symbolSize = symbolSizeExists && zrUtil.clone(symbolSizeExists) || (isCategory ? itemSize[0] : [itemSize[0], itemSize[0]]);\n } // Filter square and none.\n\n\n visuals.symbol = mapVisual(visuals.symbol, function (symbol) {\n return symbol === 'none' || symbol === 'square' ? 'roundRect' : symbol;\n }); // Normalize symbolSize\n\n var symbolSize = visuals.symbolSize;\n\n if (symbolSize != null) {\n var max = -Infinity; // symbolSize can be object when categories defined.\n\n eachVisual(symbolSize, function (value) {\n value > max && (max = value);\n });\n visuals.symbolSize = mapVisual(symbolSize, function (value) {\n return linearMap(value, [0, max], [0, itemSize[0]], true);\n });\n }\n }, this);\n }\n },\n\n /**\n * @protected\n */\n resetItemSize: function () {\n this.itemSize = [parseFloat(this.get('itemWidth')), parseFloat(this.get('itemHeight'))];\n },\n\n /**\n * @public\n */\n isCategory: function () {\n return !!this.option.categories;\n },\n\n /**\n * @public\n * @abstract\n */\n setSelected: noop,\n\n /**\n * @public\n * @abstract\n * @param {*|module:echarts/data/List} valueOrData\n * @param {number} dataIndex\n * @return {string} state See this.stateList\n */\n getValueState: noop,\n\n /**\n * FIXME\n * Do not publish to thirt-part-dev temporarily\n * util the interface is stable. (Should it return\n * a function but not visual meta?)\n *\n * @pubilc\n * @abstract\n * @param {Function} getColorVisual\n * params: value, valueState\n * return: color\n * @return {Object} visualMeta\n * should includes {stops, outerColors}\n * outerColor means [colorBeyondMinValue, colorBeyondMaxValue]\n */\n getVisualMeta: noop\n});\nvar _default = VisualMapModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n return zrUtil.map(['Radius', 'Angle'], function (dim, dimIdx) {\n var axis = this['get' + dim + 'Axis']();\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n var method = 'dataTo' + dim;\n var result = axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis[method](val - halfSize) - axis[method](val + halfSize));\n\n if (dim === 'Angle') {\n result = result * Math.PI / 180;\n }\n\n return result;\n }, this);\n}\n\nfunction _default(coordSys) {\n var radiusAxis = coordSys.getRadiusAxis();\n var angleAxis = coordSys.getAngleAxis();\n var radius = radiusAxis.getExtent();\n radius[0] > radius[1] && radius.reverse();\n return {\n coordSys: {\n type: 'polar',\n cx: coordSys.cx,\n cy: coordSys.cy,\n r: radius[1],\n r0: radius[0]\n },\n api: {\n coord: zrUtil.bind(function (data) {\n var radius = radiusAxis.dataToRadius(data[0]);\n var angle = angleAxis.dataToAngle(data[1]);\n var coord = coordSys.coordToPoint([radius, angle]);\n coord.push(radius, angle * Math.PI / 180);\n return coord;\n }),\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\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 * @event legendScroll\n * @type {Object}\n * @property {string} type 'legendScroll'\n * @property {string} scrollDataIndex\n */\necharts.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) {\n var scrollDataIndex = payload.scrollDataIndex;\n scrollDataIndex != null && ecModel.eachComponent({\n mainType: 'legend',\n subType: 'scroll',\n query: payload\n }, function (legendModel) {\n legendModel.setScrollDataIndex(scrollDataIndex);\n });\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar each = zrUtil.each;\n\nfunction _default(ecModel) {\n var groupResult = groupSeriesByAxis(ecModel);\n each(groupResult, function (groupItem) {\n var seriesModels = groupItem.seriesModels;\n\n if (!seriesModels.length) {\n return;\n }\n\n calculateBase(groupItem);\n each(seriesModels, function (seriesModel, idx) {\n layoutSingleSeries(seriesModel, groupItem.boxOffsetList[idx], groupItem.boxWidthList[idx]);\n });\n });\n}\n/**\n * Group series by axis.\n */\n\n\nfunction groupSeriesByAxis(ecModel) {\n var result = [];\n var axisList = [];\n ecModel.eachSeriesByType('boxplot', function (seriesModel) {\n var baseAxis = seriesModel.getBaseAxis();\n var idx = zrUtil.indexOf(axisList, baseAxis);\n\n if (idx < 0) {\n idx = axisList.length;\n axisList[idx] = baseAxis;\n result[idx] = {\n axis: baseAxis,\n seriesModels: []\n };\n }\n\n result[idx].seriesModels.push(seriesModel);\n });\n return result;\n}\n/**\n * Calculate offset and box width for each series.\n */\n\n\nfunction calculateBase(groupItem) {\n var extent;\n var baseAxis = groupItem.axis;\n var seriesModels = groupItem.seriesModels;\n var seriesCount = seriesModels.length;\n var boxWidthList = groupItem.boxWidthList = [];\n var boxOffsetList = groupItem.boxOffsetList = [];\n var boundList = [];\n var bandWidth;\n\n if (baseAxis.type === 'category') {\n bandWidth = baseAxis.getBandWidth();\n } else {\n var maxDataCount = 0;\n each(seriesModels, function (seriesModel) {\n maxDataCount = Math.max(maxDataCount, seriesModel.getData().count());\n });\n extent = baseAxis.getExtent(), Math.abs(extent[1] - extent[0]) / maxDataCount;\n }\n\n each(seriesModels, function (seriesModel) {\n var boxWidthBound = seriesModel.get('boxWidth');\n\n if (!zrUtil.isArray(boxWidthBound)) {\n boxWidthBound = [boxWidthBound, boxWidthBound];\n }\n\n boundList.push([parsePercent(boxWidthBound[0], bandWidth) || 0, parsePercent(boxWidthBound[1], bandWidth) || 0]);\n });\n var availableWidth = bandWidth * 0.8 - 2;\n var boxGap = availableWidth / seriesCount * 0.3;\n var boxWidth = (availableWidth - boxGap * (seriesCount - 1)) / seriesCount;\n var base = boxWidth / 2 - availableWidth / 2;\n each(seriesModels, function (seriesModel, idx) {\n boxOffsetList.push(base);\n base += boxGap + boxWidth;\n boxWidthList.push(Math.min(Math.max(boxWidth, boundList[idx][0]), boundList[idx][1]));\n });\n}\n/**\n * Calculate points location for each series.\n */\n\n\nfunction layoutSingleSeries(seriesModel, offset, boxWidth) {\n var coordSys = seriesModel.coordinateSystem;\n var data = seriesModel.getData();\n var halfWidth = boxWidth / 2;\n var cDimIdx = seriesModel.get('layout') === 'horizontal' ? 0 : 1;\n var vDimIdx = 1 - cDimIdx;\n var coordDims = ['x', 'y'];\n var cDim = data.mapDimension(coordDims[cDimIdx]);\n var vDims = data.mapDimension(coordDims[vDimIdx], true);\n\n if (cDim == null || vDims.length < 5) {\n return;\n }\n\n for (var dataIndex = 0; dataIndex < data.count(); dataIndex++) {\n var axisDimVal = data.get(cDim, dataIndex);\n var median = getPoint(axisDimVal, vDims[2], dataIndex);\n var end1 = getPoint(axisDimVal, vDims[0], dataIndex);\n var end2 = getPoint(axisDimVal, vDims[1], dataIndex);\n var end4 = getPoint(axisDimVal, vDims[3], dataIndex);\n var end5 = getPoint(axisDimVal, vDims[4], dataIndex);\n var ends = [];\n addBodyEnd(ends, end2, 0);\n addBodyEnd(ends, end4, 1);\n ends.push(end1, end2, end5, end4);\n layEndLine(ends, end1);\n layEndLine(ends, end5);\n layEndLine(ends, median);\n data.setItemLayout(dataIndex, {\n initBaseline: median[vDimIdx],\n ends: ends\n });\n }\n\n function getPoint(axisDimVal, dimIdx, dataIndex) {\n var val = data.get(dimIdx, dataIndex);\n var p = [];\n p[cDimIdx] = axisDimVal;\n p[vDimIdx] = val;\n var point;\n\n if (isNaN(axisDimVal) || isNaN(val)) {\n point = [NaN, NaN];\n } else {\n point = coordSys.dataToPoint(p);\n point[cDimIdx] += offset;\n }\n\n return point;\n }\n\n function addBodyEnd(ends, point, start) {\n var point1 = point.slice();\n var point2 = point.slice();\n point1[cDimIdx] += halfWidth;\n point2[cDimIdx] -= halfWidth;\n start ? ends.push(point1, point2) : ends.push(point2, point1);\n }\n\n function layEndLine(ends, endCenter) {\n var from = endCenter.slice();\n var to = endCenter.slice();\n from[cDimIdx] -= halfWidth;\n to[cDimIdx] += halfWidth;\n ends.push(from, to);\n }\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar ComponentModel = require(\"../../model/Component\");\n\nvar List = require(\"../../data/List\");\n\nvar modelUtil = require(\"../../util/model\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar TimelineModel = ComponentModel.extend({\n type: 'timeline',\n layoutMode: 'box',\n\n /**\n * @protected\n */\n defaultOption: {\n zlevel: 0,\n // 一级层叠\n z: 4,\n // 二级层叠\n show: true,\n axisType: 'time',\n // 模式是时间类型,支持 value, category\n realtime: true,\n left: '20%',\n top: null,\n right: '20%',\n bottom: 0,\n width: null,\n height: 40,\n padding: 5,\n controlPosition: 'left',\n // 'left' 'right' 'top' 'bottom' 'none'\n autoPlay: false,\n rewind: false,\n // 反向播放\n loop: true,\n playInterval: 2000,\n // 播放时间间隔,单位ms\n currentIndex: 0,\n itemStyle: {},\n label: {\n color: '#000'\n },\n data: []\n },\n\n /**\n * @override\n */\n init: function (option, parentModel, ecModel) {\n /**\n * @private\n * @type {module:echarts/data/List}\n */\n this._data;\n /**\n * @private\n * @type {Array.}\n */\n\n this._names;\n this.mergeDefaultAndTheme(option, ecModel);\n\n this._initData();\n },\n\n /**\n * @override\n */\n mergeOption: function (option) {\n TimelineModel.superApply(this, 'mergeOption', arguments);\n\n this._initData();\n },\n\n /**\n * @param {number} [currentIndex]\n */\n setCurrentIndex: function (currentIndex) {\n if (currentIndex == null) {\n currentIndex = this.option.currentIndex;\n }\n\n var count = this._data.count();\n\n if (this.option.loop) {\n currentIndex = (currentIndex % count + count) % count;\n } else {\n currentIndex >= count && (currentIndex = count - 1);\n currentIndex < 0 && (currentIndex = 0);\n }\n\n this.option.currentIndex = currentIndex;\n },\n\n /**\n * @return {number} currentIndex\n */\n getCurrentIndex: function () {\n return this.option.currentIndex;\n },\n\n /**\n * @return {boolean}\n */\n isIndexMax: function () {\n return this.getCurrentIndex() >= this._data.count() - 1;\n },\n\n /**\n * @param {boolean} state true: play, false: stop\n */\n setPlayState: function (state) {\n this.option.autoPlay = !!state;\n },\n\n /**\n * @return {boolean} true: play, false: stop\n */\n getPlayState: function () {\n return !!this.option.autoPlay;\n },\n\n /**\n * @private\n */\n _initData: function () {\n var thisOption = this.option;\n var dataArr = thisOption.data || [];\n var axisType = thisOption.axisType;\n var names = this._names = [];\n\n if (axisType === 'category') {\n var idxArr = [];\n zrUtil.each(dataArr, function (item, index) {\n var value = modelUtil.getDataItemValue(item);\n var newItem;\n\n if (zrUtil.isObject(item)) {\n newItem = zrUtil.clone(item);\n newItem.value = index;\n } else {\n newItem = index;\n }\n\n idxArr.push(newItem);\n\n if (!zrUtil.isString(value) && (value == null || isNaN(value))) {\n value = '';\n }\n\n names.push(value + '');\n });\n dataArr = idxArr;\n }\n\n var dimType = {\n category: 'ordinal',\n time: 'time'\n }[axisType] || 'number';\n var data = this._data = new List([{\n name: 'value',\n type: dimType\n }], this);\n data.initData(dataArr, names);\n },\n getData: function () {\n return this._data;\n },\n\n /**\n * @public\n * @return {Array.} categoreis\n */\n getCategories: function () {\n if (this.get('axisType') === 'category') {\n return this._names.slice();\n }\n }\n});\nvar _default = TimelineModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @param {Object} opt {labelInside}\n * @return {Object} {\n * position, rotation, labelDirection, labelOffset,\n * tickDirection, labelRotate, z2\n * }\n */\nfunction layout(axisModel, opt) {\n opt = opt || {};\n var single = axisModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n var axisPosition = axis.position;\n var orient = axis.orient;\n var rect = single.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var positionMap = {\n horizontal: {\n top: rectBound[2],\n bottom: rectBound[3]\n },\n vertical: {\n left: rectBound[0],\n right: rectBound[1]\n }\n };\n layout.position = [orient === 'vertical' ? positionMap.vertical[axisPosition] : rectBound[0], orient === 'horizontal' ? positionMap.horizontal[axisPosition] : rectBound[3]];\n var r = {\n horizontal: 0,\n vertical: 1\n };\n layout.rotation = Math.PI / 2 * r[orient];\n var directionMap = {\n top: -1,\n bottom: 1,\n right: 1,\n left: -1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = directionMap[axisPosition];\n\n if (axisModel.get('axisTick.inside')) {\n layout.tickDirection = -layout.tickDirection;\n }\n\n if (zrUtil.retrieve(opt.labelInside, axisModel.get('axisLabel.inside'))) {\n layout.labelDirection = -layout.labelDirection;\n }\n\n var labelRotation = opt.rotate;\n labelRotation == null && (labelRotation = axisModel.get('axisLabel.rotate'));\n layout.labelRotation = axisPosition === 'top' ? -labelRotation : labelRotation;\n layout.z2 = 1;\n return layout;\n}\n\nexports.layout = layout;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar formatUtil = require(\"../../util/format\");\n\nvar numberUtil = require(\"../../util/number\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar MONTH_TEXT = {\n EN: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n CN: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']\n};\nvar WEEK_TEXT = {\n EN: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n CN: ['日', '一', '二', '三', '四', '五', '六']\n};\n\nvar _default = echarts.extendComponentView({\n type: 'calendar',\n\n /**\n * top/left line points\n * @private\n */\n _tlpoints: null,\n\n /**\n * bottom/right line points\n * @private\n */\n _blpoints: null,\n\n /**\n * first day of month\n * @private\n */\n _firstDayOfMonth: null,\n\n /**\n * first day point of month\n * @private\n */\n _firstDayPoints: null,\n render: function (calendarModel, ecModel, api) {\n var group = this.group;\n group.removeAll();\n var coordSys = calendarModel.coordinateSystem; // range info\n\n var rangeData = coordSys.getRangeInfo();\n var orient = coordSys.getOrient();\n\n this._renderDayRect(calendarModel, rangeData, group); // _renderLines must be called prior to following function\n\n\n this._renderLines(calendarModel, rangeData, orient, group);\n\n this._renderYearText(calendarModel, rangeData, orient, group);\n\n this._renderMonthText(calendarModel, orient, group);\n\n this._renderWeekText(calendarModel, rangeData, orient, group);\n },\n // render day rect\n _renderDayRect: function (calendarModel, rangeData, group) {\n var coordSys = calendarModel.coordinateSystem;\n var itemRectStyleModel = calendarModel.getModel('itemStyle').getItemStyle();\n var sw = coordSys.getCellWidth();\n var sh = coordSys.getCellHeight();\n\n for (var i = rangeData.start.time; i <= rangeData.end.time; i = coordSys.getNextNDay(i, 1).time) {\n var point = coordSys.dataToRect([i], false).tl; // every rect\n\n var rect = new graphic.Rect({\n shape: {\n x: point[0],\n y: point[1],\n width: sw,\n height: sh\n },\n cursor: 'default',\n style: itemRectStyleModel\n });\n group.add(rect);\n }\n },\n // render separate line\n _renderLines: function (calendarModel, rangeData, orient, group) {\n var self = this;\n var coordSys = calendarModel.coordinateSystem;\n var lineStyleModel = calendarModel.getModel('splitLine.lineStyle').getLineStyle();\n var show = calendarModel.get('splitLine.show');\n var lineWidth = lineStyleModel.lineWidth;\n this._tlpoints = [];\n this._blpoints = [];\n this._firstDayOfMonth = [];\n this._firstDayPoints = [];\n var firstDay = rangeData.start;\n\n for (var i = 0; firstDay.time <= rangeData.end.time; i++) {\n addPoints(firstDay.formatedDate);\n\n if (i === 0) {\n firstDay = coordSys.getDateInfo(rangeData.start.y + '-' + rangeData.start.m);\n }\n\n var date = firstDay.date;\n date.setMonth(date.getMonth() + 1);\n firstDay = coordSys.getDateInfo(date);\n }\n\n addPoints(coordSys.getNextNDay(rangeData.end.time, 1).formatedDate);\n\n function addPoints(date) {\n self._firstDayOfMonth.push(coordSys.getDateInfo(date));\n\n self._firstDayPoints.push(coordSys.dataToRect([date], false).tl);\n\n var points = self._getLinePointsOfOneWeek(calendarModel, date, orient);\n\n self._tlpoints.push(points[0]);\n\n self._blpoints.push(points[points.length - 1]);\n\n show && self._drawSplitline(points, lineStyleModel, group);\n } // render top/left line\n\n\n show && this._drawSplitline(self._getEdgesPoints(self._tlpoints, lineWidth, orient), lineStyleModel, group); // render bottom/right line\n\n show && this._drawSplitline(self._getEdgesPoints(self._blpoints, lineWidth, orient), lineStyleModel, group);\n },\n // get points at both ends\n _getEdgesPoints: function (points, lineWidth, orient) {\n var rs = [points[0].slice(), points[points.length - 1].slice()];\n var idx = orient === 'horizontal' ? 0 : 1; // both ends of the line are extend half lineWidth\n\n rs[0][idx] = rs[0][idx] - lineWidth / 2;\n rs[1][idx] = rs[1][idx] + lineWidth / 2;\n return rs;\n },\n // render split line\n _drawSplitline: function (points, lineStyleModel, group) {\n var poyline = new graphic.Polyline({\n z2: 20,\n shape: {\n points: points\n },\n style: lineStyleModel\n });\n group.add(poyline);\n },\n // render month line of one week points\n _getLinePointsOfOneWeek: function (calendarModel, date, orient) {\n var coordSys = calendarModel.coordinateSystem;\n date = coordSys.getDateInfo(date);\n var points = [];\n\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(date.time, i);\n var point = coordSys.dataToRect([tmpD.time], false);\n points[2 * tmpD.day] = point.tl;\n points[2 * tmpD.day + 1] = point[orient === 'horizontal' ? 'bl' : 'tr'];\n }\n\n return points;\n },\n _formatterLabel: function (formatter, params) {\n if (typeof formatter === 'string' && formatter) {\n return formatUtil.formatTplSimple(formatter, params);\n }\n\n if (typeof formatter === 'function') {\n return formatter(params);\n }\n\n return params.nameMap;\n },\n _yearTextPositionControl: function (textEl, point, orient, position, margin) {\n point = point.slice();\n var aligns = ['center', 'bottom'];\n\n if (position === 'bottom') {\n point[1] += margin;\n aligns = ['center', 'top'];\n } else if (position === 'left') {\n point[0] -= margin;\n } else if (position === 'right') {\n point[0] += margin;\n aligns = ['center', 'top'];\n } else {\n // top\n point[1] -= margin;\n }\n\n var rotate = 0;\n\n if (position === 'left' || position === 'right') {\n rotate = Math.PI / 2;\n }\n\n return {\n rotation: rotate,\n position: point,\n style: {\n textAlign: aligns[0],\n textVerticalAlign: aligns[1]\n }\n };\n },\n // render year\n _renderYearText: function (calendarModel, rangeData, orient, group) {\n var yearLabel = calendarModel.getModel('yearLabel');\n\n if (!yearLabel.get('show')) {\n return;\n }\n\n var margin = yearLabel.get('margin');\n var pos = yearLabel.get('position');\n\n if (!pos) {\n pos = orient !== 'horizontal' ? 'top' : 'left';\n }\n\n var points = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]];\n var xc = (points[0][0] + points[1][0]) / 2;\n var yc = (points[0][1] + points[1][1]) / 2;\n var idx = orient === 'horizontal' ? 0 : 1;\n var posPoints = {\n top: [xc, points[idx][1]],\n bottom: [xc, points[1 - idx][1]],\n left: [points[1 - idx][0], yc],\n right: [points[idx][0], yc]\n };\n var name = rangeData.start.y;\n\n if (+rangeData.end.y > +rangeData.start.y) {\n name = name + '-' + rangeData.end.y;\n }\n\n var formatter = yearLabel.get('formatter');\n var params = {\n start: rangeData.start.y,\n end: rangeData.end.y,\n nameMap: name\n };\n\n var content = this._formatterLabel(formatter, params);\n\n var yearText = new graphic.Text({\n z2: 30\n });\n graphic.setTextStyle(yearText.style, yearLabel, {\n text: content\n }), yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin));\n group.add(yearText);\n },\n _monthTextPositionControl: function (point, isCenter, orient, position, margin) {\n var align = 'left';\n var vAlign = 'top';\n var x = point[0];\n var y = point[1];\n\n if (orient === 'horizontal') {\n y = y + margin;\n\n if (isCenter) {\n align = 'center';\n }\n\n if (position === 'start') {\n vAlign = 'bottom';\n }\n } else {\n x = x + margin;\n\n if (isCenter) {\n vAlign = 'middle';\n }\n\n if (position === 'start') {\n align = 'right';\n }\n }\n\n return {\n x: x,\n y: y,\n textAlign: align,\n textVerticalAlign: vAlign\n };\n },\n // render month and year text\n _renderMonthText: function (calendarModel, orient, group) {\n var monthLabel = calendarModel.getModel('monthLabel');\n\n if (!monthLabel.get('show')) {\n return;\n }\n\n var nameMap = monthLabel.get('nameMap');\n var margin = monthLabel.get('margin');\n var pos = monthLabel.get('position');\n var align = monthLabel.get('align');\n var termPoints = [this._tlpoints, this._blpoints];\n\n if (zrUtil.isString(nameMap)) {\n nameMap = MONTH_TEXT[nameMap.toUpperCase()] || [];\n }\n\n var idx = pos === 'start' ? 0 : 1;\n var axis = orient === 'horizontal' ? 0 : 1;\n margin = pos === 'start' ? -margin : margin;\n var isCenter = align === 'center';\n\n for (var i = 0; i < termPoints[idx].length - 1; i++) {\n var tmp = termPoints[idx][i].slice();\n var firstDay = this._firstDayOfMonth[i];\n\n if (isCenter) {\n var firstDayPoints = this._firstDayPoints[i];\n tmp[axis] = (firstDayPoints[axis] + termPoints[0][i + 1][axis]) / 2;\n }\n\n var formatter = monthLabel.get('formatter');\n var name = nameMap[+firstDay.m - 1];\n var params = {\n yyyy: firstDay.y,\n yy: (firstDay.y + '').slice(2),\n MM: firstDay.m,\n M: +firstDay.m,\n nameMap: name\n };\n\n var content = this._formatterLabel(formatter, params);\n\n var monthText = new graphic.Text({\n z2: 30\n });\n zrUtil.extend(graphic.setTextStyle(monthText.style, monthLabel, {\n text: content\n }), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin));\n group.add(monthText);\n }\n },\n _weekTextPositionControl: function (point, orient, position, margin, cellSize) {\n var align = 'center';\n var vAlign = 'middle';\n var x = point[0];\n var y = point[1];\n var isStart = position === 'start';\n\n if (orient === 'horizontal') {\n x = x + margin + (isStart ? 1 : -1) * cellSize[0] / 2;\n align = isStart ? 'right' : 'left';\n } else {\n y = y + margin + (isStart ? 1 : -1) * cellSize[1] / 2;\n vAlign = isStart ? 'bottom' : 'top';\n }\n\n return {\n x: x,\n y: y,\n textAlign: align,\n textVerticalAlign: vAlign\n };\n },\n // render weeks\n _renderWeekText: function (calendarModel, rangeData, orient, group) {\n var dayLabel = calendarModel.getModel('dayLabel');\n\n if (!dayLabel.get('show')) {\n return;\n }\n\n var coordSys = calendarModel.coordinateSystem;\n var pos = dayLabel.get('position');\n var nameMap = dayLabel.get('nameMap');\n var margin = dayLabel.get('margin');\n var firstDayOfWeek = coordSys.getFirstDayOfWeek();\n\n if (zrUtil.isString(nameMap)) {\n nameMap = WEEK_TEXT[nameMap.toUpperCase()] || [];\n }\n\n var start = coordSys.getNextNDay(rangeData.end.time, 7 - rangeData.lweek).time;\n var cellSize = [coordSys.getCellWidth(), coordSys.getCellHeight()];\n margin = numberUtil.parsePercent(margin, cellSize[orient === 'horizontal' ? 0 : 1]);\n\n if (pos === 'start') {\n start = coordSys.getNextNDay(rangeData.start.time, -(7 + rangeData.fweek)).time;\n margin = -margin;\n }\n\n for (var i = 0; i < 7; i++) {\n var tmpD = coordSys.getNextNDay(start, i);\n var point = coordSys.dataToRect([tmpD.time], false).center;\n var day = i;\n day = Math.abs((i + firstDayOfWeek) % 7);\n var weekText = new graphic.Text({\n z2: 30\n });\n zrUtil.extend(graphic.setTextStyle(weekText.style, dayLabel, {\n text: nameMap[day]\n }), this._weekTextPositionControl(point, orient, pos, margin, cellSize));\n group.add(weekText);\n }\n }\n});\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar preprocessor = require(\"./timeline/preprocessor\");\n\nrequire(\"./timeline/typeDefaulter\");\n\nrequire(\"./timeline/timelineAction\");\n\nrequire(\"./timeline/SliderTimelineModel\");\n\nrequire(\"./timeline/SliderTimelineView\");\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 * DataZoom component entry\n */\necharts.registerPreprocessor(preprocessor);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction normalize(a) {\n if (!(a instanceof Array)) {\n a = [a, a];\n }\n\n return a;\n}\n\nvar opacityQuery = 'lineStyle.opacity'.split('.');\nvar _default = {\n seriesType: 'lines',\n reset: function (seriesModel, ecModel, api) {\n var symbolType = normalize(seriesModel.get('symbol'));\n var symbolSize = normalize(seriesModel.get('symbolSize'));\n var data = seriesModel.getData();\n data.setVisual('fromSymbol', symbolType && symbolType[0]);\n data.setVisual('toSymbol', symbolType && symbolType[1]);\n data.setVisual('fromSymbolSize', symbolSize && symbolSize[0]);\n data.setVisual('toSymbolSize', symbolSize && symbolSize[1]);\n data.setVisual('opacity', seriesModel.get(opacityQuery));\n\n function dataEach(data, idx) {\n var itemModel = data.getItemModel(idx);\n var symbolType = normalize(itemModel.getShallow('symbol', true));\n var symbolSize = normalize(itemModel.getShallow('symbolSize', true));\n var opacity = itemModel.get(opacityQuery);\n symbolType[0] && data.setItemVisual(idx, 'fromSymbol', symbolType[0]);\n symbolType[1] && data.setItemVisual(idx, 'toSymbol', symbolType[1]);\n symbolSize[0] && data.setItemVisual(idx, 'fromSymbolSize', symbolSize[0]);\n symbolSize[1] && data.setItemVisual(idx, 'toSymbolSize', symbolSize[1]);\n data.setItemVisual(idx, 'opacity', opacity);\n }\n\n return {\n dataEach: data.hasItemOption ? dataEach : null\n };\n }\n};\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Geo = require(\"./Geo\");\n\nvar layout = require(\"../../util/layout\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar geoSourceManager = require(\"./geoSourceManager\");\n\nvar mapDataStorage = require(\"./mapDataStorage\");\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 * Resize method bound to the geo\n * @param {module:echarts/coord/geo/GeoModel|module:echarts/chart/map/MapModel} geoModel\n * @param {module:echarts/ExtensionAPI} api\n */\nfunction resizeGeo(geoModel, api) {\n var boundingCoords = geoModel.get('boundingCoords');\n\n if (boundingCoords != null) {\n var leftTop = boundingCoords[0];\n var rightBottom = boundingCoords[1];\n\n if (isNaN(leftTop[0]) || isNaN(leftTop[1]) || isNaN(rightBottom[0]) || isNaN(rightBottom[1])) {} else {\n this.setBoundingRect(leftTop[0], leftTop[1], rightBottom[0] - leftTop[0], rightBottom[1] - leftTop[1]);\n }\n }\n\n var rect = this.getBoundingRect();\n var boxLayoutOption;\n var center = geoModel.get('layoutCenter');\n var size = geoModel.get('layoutSize');\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n var aspect = rect.width / rect.height * this.aspectScale;\n var useCenterAndSize = false;\n\n if (center && size) {\n center = [numberUtil.parsePercent(center[0], viewWidth), numberUtil.parsePercent(center[1], viewHeight)];\n size = numberUtil.parsePercent(size, Math.min(viewWidth, viewHeight));\n\n if (!isNaN(center[0]) && !isNaN(center[1]) && !isNaN(size)) {\n useCenterAndSize = true;\n } else {}\n }\n\n var viewRect;\n\n if (useCenterAndSize) {\n var viewRect = {};\n\n if (aspect > 1) {\n // Width is same with size\n viewRect.width = size;\n viewRect.height = size / aspect;\n } else {\n viewRect.height = size;\n viewRect.width = size * aspect;\n }\n\n viewRect.y = center[1] - viewRect.height / 2;\n viewRect.x = center[0] - viewRect.width / 2;\n } else {\n // Use left/top/width/height\n boxLayoutOption = geoModel.getBoxLayoutParams(); // 0.75 rate\n\n boxLayoutOption.aspect = aspect;\n viewRect = layout.getLayoutRect(boxLayoutOption, {\n width: viewWidth,\n height: viewHeight\n });\n }\n\n this.setViewRect(viewRect.x, viewRect.y, viewRect.width, viewRect.height);\n this.setCenter(geoModel.get('center'));\n this.setZoom(geoModel.get('zoom'));\n}\n/**\n * @param {module:echarts/coord/Geo} geo\n * @param {module:echarts/model/Model} model\n * @inner\n */\n\n\nfunction setGeoCoords(geo, model) {\n zrUtil.each(model.get('geoCoord'), function (geoCoord, name) {\n geo.addGeoCoord(name, geoCoord);\n });\n}\n\nvar geoCreator = {\n // For deciding which dimensions to use when creating list data\n dimensions: Geo.prototype.dimensions,\n create: function (ecModel, api) {\n var geoList = []; // FIXME Create each time may be slow\n\n ecModel.eachComponent('geo', function (geoModel, idx) {\n var name = geoModel.get('map');\n var aspectScale = geoModel.get('aspectScale');\n var invertLongitute = true;\n var mapRecords = mapDataStorage.retrieveMap(name);\n\n if (mapRecords && mapRecords[0] && mapRecords[0].type === 'svg') {\n aspectScale == null && (aspectScale = 1);\n invertLongitute = false;\n } else {\n aspectScale == null && (aspectScale = 0.75);\n }\n\n var geo = new Geo(name + idx, name, geoModel.get('nameMap'), invertLongitute);\n geo.aspectScale = aspectScale;\n geo.zoomLimit = geoModel.get('scaleLimit');\n geoList.push(geo);\n setGeoCoords(geo, geoModel);\n geoModel.coordinateSystem = geo;\n geo.model = geoModel; // Inject resize method\n\n geo.resize = resizeGeo;\n geo.resize(geoModel, api);\n });\n ecModel.eachSeries(function (seriesModel) {\n var coordSys = seriesModel.get('coordinateSystem');\n\n if (coordSys === 'geo') {\n var geoIndex = seriesModel.get('geoIndex') || 0;\n seriesModel.coordinateSystem = geoList[geoIndex];\n }\n }); // If has map series\n\n var mapModelGroupBySeries = {};\n ecModel.eachSeriesByType('map', function (seriesModel) {\n if (!seriesModel.getHostGeoModel()) {\n var mapType = seriesModel.getMapType();\n mapModelGroupBySeries[mapType] = mapModelGroupBySeries[mapType] || [];\n mapModelGroupBySeries[mapType].push(seriesModel);\n }\n });\n zrUtil.each(mapModelGroupBySeries, function (mapSeries, mapType) {\n var nameMapList = zrUtil.map(mapSeries, function (singleMapSeries) {\n return singleMapSeries.get('nameMap');\n });\n var geo = new Geo(mapType, mapType, zrUtil.mergeAll(nameMapList));\n geo.zoomLimit = zrUtil.retrieve.apply(null, zrUtil.map(mapSeries, function (singleMapSeries) {\n return singleMapSeries.get('scaleLimit');\n }));\n geoList.push(geo); // Inject resize method\n\n geo.resize = resizeGeo;\n geo.aspectScale = mapSeries[0].get('aspectScale');\n geo.resize(mapSeries[0], api);\n zrUtil.each(mapSeries, function (singleMapSeries) {\n singleMapSeries.coordinateSystem = geo;\n setGeoCoords(geo, singleMapSeries);\n });\n });\n return geoList;\n },\n\n /**\n * Fill given regions array\n * @param {Array.} originRegionArr\n * @param {string} mapName\n * @param {Object} [nameMap]\n * @return {Array}\n */\n getFilledRegions: function (originRegionArr, mapName, nameMap) {\n // Not use the original\n var regionsArr = (originRegionArr || []).slice();\n var dataNameMap = zrUtil.createHashMap();\n\n for (var i = 0; i < regionsArr.length; i++) {\n dataNameMap.set(regionsArr[i].name, regionsArr[i]);\n }\n\n var source = geoSourceManager.load(mapName, nameMap);\n zrUtil.each(source.regions, function (region) {\n var name = region.name;\n !dataNameMap.get(name) && regionsArr.push({\n name: name\n });\n });\n return regionsArr;\n }\n};\necharts.registerCoordinateSystem('geo', geoCreator);\nvar _default = geoCreator;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar vec2 = require(\"zrender/lib/core/vector\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* A third-party license is embeded for some of the code in this file:\n* Some formulas were originally copied from \"d3.js\" with some\n* modifications made for this project.\n* (See more details in the comment of the method \"step\" below.)\n* The use of the source code of this file is also subject to the terms\n* and consitions of the license of \"d3.js\" (BSD-3Clause, see\n* ).\n*/\nvar scaleAndAdd = vec2.scaleAndAdd; // function adjacentNode(n, e) {\n// return e.n1 === n ? e.n2 : e.n1;\n// }\n\nfunction forceLayout(nodes, edges, opts) {\n var rect = opts.rect;\n var width = rect.width;\n var height = rect.height;\n var center = [rect.x + width / 2, rect.y + height / 2]; // var scale = opts.scale || 1;\n\n var gravity = opts.gravity == null ? 0.1 : opts.gravity; // for (var i = 0; i < edges.length; i++) {\n // var e = edges[i];\n // var n1 = e.n1;\n // var n2 = e.n2;\n // n1.edges = n1.edges || [];\n // n2.edges = n2.edges || [];\n // n1.edges.push(e);\n // n2.edges.push(e);\n // }\n // Init position\n\n for (var i = 0; i < nodes.length; i++) {\n var n = nodes[i];\n\n if (!n.p) {\n n.p = vec2.create(width * (Math.random() - 0.5) + center[0], height * (Math.random() - 0.5) + center[1]);\n }\n\n n.pp = vec2.clone(n.p);\n n.edges = null;\n } // Formula in 'Graph Drawing by Force-directed Placement'\n // var k = scale * Math.sqrt(width * height / nodes.length);\n // var k2 = k * k;\n\n\n var initialFriction = opts.friction == null ? 0.6 : opts.friction;\n var friction = initialFriction;\n return {\n warmUp: function () {\n friction = initialFriction * 0.8;\n },\n setFixed: function (idx) {\n nodes[idx].fixed = true;\n },\n setUnfixed: function (idx) {\n nodes[idx].fixed = false;\n },\n\n /**\n * Some formulas were originally copied from \"d3.js\"\n * https://github.com/d3/d3/blob/b516d77fb8566b576088e73410437494717ada26/src/layout/force.js\n * with some modifications made for this project.\n * See the license statement at the head of this file.\n */\n step: function (cb) {\n var v12 = [];\n var nLen = nodes.length;\n\n for (var i = 0; i < edges.length; i++) {\n var e = edges[i];\n\n if (e.ignoreForceLayout) {\n continue;\n }\n\n var n1 = e.n1;\n var n2 = e.n2;\n vec2.sub(v12, n2.p, n1.p);\n var d = vec2.len(v12) - e.d;\n var w = n2.w / (n1.w + n2.w);\n\n if (isNaN(w)) {\n w = 0;\n }\n\n vec2.normalize(v12, v12);\n !n1.fixed && scaleAndAdd(n1.p, n1.p, v12, w * d * friction);\n !n2.fixed && scaleAndAdd(n2.p, n2.p, v12, -(1 - w) * d * friction);\n } // Gravity\n\n\n for (var i = 0; i < nLen; i++) {\n var n = nodes[i];\n\n if (!n.fixed) {\n vec2.sub(v12, center, n.p); // var d = vec2.len(v12);\n // vec2.scale(v12, v12, 1 / d);\n // var gravityFactor = gravity;\n\n scaleAndAdd(n.p, n.p, v12, gravity * friction);\n }\n } // Repulsive\n // PENDING\n\n\n for (var i = 0; i < nLen; i++) {\n var n1 = nodes[i];\n\n for (var j = i + 1; j < nLen; j++) {\n var n2 = nodes[j];\n vec2.sub(v12, n2.p, n1.p);\n var d = vec2.len(v12);\n\n if (d === 0) {\n // Random repulse\n vec2.set(v12, Math.random() - 0.5, Math.random() - 0.5);\n d = 1;\n }\n\n var repFact = (n1.rep + n2.rep) / d / d;\n !n1.fixed && scaleAndAdd(n1.pp, n1.pp, v12, repFact);\n !n2.fixed && scaleAndAdd(n2.pp, n2.pp, v12, -repFact);\n }\n }\n\n var v = [];\n\n for (var i = 0; i < nLen; i++) {\n var n = nodes[i];\n\n if (!n.fixed) {\n vec2.sub(v, n.p, n.pp);\n scaleAndAdd(n.p, n.p, v, friction);\n vec2.copy(n.pp, n.p);\n }\n }\n\n friction = friction * 0.992;\n cb && cb(nodes, edges, friction < 0.01);\n }\n };\n}\n\nexports.forceLayout = forceLayout;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * Calculate slider move result.\n * Usage:\n * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as\n * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`.\n * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`.\n *\n * @param {number} delta Move length.\n * @param {Array.} handleEnds handleEnds[0] can be bigger then handleEnds[1].\n * handleEnds will be modified in this method.\n * @param {Array.} extent handleEnds is restricted by extent.\n * extent[0] should less or equals than extent[1].\n * @param {number|string} handleIndex Can be 'all', means that both move the two handleEnds.\n * @param {number} [minSpan] The range of dataZoom can not be smaller than that.\n * If not set, handle0 and cross handle1. If set as a non-negative\n * number (including `0`), handles will push each other when reaching\n * the minSpan.\n * @param {number} [maxSpan] The range of dataZoom can not be larger than that.\n * @return {Array.} The input handleEnds.\n */\nfunction _default(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) {\n delta = delta || 0;\n var extentSpan = extent[1] - extent[0]; // Notice maxSpan and minSpan can be null/undefined.\n\n if (minSpan != null) {\n minSpan = restrict(minSpan, [0, extentSpan]);\n }\n\n if (maxSpan != null) {\n maxSpan = Math.max(maxSpan, minSpan != null ? minSpan : 0);\n }\n\n if (handleIndex === 'all') {\n var handleSpan = Math.abs(handleEnds[1] - handleEnds[0]);\n handleSpan = restrict(handleSpan, [0, extentSpan]);\n minSpan = maxSpan = restrict(handleSpan, [minSpan, maxSpan]);\n handleIndex = 0;\n }\n\n handleEnds[0] = restrict(handleEnds[0], extent);\n handleEnds[1] = restrict(handleEnds[1], extent);\n var originalDistSign = getSpanSign(handleEnds, handleIndex);\n handleEnds[handleIndex] += delta; // Restrict in extent.\n\n var extentMinSpan = minSpan || 0;\n var realExtent = extent.slice();\n originalDistSign.sign < 0 ? realExtent[0] += extentMinSpan : realExtent[1] -= extentMinSpan;\n handleEnds[handleIndex] = restrict(handleEnds[handleIndex], realExtent); // Expand span.\n\n var currDistSign = getSpanSign(handleEnds, handleIndex);\n\n if (minSpan != null && (currDistSign.sign !== originalDistSign.sign || currDistSign.span < minSpan)) {\n // If minSpan exists, 'cross' is forbidden.\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + originalDistSign.sign * minSpan;\n } // Shrink span.\n\n\n var currDistSign = getSpanSign(handleEnds, handleIndex);\n\n if (maxSpan != null && currDistSign.span > maxSpan) {\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + currDistSign.sign * maxSpan;\n }\n\n return handleEnds;\n}\n\nfunction getSpanSign(handleEnds, handleIndex) {\n var dist = handleEnds[handleIndex] - handleEnds[1 - handleIndex]; // If `handleEnds[0] === handleEnds[1]`, always believe that handleEnd[0]\n // is at left of handleEnds[1] for non-cross case.\n\n return {\n span: Math.abs(dist),\n sign: dist > 0 ? -1 : dist < 0 ? 1 : handleIndex ? -1 : 1\n };\n}\n\nfunction restrict(value, extend) {\n return Math.min(extend[1] != null ? extend[1] : Infinity, Math.max(extend[0] != null ? extend[0] : -Infinity, value));\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./tree/TreeSeries\");\n\nrequire(\"./tree/TreeView\");\n\nrequire(\"./tree/treeAction\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar treeLayout = require(\"./tree/treeLayout\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerVisual(visualSymbol('tree', 'circle'));\necharts.registerLayout(treeLayout);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar BaseAxisPointer = require(\"./BaseAxisPointer\");\n\nvar viewHelper = require(\"./viewHelper\");\n\nvar singleAxisHelper = require(\"../../coord/single/singleAxisHelper\");\n\nvar AxisView = require(\"../axis/AxisView\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar XY = ['x', 'y'];\nvar WH = ['width', 'height'];\nvar SingleAxisPointer = BaseAxisPointer.extend({\n /**\n * @override\n */\n makeElOption: function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n var coordSys = axis.coordinateSystem;\n var otherExtent = getGlobalExtent(coordSys, 1 - getPointDimIndex(axis));\n var pixelValue = coordSys.dataToPoint(value)[0];\n var axisPointerType = axisPointerModel.get('type');\n\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, pixelValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n\n var layoutInfo = singleAxisHelper.layout(axisModel);\n viewHelper.buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api);\n },\n\n /**\n * @override\n */\n getHandleTransform: function (value, axisModel, axisPointerModel) {\n var layoutInfo = singleAxisHelper.layout(axisModel, {\n labelInside: false\n });\n layoutInfo.labelMargin = axisPointerModel.get('handle.margin');\n return {\n position: viewHelper.getTransformedPosition(axisModel.axis, value, layoutInfo),\n rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0)\n };\n },\n\n /**\n * @override\n */\n updateHandleTransform: function (transform, delta, axisModel, axisPointerModel) {\n var axis = axisModel.axis;\n var coordSys = axis.coordinateSystem;\n var dimIndex = getPointDimIndex(axis);\n var axisExtent = getGlobalExtent(coordSys, dimIndex);\n var currPosition = transform.position;\n currPosition[dimIndex] += delta[dimIndex];\n currPosition[dimIndex] = Math.min(axisExtent[1], currPosition[dimIndex]);\n currPosition[dimIndex] = Math.max(axisExtent[0], currPosition[dimIndex]);\n var otherExtent = getGlobalExtent(coordSys, 1 - dimIndex);\n var cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2;\n var cursorPoint = [cursorOtherValue, cursorOtherValue];\n cursorPoint[dimIndex] = currPosition[dimIndex];\n return {\n position: currPosition,\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: {\n verticalAlign: 'middle'\n }\n };\n }\n});\nvar pointerShapeBuilder = {\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getPointDimIndex(axis));\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\n },\n shadow: function (axis, pixelValue, otherExtent) {\n var bandWidth = axis.getBandWidth();\n var span = otherExtent[1] - otherExtent[0];\n return {\n type: 'Rect',\n shape: viewHelper.makeRectShape([pixelValue - bandWidth / 2, otherExtent[0]], [bandWidth, span], getPointDimIndex(axis))\n };\n }\n};\n\nfunction getPointDimIndex(axis) {\n return axis.isHorizontal() ? 0 : 1;\n}\n\nfunction getGlobalExtent(coordSys, dimIndex) {\n var rect = coordSys.getRect();\n return [rect[XY[dimIndex]], rect[XY[dimIndex]] + rect[WH[dimIndex]]];\n}\n\nAxisView.registerAxisPointerClass('SingleAxisPointer', SingleAxisPointer);\nvar _default = SingleAxisPointer;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar LegendModel = require(\"./LegendModel\");\n\nvar _layout = require(\"../../util/layout\");\n\nvar mergeLayoutParam = _layout.mergeLayoutParam;\nvar getLayoutParams = _layout.getLayoutParams;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar ScrollableLegendModel = LegendModel.extend({\n type: 'legend.scroll',\n\n /**\n * @param {number} scrollDataIndex\n */\n setScrollDataIndex: function (scrollDataIndex) {\n this.option.scrollDataIndex = scrollDataIndex;\n },\n defaultOption: {\n scrollDataIndex: 0,\n pageButtonItemGap: 5,\n pageButtonGap: null,\n pageButtonPosition: 'end',\n // 'start' or 'end'\n pageFormatter: '{current}/{total}',\n // If null/undefined, do not show page.\n pageIcons: {\n horizontal: ['M0,0L12,-10L12,10z', 'M0,0L-12,-10L-12,10z'],\n vertical: ['M0,0L20,0L10,-20z', 'M0,0L20,0L10,20z']\n },\n pageIconColor: '#2f4554',\n pageIconInactiveColor: '#aaa',\n pageIconSize: 15,\n // Can be [10, 3], which represents [width, height]\n pageTextStyle: {\n color: '#333'\n },\n animationDurationUpdate: 800\n },\n\n /**\n * @override\n */\n init: function (option, parentModel, ecModel, extraOpt) {\n var inputPositionParams = getLayoutParams(option);\n ScrollableLegendModel.superCall(this, 'init', option, parentModel, ecModel, extraOpt);\n mergeAndNormalizeLayoutParams(this, option, inputPositionParams);\n },\n\n /**\n * @override\n */\n mergeOption: function (option, extraOpt) {\n ScrollableLegendModel.superCall(this, 'mergeOption', option, extraOpt);\n mergeAndNormalizeLayoutParams(this, this.option, option);\n }\n}); // Do not `ignoreSize` to enable setting {left: 10, right: 10}.\n\nfunction mergeAndNormalizeLayoutParams(legendModel, target, raw) {\n var orient = legendModel.getOrient();\n var ignoreSize = [1, 1];\n ignoreSize[orient.index] = 0;\n mergeLayoutParam(target, raw, {\n type: 'box',\n ignoreSize: ignoreSize\n });\n}\n\nvar _default = ScrollableLegendModel;\nmodule.exports = _default;","require(\"./graphic\");\n\nvar _zrender = require(\"../zrender\");\n\nvar registerPainter = _zrender.registerPainter;\n\nvar Painter = require(\"./Painter\");\n\nregisterPainter('vml', Painter);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar throttleUtil = require(\"../util/throttle\");\n\nvar parallelPreprocessor = require(\"../coord/parallel/parallelPreprocessor\");\n\nrequire(\"../coord/parallel/parallelCreator\");\n\nrequire(\"../coord/parallel/ParallelModel\");\n\nrequire(\"./parallelAxis\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar CLICK_THRESHOLD = 5; // > 4\n// Parallel view\n\necharts.extendComponentView({\n type: 'parallel',\n render: function (parallelModel, ecModel, api) {\n this._model = parallelModel;\n this._api = api;\n\n if (!this._handlers) {\n this._handlers = {};\n zrUtil.each(handlers, function (handler, eventName) {\n api.getZr().on(eventName, this._handlers[eventName] = zrUtil.bind(handler, this));\n }, this);\n }\n\n throttleUtil.createOrUpdate(this, '_throttledDispatchExpand', parallelModel.get('axisExpandRate'), 'fixRate');\n },\n dispose: function (ecModel, api) {\n zrUtil.each(this._handlers, function (handler, eventName) {\n api.getZr().off(eventName, handler);\n });\n this._handlers = null;\n },\n\n /**\n * @param {Object} [opt] If null, cancle the last action triggering for debounce.\n */\n _throttledDispatchExpand: function (opt) {\n this._dispatchExpand(opt);\n },\n _dispatchExpand: function (opt) {\n opt && this._api.dispatchAction(zrUtil.extend({\n type: 'parallelAxisExpand'\n }, opt));\n }\n});\nvar handlers = {\n mousedown: function (e) {\n if (checkTrigger(this, 'click')) {\n this._mouseDownPoint = [e.offsetX, e.offsetY];\n }\n },\n mouseup: function (e) {\n var mouseDownPoint = this._mouseDownPoint;\n\n if (checkTrigger(this, 'click') && mouseDownPoint) {\n var point = [e.offsetX, e.offsetY];\n var dist = Math.pow(mouseDownPoint[0] - point[0], 2) + Math.pow(mouseDownPoint[1] - point[1], 2);\n\n if (dist > CLICK_THRESHOLD) {\n return;\n }\n\n var result = this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]);\n\n result.behavior !== 'none' && this._dispatchExpand({\n axisExpandWindow: result.axisExpandWindow\n });\n }\n\n this._mouseDownPoint = null;\n },\n mousemove: function (e) {\n // Should do nothing when brushing.\n if (this._mouseDownPoint || !checkTrigger(this, 'mousemove')) {\n return;\n }\n\n var model = this._model;\n var result = model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX, e.offsetY]);\n var behavior = result.behavior;\n behavior === 'jump' && this._throttledDispatchExpand.debounceNextCall(model.get('axisExpandDebounce'));\n\n this._throttledDispatchExpand(behavior === 'none' ? null // Cancle the last trigger, in case that mouse slide out of the area quickly.\n : {\n axisExpandWindow: result.axisExpandWindow,\n // Jumping uses animation, and sliding suppresses animation.\n animation: behavior === 'jump' ? null : false\n });\n }\n};\n\nfunction checkTrigger(view, triggerOn) {\n var model = view._model;\n return model.get('axisExpandable') && model.get('axisExpandTriggerOn') === triggerOn;\n}\n\necharts.registerPreprocessor(parallelPreprocessor);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar visualSolution = require(\"../../visual/visualSolution\");\n\nvar Model = require(\"../../model/Model\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar DEFAULT_OUT_OF_BRUSH_COLOR = ['#ddd'];\nvar BrushModel = echarts.extendComponentModel({\n type: 'brush',\n dependencies: ['geo', 'grid', 'xAxis', 'yAxis', 'parallel', 'series'],\n\n /**\n * @protected\n */\n defaultOption: {\n // inBrush: null,\n // outOfBrush: null,\n toolbox: null,\n // Default value see preprocessor.\n brushLink: null,\n // Series indices array, broadcast using dataIndex.\n // or 'all', which means all series. 'none' or null means no series.\n seriesIndex: 'all',\n // seriesIndex array, specify series controlled by this brush component.\n geoIndex: null,\n //\n xAxisIndex: null,\n yAxisIndex: null,\n brushType: 'rect',\n // Default brushType, see BrushController.\n brushMode: 'single',\n // Default brushMode, 'single' or 'multiple'\n transformable: true,\n // Default transformable.\n brushStyle: {\n // Default brushStyle\n borderWidth: 1,\n color: 'rgba(120,140,180,0.3)',\n borderColor: 'rgba(120,140,180,0.8)'\n },\n throttleType: 'fixRate',\n // Throttle in brushSelected event. 'fixRate' or 'debounce'.\n // If null, no throttle. Valid only in the first brush component\n throttleDelay: 0,\n // Unit: ms, 0 means every event will be triggered.\n // FIXME\n // 试验效果\n removeOnClick: true,\n z: 10000\n },\n\n /**\n * @readOnly\n * @type {Array.}\n */\n areas: [],\n\n /**\n * Current activated brush type.\n * If null, brush is inactived.\n * see module:echarts/component/helper/BrushController\n * @readOnly\n * @type {string}\n */\n brushType: null,\n\n /**\n * Current brush opt.\n * see module:echarts/component/helper/BrushController\n * @readOnly\n * @type {Object}\n */\n brushOption: {},\n\n /**\n * @readOnly\n * @type {Array.}\n */\n coordInfoList: [],\n optionUpdated: function (newOption, isInit) {\n var thisOption = this.option;\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, ['inBrush', 'outOfBrush']);\n var inBrush = thisOption.inBrush = thisOption.inBrush || {}; // Always give default visual, consider setOption at the second time.\n\n thisOption.outOfBrush = thisOption.outOfBrush || {\n color: DEFAULT_OUT_OF_BRUSH_COLOR\n };\n\n if (!inBrush.hasOwnProperty('liftZ')) {\n // Bigger than the highlight z lift, otherwise it will\n // be effected by the highlight z when brush.\n inBrush.liftZ = 5;\n }\n },\n\n /**\n * If ranges is null/undefined, range state remain.\n *\n * @param {Array.} [ranges]\n */\n setAreas: function (areas) {\n // If ranges is null/undefined, range state remain.\n // This helps user to dispatchAction({type: 'brush'}) with no areas\n // set but just want to get the current brush select info from a `brush` event.\n if (!areas) {\n return;\n }\n\n this.areas = zrUtil.map(areas, function (area) {\n return generateBrushOption(this.option, area);\n }, this);\n },\n\n /**\n * see module:echarts/component/helper/BrushController\n * @param {Object} brushOption\n */\n setBrushOption: function (brushOption) {\n this.brushOption = generateBrushOption(this.option, brushOption);\n this.brushType = this.brushOption.brushType;\n }\n});\n\nfunction generateBrushOption(option, brushOption) {\n return zrUtil.merge({\n brushType: option.brushType,\n brushMode: option.brushMode,\n transformable: option.transformable,\n brushStyle: new Model(option.brushStyle).getItemStyle(),\n removeOnClick: option.removeOnClick,\n z: option.z\n }, brushOption, true);\n}\n\nvar _default = BrushModel;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar _cursorHelper = require(\"./cursorHelper\");\n\nvar onIrrelevantElement = _cursorHelper.onIrrelevantElement;\n\nvar graphicUtil = require(\"../../util/graphic\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction makeRectPanelClipPath(rect) {\n rect = normalizeRect(rect);\n return function (localPoints, transform) {\n return graphicUtil.clipPointsByRect(localPoints, rect);\n };\n}\n\nfunction makeLinearBrushOtherExtent(rect, specifiedXYIndex) {\n rect = normalizeRect(rect);\n return function (xyIndex) {\n var idx = specifiedXYIndex != null ? specifiedXYIndex : xyIndex;\n var brushWidth = idx ? rect.width : rect.height;\n var base = idx ? rect.x : rect.y;\n return [base, base + (brushWidth || 0)];\n };\n}\n\nfunction makeRectIsTargetByCursor(rect, api, targetModel) {\n rect = normalizeRect(rect);\n return function (e, localCursorPoint, transform) {\n return rect.contain(localCursorPoint[0], localCursorPoint[1]) && !onIrrelevantElement(e, api, targetModel);\n };\n} // Consider width/height is negative.\n\n\nfunction normalizeRect(rect) {\n return BoundingRect.create(rect);\n}\n\nexports.makeRectPanelClipPath = makeRectPanelClipPath;\nexports.makeLinearBrushOtherExtent = makeLinearBrushOtherExtent;\nexports.makeRectIsTargetByCursor = makeRectIsTargetByCursor;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar graphic = require(\"../../util/graphic\");\n\nvar layout = require(\"../../util/layout\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar _treeHelper = require(\"../helper/treeHelper\");\n\nvar wrapTreePathInfo = _treeHelper.wrapTreePathInfo;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar TEXT_PADDING = 8;\nvar ITEM_GAP = 8;\nvar ARRAY_LENGTH = 5;\n\nfunction Breadcrumb(containerGroup) {\n /**\n * @private\n * @type {module:zrender/container/Group}\n */\n this.group = new graphic.Group();\n containerGroup.add(this.group);\n}\n\nBreadcrumb.prototype = {\n constructor: Breadcrumb,\n render: function (seriesModel, api, targetNode, onSelect) {\n var model = seriesModel.getModel('breadcrumb');\n var thisGroup = this.group;\n thisGroup.removeAll();\n\n if (!model.get('show') || !targetNode) {\n return;\n }\n\n var normalStyleModel = model.getModel('itemStyle'); // var emphasisStyleModel = model.getModel('emphasis.itemStyle');\n\n var textStyleModel = normalStyleModel.getModel('textStyle');\n var layoutParam = {\n pos: {\n left: model.get('left'),\n right: model.get('right'),\n top: model.get('top'),\n bottom: model.get('bottom')\n },\n box: {\n width: api.getWidth(),\n height: api.getHeight()\n },\n emptyItemWidth: model.get('emptyItemWidth'),\n totalWidth: 0,\n renderList: []\n };\n\n this._prepare(targetNode, layoutParam, textStyleModel);\n\n this._renderContent(seriesModel, layoutParam, normalStyleModel, textStyleModel, onSelect);\n\n layout.positionElement(thisGroup, layoutParam.pos, layoutParam.box);\n },\n\n /**\n * Prepare render list and total width\n * @private\n */\n _prepare: function (targetNode, layoutParam, textStyleModel) {\n for (var node = targetNode; node; node = node.parentNode) {\n var text = node.getModel().get('name');\n var textRect = textStyleModel.getTextRect(text);\n var itemWidth = Math.max(textRect.width + TEXT_PADDING * 2, layoutParam.emptyItemWidth);\n layoutParam.totalWidth += itemWidth + ITEM_GAP;\n layoutParam.renderList.push({\n node: node,\n text: text,\n width: itemWidth\n });\n }\n },\n\n /**\n * @private\n */\n _renderContent: function (seriesModel, layoutParam, normalStyleModel, textStyleModel, onSelect) {\n // Start rendering.\n var lastX = 0;\n var emptyItemWidth = layoutParam.emptyItemWidth;\n var height = seriesModel.get('breadcrumb.height');\n var availableSize = layout.getAvailableSize(layoutParam.pos, layoutParam.box);\n var totalWidth = layoutParam.totalWidth;\n var renderList = layoutParam.renderList;\n\n for (var i = renderList.length - 1; i >= 0; i--) {\n var item = renderList[i];\n var itemNode = item.node;\n var itemWidth = item.width;\n var text = item.text; // Hdie text and shorten width if necessary.\n\n if (totalWidth > availableSize.width) {\n totalWidth -= itemWidth - emptyItemWidth;\n itemWidth = emptyItemWidth;\n text = null;\n }\n\n var el = new graphic.Polygon({\n shape: {\n points: makeItemPoints(lastX, 0, itemWidth, height, i === renderList.length - 1, i === 0)\n },\n style: zrUtil.defaults(normalStyleModel.getItemStyle(), {\n lineJoin: 'bevel',\n text: text,\n textFill: textStyleModel.getTextColor(),\n textFont: textStyleModel.getFont()\n }),\n z: 10,\n onclick: zrUtil.curry(onSelect, itemNode)\n });\n this.group.add(el);\n packEventData(el, seriesModel, itemNode);\n lastX += itemWidth + ITEM_GAP;\n }\n },\n\n /**\n * @override\n */\n remove: function () {\n this.group.removeAll();\n }\n};\n\nfunction makeItemPoints(x, y, itemWidth, itemHeight, head, tail) {\n var points = [[head ? x : x - ARRAY_LENGTH, y], [x + itemWidth, y], [x + itemWidth, y + itemHeight], [head ? x : x - ARRAY_LENGTH, y + itemHeight]];\n !tail && points.splice(2, 0, [x + itemWidth + ARRAY_LENGTH, y + itemHeight / 2]);\n !head && points.push([x, y + itemHeight / 2]);\n return points;\n} // Package custom mouse event.\n\n\nfunction packEventData(el, seriesModel, itemNode) {\n el.eventData = {\n componentType: 'series',\n componentSubType: 'treemap',\n componentIndex: seriesModel.componentIndex,\n seriesIndex: seriesModel.componentIndex,\n seriesName: seriesModel.name,\n seriesType: 'treemap',\n selfType: 'breadcrumb',\n // Distinguish with click event on treemap node.\n nodeData: {\n dataIndex: itemNode && itemNode.dataIndex,\n name: itemNode && itemNode.name\n },\n treePathInfo: itemNode && wrapTreePathInfo(itemNode, seriesModel)\n };\n}\n\nvar _default = Breadcrumb;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// FIXME 公用?\n\n/**\n * @param {Array.} datas\n * @param {string} statisticType 'average' 'sum'\n * @inner\n */\nfunction dataStatistics(datas, statisticType) {\n var dataNameMap = {};\n zrUtil.each(datas, function (data) {\n data.each(data.mapDimension('value'), function (value, idx) {\n // Add prefix to avoid conflict with Object.prototype.\n var mapKey = 'ec-' + data.getName(idx);\n dataNameMap[mapKey] = dataNameMap[mapKey] || [];\n\n if (!isNaN(value)) {\n dataNameMap[mapKey].push(value);\n }\n });\n });\n return datas[0].map(datas[0].mapDimension('value'), function (value, idx) {\n var mapKey = 'ec-' + datas[0].getName(idx);\n var sum = 0;\n var min = Infinity;\n var max = -Infinity;\n var len = dataNameMap[mapKey].length;\n\n for (var i = 0; i < len; i++) {\n min = Math.min(min, dataNameMap[mapKey][i]);\n max = Math.max(max, dataNameMap[mapKey][i]);\n sum += dataNameMap[mapKey][i];\n }\n\n var result;\n\n if (statisticType === 'min') {\n result = min;\n } else if (statisticType === 'max') {\n result = max;\n } else if (statisticType === 'average') {\n result = sum / len;\n } else {\n result = sum;\n }\n\n return len === 0 ? NaN : result;\n });\n}\n\nfunction _default(ecModel) {\n var seriesGroups = {};\n ecModel.eachSeriesByType('map', function (seriesModel) {\n var hostGeoModel = seriesModel.getHostGeoModel();\n var key = hostGeoModel ? 'o' + hostGeoModel.id : 'i' + seriesModel.getMapType();\n (seriesGroups[key] = seriesGroups[key] || []).push(seriesModel);\n });\n zrUtil.each(seriesGroups, function (seriesList, key) {\n var data = dataStatistics(zrUtil.map(seriesList, function (seriesModel) {\n return seriesModel.getData();\n }), seriesList[0].get('mapValueCalculation'));\n\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].originalData = seriesList[i].getData();\n } // FIXME Put where?\n\n\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].seriesGroup = seriesList;\n seriesList[i].needsDrawMap = i === 0 && !seriesList[i].getHostGeoModel();\n seriesList[i].setData(data.cloneShallow());\n seriesList[i].mainSeries = seriesList[0];\n }\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar createListSimply = require(\"../helper/createListSimply\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar modelUtil = require(\"../../util/model\");\n\nvar _number = require(\"../../util/number\");\n\nvar getPercentWithPrecision = _number.getPercentWithPrecision;\n\nvar dataSelectableMixin = require(\"../../component/helper/selectableMixin\");\n\nvar _dataProvider = require(\"../../data/helper/dataProvider\");\n\nvar retrieveRawAttr = _dataProvider.retrieveRawAttr;\n\nvar _sourceHelper = require(\"../../data/helper/sourceHelper\");\n\nvar makeSeriesEncodeForNameBased = _sourceHelper.makeSeriesEncodeForNameBased;\n\nvar LegendVisualProvider = require(\"../../visual/LegendVisualProvider\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PieSeries = echarts.extendSeriesModel({\n type: 'series.pie',\n // Overwrite\n init: function (option) {\n PieSeries.superApply(this, 'init', arguments); // Enable legend selection for each data item\n // Use a function instead of direct access because data reference may changed\n\n this.legendVisualProvider = new LegendVisualProvider(zrUtil.bind(this.getData, this), zrUtil.bind(this.getRawData, this));\n this.updateSelectedMap(this._createSelectableList());\n\n this._defaultLabelLine(option);\n },\n // Overwrite\n mergeOption: function (newOption) {\n PieSeries.superCall(this, 'mergeOption', newOption);\n this.updateSelectedMap(this._createSelectableList());\n },\n getInitialData: function (option, ecModel) {\n return createListSimply(this, {\n coordDimensions: ['value'],\n encodeDefaulter: zrUtil.curry(makeSeriesEncodeForNameBased, this)\n });\n },\n _createSelectableList: function () {\n var data = this.getRawData();\n var valueDim = data.mapDimension('value');\n var targetList = [];\n\n for (var i = 0, len = data.count(); i < len; i++) {\n targetList.push({\n name: data.getName(i),\n value: data.get(valueDim, i),\n selected: retrieveRawAttr(data, i, 'selected')\n });\n }\n\n return targetList;\n },\n // Overwrite\n getDataParams: function (dataIndex) {\n var data = this.getData();\n var params = PieSeries.superCall(this, 'getDataParams', dataIndex); // FIXME toFixed?\n\n var valueList = [];\n data.each(data.mapDimension('value'), function (value) {\n valueList.push(value);\n });\n params.percent = getPercentWithPrecision(valueList, dataIndex, data.hostModel.get('percentPrecision'));\n params.$vars.push('percent');\n return params;\n },\n _defaultLabelLine: function (option) {\n // Extend labelLine emphasis\n modelUtil.defaultEmphasis(option, 'labelLine', ['show']);\n var labelLineNormalOpt = option.labelLine;\n var labelLineEmphasisOpt = option.emphasis.labelLine; // Not show label line if `label.normal.show = false`\n\n labelLineNormalOpt.show = labelLineNormalOpt.show && option.label.show;\n labelLineEmphasisOpt.show = labelLineEmphasisOpt.show && option.emphasis.label.show;\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n legendHoverLink: true,\n hoverAnimation: true,\n // 默认全局居中\n center: ['50%', '50%'],\n radius: [0, '75%'],\n // 默认顺时针\n clockwise: true,\n startAngle: 90,\n // 最小角度改为0\n minAngle: 0,\n // If the angle of a sector less than `minShowLabelAngle`,\n // the label will not be displayed.\n minShowLabelAngle: 0,\n // 选中时扇区偏移量\n selectedOffset: 10,\n // 高亮扇区偏移量\n hoverOffset: 10,\n // If use strategy to avoid label overlapping\n avoidLabelOverlap: true,\n // 选择模式,默认关闭,可选single,multiple\n // selectedMode: false,\n // 南丁格尔玫瑰图模式,'radius'(半径) | 'area'(面积)\n // roseType: null,\n percentPrecision: 2,\n // If still show when all data zero.\n stillShowZeroSum: true,\n // cursor: null,\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n width: null,\n height: null,\n label: {\n // If rotate around circle\n rotate: false,\n show: true,\n // 'outer', 'inside', 'center'\n position: 'outer',\n // 'none', 'labelLine', 'edge'. Works only when position is 'outer'\n alignTo: 'none',\n // Closest distance between label and chart edge.\n // Works only position is 'outer' and alignTo is 'edge'.\n margin: '25%',\n // Works only position is 'outer' and alignTo is not 'edge'.\n bleedMargin: 10,\n // Distance between text and label line.\n distanceToLabelLine: 5 // formatter: 标签文本格式器,同Tooltip.formatter,不支持异步回调\n // 默认使用全局文本样式,详见TEXTSTYLE\n // distance: 当position为inner时有效,为label位置到圆心的距离与圆半径(环状图为内外半径和)的比例系数\n\n },\n // Enabled when label.normal.position is 'outer'\n labelLine: {\n show: true,\n // 引导线两段中的第一段长度\n length: 15,\n // 引导线两段中的第二段长度\n length2: 15,\n smooth: false,\n lineStyle: {\n // color: 各异,\n width: 1,\n type: 'solid'\n }\n },\n itemStyle: {\n borderWidth: 1\n },\n // Animation type. Valid values: expansion, scale\n animationType: 'expansion',\n // Animation type when update. Valid values: transition, expansion\n animationTypeUpdate: 'transition',\n animationEasing: 'cubicOut'\n }\n});\nzrUtil.mixin(PieSeries, dataSelectableMixin);\nvar _default = PieSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../echarts\");\n\nrequire(\"./boxplot/BoxplotSeries\");\n\nrequire(\"./boxplot/BoxplotView\");\n\nvar boxplotVisual = require(\"./boxplot/boxplotVisual\");\n\nvar boxplotLayout = require(\"./boxplot/boxplotLayout\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\necharts.registerVisual(boxplotVisual);\necharts.registerLayout(boxplotLayout);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Eventful = require(\"zrender/lib/mixin/Eventful\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar interactionMutex = require(\"./interactionMutex\");\n\nvar DataDiffer = require(\"../../data/DataDiffer\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar map = zrUtil.map;\nvar mathMin = Math.min;\nvar mathMax = Math.max;\nvar mathPow = Math.pow;\nvar COVER_Z = 10000;\nvar UNSELECT_THRESHOLD = 6;\nvar MIN_RESIZE_LINE_WIDTH = 6;\nvar MUTEX_RESOURCE_KEY = 'globalPan';\nvar DIRECTION_MAP = {\n w: [0, 0],\n e: [0, 1],\n n: [1, 0],\n s: [1, 1]\n};\nvar CURSOR_MAP = {\n w: 'ew',\n e: 'ew',\n n: 'ns',\n s: 'ns',\n ne: 'nesw',\n sw: 'nesw',\n nw: 'nwse',\n se: 'nwse'\n};\nvar DEFAULT_BRUSH_OPT = {\n brushStyle: {\n lineWidth: 2,\n stroke: 'rgba(0,0,0,0.3)',\n fill: 'rgba(0,0,0,0.1)'\n },\n transformable: true,\n brushMode: 'single',\n removeOnClick: false\n};\nvar baseUID = 0;\n/**\n * @alias module:echarts/component/helper/BrushController\n * @constructor\n * @mixin {module:zrender/mixin/Eventful}\n * @event module:echarts/component/helper/BrushController#brush\n * params:\n * areas: Array., coord relates to container group,\n * If no container specified, to global.\n * opt {\n * isEnd: boolean,\n * removeOnClick: boolean\n * }\n *\n * @param {module:zrender/zrender~ZRender} zr\n */\n\nfunction BrushController(zr) {\n Eventful.call(this);\n /**\n * @type {module:zrender/zrender~ZRender}\n * @private\n */\n\n this._zr = zr;\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n\n this.group = new graphic.Group();\n /**\n * Only for drawing (after enabledBrush).\n * 'line', 'rect', 'polygon' or false\n * If passing false/null/undefined, disable brush.\n * If passing 'auto', determined by panel.defaultBrushType\n * @private\n * @type {string}\n */\n\n this._brushType;\n /**\n * Only for drawing (after enabledBrush).\n *\n * @private\n * @type {Object}\n */\n\n this._brushOption;\n /**\n * @private\n * @type {Object}\n */\n\n this._panels;\n /**\n * @private\n * @type {Array.}\n */\n\n this._track = [];\n /**\n * @private\n * @type {boolean}\n */\n\n this._dragging;\n /**\n * @private\n * @type {Array}\n */\n\n this._covers = [];\n /**\n * @private\n * @type {moudule:zrender/container/Group}\n */\n\n this._creatingCover;\n /**\n * `true` means global panel\n * @private\n * @type {module:zrender/container/Group|boolean}\n */\n\n this._creatingPanel;\n /**\n * @private\n * @type {boolean}\n */\n\n this._enableGlobalPan;\n /**\n * @private\n * @type {boolean}\n */\n\n /**\n * @private\n * @type {string}\n */\n this._uid = 'brushController_' + baseUID++;\n /**\n * @private\n * @type {Object}\n */\n\n this._handlers = {};\n each(pointerHandlers, function (handler, eventName) {\n this._handlers[eventName] = zrUtil.bind(handler, this);\n }, this);\n}\n\nBrushController.prototype = {\n constructor: BrushController,\n\n /**\n * If set to null/undefined/false, select disabled.\n * @param {Object} brushOption\n * @param {string|boolean} brushOption.brushType 'line', 'rect', 'polygon' or false\n * If passing false/null/undefined, disable brush.\n * If passing 'auto', determined by panel.defaultBrushType.\n * ('auto' can not be used in global panel)\n * @param {number} [brushOption.brushMode='single'] 'single' or 'multiple'\n * @param {boolean} [brushOption.transformable=true]\n * @param {boolean} [brushOption.removeOnClick=false]\n * @param {Object} [brushOption.brushStyle]\n * @param {number} [brushOption.brushStyle.width]\n * @param {number} [brushOption.brushStyle.lineWidth]\n * @param {string} [brushOption.brushStyle.stroke]\n * @param {string} [brushOption.brushStyle.fill]\n * @param {number} [brushOption.z]\n */\n enableBrush: function (brushOption) {\n this._brushType && doDisableBrush(this);\n brushOption.brushType && doEnableBrush(this, brushOption);\n return this;\n },\n\n /**\n * @param {Array.} panelOpts If not pass, it is global brush.\n * Each items: {\n * panelId, // mandatory.\n * clipPath, // mandatory. function.\n * isTargetByCursor, // mandatory. function.\n * defaultBrushType, // optional, only used when brushType is 'auto'.\n * getLinearBrushOtherExtent, // optional. function.\n * }\n */\n setPanels: function (panelOpts) {\n if (panelOpts && panelOpts.length) {\n var panels = this._panels = {};\n zrUtil.each(panelOpts, function (panelOpts) {\n panels[panelOpts.panelId] = zrUtil.clone(panelOpts);\n });\n } else {\n this._panels = null;\n }\n\n return this;\n },\n\n /**\n * @param {Object} [opt]\n * @return {boolean} [opt.enableGlobalPan=false]\n */\n mount: function (opt) {\n opt = opt || {};\n this._enableGlobalPan = opt.enableGlobalPan;\n var thisGroup = this.group;\n\n this._zr.add(thisGroup);\n\n thisGroup.attr({\n position: opt.position || [0, 0],\n rotation: opt.rotation || 0,\n scale: opt.scale || [1, 1]\n });\n this._transform = thisGroup.getLocalTransform();\n return this;\n },\n eachCover: function (cb, context) {\n each(this._covers, cb, context);\n },\n\n /**\n * Update covers.\n * @param {Array.} brushOptionList Like:\n * [\n * {id: 'xx', brushType: 'line', range: [23, 44], brushStyle, transformable},\n * {id: 'yy', brushType: 'rect', range: [[23, 44], [23, 54]]},\n * ...\n * ]\n * `brushType` is required in each cover info. (can not be 'auto')\n * `id` is not mandatory.\n * `brushStyle`, `transformable` is not mandatory, use DEFAULT_BRUSH_OPT by default.\n * If brushOptionList is null/undefined, all covers removed.\n */\n updateCovers: function (brushOptionList) {\n brushOptionList = zrUtil.map(brushOptionList, function (brushOption) {\n return zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true);\n });\n var tmpIdPrefix = '\\0-brush-index-';\n var oldCovers = this._covers;\n var newCovers = this._covers = [];\n var controller = this;\n var creatingCover = this._creatingCover;\n new DataDiffer(oldCovers, brushOptionList, oldGetKey, getKey).add(addOrUpdate).update(addOrUpdate).remove(remove).execute();\n return this;\n\n function getKey(brushOption, index) {\n return (brushOption.id != null ? brushOption.id : tmpIdPrefix + index) + '-' + brushOption.brushType;\n }\n\n function oldGetKey(cover, index) {\n return getKey(cover.__brushOption, index);\n }\n\n function addOrUpdate(newIndex, oldIndex) {\n var newBrushOption = brushOptionList[newIndex]; // Consider setOption in event listener of brushSelect,\n // where updating cover when creating should be forbiden.\n\n if (oldIndex != null && oldCovers[oldIndex] === creatingCover) {\n newCovers[newIndex] = oldCovers[oldIndex];\n } else {\n var cover = newCovers[newIndex] = oldIndex != null ? (oldCovers[oldIndex].__brushOption = newBrushOption, oldCovers[oldIndex]) : endCreating(controller, createCover(controller, newBrushOption));\n updateCoverAfterCreation(controller, cover);\n }\n }\n\n function remove(oldIndex) {\n if (oldCovers[oldIndex] !== creatingCover) {\n controller.group.remove(oldCovers[oldIndex]);\n }\n }\n },\n unmount: function () {\n this.enableBrush(false); // container may 'removeAll' outside.\n\n clearCovers(this);\n\n this._zr.remove(this.group);\n\n return this;\n },\n dispose: function () {\n this.unmount();\n this.off();\n }\n};\nzrUtil.mixin(BrushController, Eventful);\n\nfunction doEnableBrush(controller, brushOption) {\n var zr = controller._zr; // Consider roam, which takes globalPan too.\n\n if (!controller._enableGlobalPan) {\n interactionMutex.take(zr, MUTEX_RESOURCE_KEY, controller._uid);\n }\n\n mountHandlers(zr, controller._handlers);\n controller._brushType = brushOption.brushType;\n controller._brushOption = zrUtil.merge(zrUtil.clone(DEFAULT_BRUSH_OPT), brushOption, true);\n}\n\nfunction doDisableBrush(controller) {\n var zr = controller._zr;\n interactionMutex.release(zr, MUTEX_RESOURCE_KEY, controller._uid);\n unmountHandlers(zr, controller._handlers);\n controller._brushType = controller._brushOption = null;\n}\n\nfunction mountHandlers(zr, handlers) {\n each(handlers, function (handler, eventName) {\n zr.on(eventName, handler);\n });\n}\n\nfunction unmountHandlers(zr, handlers) {\n each(handlers, function (handler, eventName) {\n zr.off(eventName, handler);\n });\n}\n\nfunction createCover(controller, brushOption) {\n var cover = coverRenderers[brushOption.brushType].createCover(controller, brushOption);\n cover.__brushOption = brushOption;\n updateZ(cover, brushOption);\n controller.group.add(cover);\n return cover;\n}\n\nfunction endCreating(controller, creatingCover) {\n var coverRenderer = getCoverRenderer(creatingCover);\n\n if (coverRenderer.endCreating) {\n coverRenderer.endCreating(controller, creatingCover);\n updateZ(creatingCover, creatingCover.__brushOption);\n }\n\n return creatingCover;\n}\n\nfunction updateCoverShape(controller, cover) {\n var brushOption = cover.__brushOption;\n getCoverRenderer(cover).updateCoverShape(controller, cover, brushOption.range, brushOption);\n}\n\nfunction updateZ(cover, brushOption) {\n var z = brushOption.z;\n z == null && (z = COVER_Z);\n cover.traverse(function (el) {\n el.z = z;\n el.z2 = z; // Consider in given container.\n });\n}\n\nfunction updateCoverAfterCreation(controller, cover) {\n getCoverRenderer(cover).updateCommon(controller, cover);\n updateCoverShape(controller, cover);\n}\n\nfunction getCoverRenderer(cover) {\n return coverRenderers[cover.__brushOption.brushType];\n} // return target panel or `true` (means global panel)\n\n\nfunction getPanelByPoint(controller, e, localCursorPoint) {\n var panels = controller._panels;\n\n if (!panels) {\n return true; // Global panel\n }\n\n var panel;\n var transform = controller._transform;\n each(panels, function (pn) {\n pn.isTargetByCursor(e, localCursorPoint, transform) && (panel = pn);\n });\n return panel;\n} // Return a panel or true\n\n\nfunction getPanelByCover(controller, cover) {\n var panels = controller._panels;\n\n if (!panels) {\n return true; // Global panel\n }\n\n var panelId = cover.__brushOption.panelId; // User may give cover without coord sys info,\n // which is then treated as global panel.\n\n return panelId != null ? panels[panelId] : true;\n}\n\nfunction clearCovers(controller) {\n var covers = controller._covers;\n var originalLength = covers.length;\n each(covers, function (cover) {\n controller.group.remove(cover);\n }, controller);\n covers.length = 0;\n return !!originalLength;\n}\n\nfunction trigger(controller, opt) {\n var areas = map(controller._covers, function (cover) {\n var brushOption = cover.__brushOption;\n var range = zrUtil.clone(brushOption.range);\n return {\n brushType: brushOption.brushType,\n panelId: brushOption.panelId,\n range: range\n };\n });\n controller.trigger('brush', areas, {\n isEnd: !!opt.isEnd,\n removeOnClick: !!opt.removeOnClick\n });\n}\n\nfunction shouldShowCover(controller) {\n var track = controller._track;\n\n if (!track.length) {\n return false;\n }\n\n var p2 = track[track.length - 1];\n var p1 = track[0];\n var dx = p2[0] - p1[0];\n var dy = p2[1] - p1[1];\n var dist = mathPow(dx * dx + dy * dy, 0.5);\n return dist > UNSELECT_THRESHOLD;\n}\n\nfunction getTrackEnds(track) {\n var tail = track.length - 1;\n tail < 0 && (tail = 0);\n return [track[0], track[tail]];\n}\n\nfunction createBaseRectCover(doDrift, controller, brushOption, edgeNames) {\n var cover = new graphic.Group();\n cover.add(new graphic.Rect({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true,\n draggable: true,\n cursor: 'move',\n drift: curry(doDrift, controller, cover, 'nswe'),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n each(edgeNames, function (name) {\n cover.add(new graphic.Rect({\n name: name,\n style: {\n opacity: 0\n },\n draggable: true,\n silent: true,\n invisible: true,\n drift: curry(doDrift, controller, cover, name),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n });\n return cover;\n}\n\nfunction updateBaseRect(controller, cover, localRange, brushOption) {\n var lineWidth = brushOption.brushStyle.lineWidth || 0;\n var handleSize = mathMax(lineWidth, MIN_RESIZE_LINE_WIDTH);\n var x = localRange[0][0];\n var y = localRange[1][0];\n var xa = x - lineWidth / 2;\n var ya = y - lineWidth / 2;\n var x2 = localRange[0][1];\n var y2 = localRange[1][1];\n var x2a = x2 - handleSize + lineWidth / 2;\n var y2a = y2 - handleSize + lineWidth / 2;\n var width = x2 - x;\n var height = y2 - y;\n var widtha = width + lineWidth;\n var heighta = height + lineWidth;\n updateRectShape(controller, cover, 'main', x, y, width, height);\n\n if (brushOption.transformable) {\n updateRectShape(controller, cover, 'w', xa, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'e', x2a, ya, handleSize, heighta);\n updateRectShape(controller, cover, 'n', xa, ya, widtha, handleSize);\n updateRectShape(controller, cover, 's', xa, y2a, widtha, handleSize);\n updateRectShape(controller, cover, 'nw', xa, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'ne', x2a, ya, handleSize, handleSize);\n updateRectShape(controller, cover, 'sw', xa, y2a, handleSize, handleSize);\n updateRectShape(controller, cover, 'se', x2a, y2a, handleSize, handleSize);\n }\n}\n\nfunction updateCommon(controller, cover) {\n var brushOption = cover.__brushOption;\n var transformable = brushOption.transformable;\n var mainEl = cover.childAt(0);\n mainEl.useStyle(makeStyle(brushOption));\n mainEl.attr({\n silent: !transformable,\n cursor: transformable ? 'move' : 'default'\n });\n each(['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw'], function (name) {\n var el = cover.childOfName(name);\n var globalDir = getGlobalDirection(controller, name);\n el && el.attr({\n silent: !transformable,\n invisible: !transformable,\n cursor: transformable ? CURSOR_MAP[globalDir] + '-resize' : null\n });\n });\n}\n\nfunction updateRectShape(controller, cover, name, x, y, w, h) {\n var el = cover.childOfName(name);\n el && el.setShape(pointsToRect(clipByPanel(controller, cover, [[x, y], [x + w, y + h]])));\n}\n\nfunction makeStyle(brushOption) {\n return zrUtil.defaults({\n strokeNoScale: true\n }, brushOption.brushStyle);\n}\n\nfunction formatRectRange(x, y, x2, y2) {\n var min = [mathMin(x, x2), mathMin(y, y2)];\n var max = [mathMax(x, x2), mathMax(y, y2)];\n return [[min[0], max[0]], // x range\n [min[1], max[1]] // y range\n ];\n}\n\nfunction getTransform(controller) {\n return graphic.getTransform(controller.group);\n}\n\nfunction getGlobalDirection(controller, localDirection) {\n if (localDirection.length > 1) {\n localDirection = localDirection.split('');\n var globalDir = [getGlobalDirection(controller, localDirection[0]), getGlobalDirection(controller, localDirection[1])];\n (globalDir[0] === 'e' || globalDir[0] === 'w') && globalDir.reverse();\n return globalDir.join('');\n } else {\n var map = {\n w: 'left',\n e: 'right',\n n: 'top',\n s: 'bottom'\n };\n var inverseMap = {\n left: 'w',\n right: 'e',\n top: 'n',\n bottom: 's'\n };\n var globalDir = graphic.transformDirection(map[localDirection], getTransform(controller));\n return inverseMap[globalDir];\n }\n}\n\nfunction driftRect(toRectRange, fromRectRange, controller, cover, name, dx, dy, e) {\n var brushOption = cover.__brushOption;\n var rectRange = toRectRange(brushOption.range);\n var localDelta = toLocalDelta(controller, dx, dy);\n each(name.split(''), function (namePart) {\n var ind = DIRECTION_MAP[namePart];\n rectRange[ind[0]][ind[1]] += localDelta[ind[0]];\n });\n brushOption.range = fromRectRange(formatRectRange(rectRange[0][0], rectRange[1][0], rectRange[0][1], rectRange[1][1]));\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\n\nfunction driftPolygon(controller, cover, dx, dy, e) {\n var range = cover.__brushOption.range;\n var localDelta = toLocalDelta(controller, dx, dy);\n each(range, function (point) {\n point[0] += localDelta[0];\n point[1] += localDelta[1];\n });\n updateCoverAfterCreation(controller, cover);\n trigger(controller, {\n isEnd: false\n });\n}\n\nfunction toLocalDelta(controller, dx, dy) {\n var thisGroup = controller.group;\n var localD = thisGroup.transformCoordToLocal(dx, dy);\n var localZero = thisGroup.transformCoordToLocal(0, 0);\n return [localD[0] - localZero[0], localD[1] - localZero[1]];\n}\n\nfunction clipByPanel(controller, cover, data) {\n var panel = getPanelByCover(controller, cover);\n return panel && panel !== true ? panel.clipPath(data, controller._transform) : zrUtil.clone(data);\n}\n\nfunction pointsToRect(points) {\n var xmin = mathMin(points[0][0], points[1][0]);\n var ymin = mathMin(points[0][1], points[1][1]);\n var xmax = mathMax(points[0][0], points[1][0]);\n var ymax = mathMax(points[0][1], points[1][1]);\n return {\n x: xmin,\n y: ymin,\n width: xmax - xmin,\n height: ymax - ymin\n };\n}\n\nfunction resetCursor(controller, e, localCursorPoint) {\n if ( // Check active\n !controller._brushType // resetCursor should be always called when mouse is in zr area,\n // but not called when mouse is out of zr area to avoid bad influence\n // if `mousemove`, `mouseup` are triggered from `document` event.\n || isOutsideZrArea(controller, e)) {\n return;\n }\n\n var zr = controller._zr;\n var covers = controller._covers;\n var currPanel = getPanelByPoint(controller, e, localCursorPoint); // Check whether in covers.\n\n if (!controller._dragging) {\n for (var i = 0; i < covers.length; i++) {\n var brushOption = covers[i].__brushOption;\n\n if (currPanel && (currPanel === true || brushOption.panelId === currPanel.panelId) && coverRenderers[brushOption.brushType].contain(covers[i], localCursorPoint[0], localCursorPoint[1])) {\n // Use cursor style set on cover.\n return;\n }\n }\n }\n\n currPanel && zr.setCursorStyle('crosshair');\n}\n\nfunction preventDefault(e) {\n var rawE = e.event;\n rawE.preventDefault && rawE.preventDefault();\n}\n\nfunction mainShapeContain(cover, x, y) {\n return cover.childOfName('main').contain(x, y);\n}\n\nfunction updateCoverByMouse(controller, e, localCursorPoint, isEnd) {\n var creatingCover = controller._creatingCover;\n var panel = controller._creatingPanel;\n var thisBrushOption = controller._brushOption;\n var eventParams;\n\n controller._track.push(localCursorPoint.slice());\n\n if (shouldShowCover(controller) || creatingCover) {\n if (panel && !creatingCover) {\n thisBrushOption.brushMode === 'single' && clearCovers(controller);\n var brushOption = zrUtil.clone(thisBrushOption);\n brushOption.brushType = determineBrushType(brushOption.brushType, panel);\n brushOption.panelId = panel === true ? null : panel.panelId;\n creatingCover = controller._creatingCover = createCover(controller, brushOption);\n\n controller._covers.push(creatingCover);\n }\n\n if (creatingCover) {\n var coverRenderer = coverRenderers[determineBrushType(controller._brushType, panel)];\n var coverBrushOption = creatingCover.__brushOption;\n coverBrushOption.range = coverRenderer.getCreatingRange(clipByPanel(controller, creatingCover, controller._track));\n\n if (isEnd) {\n endCreating(controller, creatingCover);\n coverRenderer.updateCommon(controller, creatingCover);\n }\n\n updateCoverShape(controller, creatingCover);\n eventParams = {\n isEnd: isEnd\n };\n }\n } else if (isEnd && thisBrushOption.brushMode === 'single' && thisBrushOption.removeOnClick) {\n // Help user to remove covers easily, only by a tiny drag, in 'single' mode.\n // But a single click do not clear covers, because user may have casual\n // clicks (for example, click on other component and do not expect covers\n // disappear).\n // Only some cover removed, trigger action, but not every click trigger action.\n if (getPanelByPoint(controller, e, localCursorPoint) && clearCovers(controller)) {\n eventParams = {\n isEnd: isEnd,\n removeOnClick: true\n };\n }\n }\n\n return eventParams;\n}\n\nfunction determineBrushType(brushType, panel) {\n if (brushType === 'auto') {\n return panel.defaultBrushType;\n }\n\n return brushType;\n}\n\nvar pointerHandlers = {\n mousedown: function (e) {\n if (this._dragging) {\n // In case some browser do not support globalOut,\n // and release mose out side the browser.\n handleDragEnd(this, e);\n } else if (!e.target || !e.target.draggable) {\n preventDefault(e);\n var localCursorPoint = this.group.transformCoordToLocal(e.offsetX, e.offsetY);\n this._creatingCover = null;\n var panel = this._creatingPanel = getPanelByPoint(this, e, localCursorPoint);\n\n if (panel) {\n this._dragging = true;\n this._track = [localCursorPoint.slice()];\n }\n }\n },\n mousemove: function (e) {\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = this.group.transformCoordToLocal(x, y);\n resetCursor(this, e, localCursorPoint);\n\n if (this._dragging) {\n preventDefault(e);\n var eventParams = updateCoverByMouse(this, e, localCursorPoint, false);\n eventParams && trigger(this, eventParams);\n }\n },\n mouseup: function (e) {\n handleDragEnd(this, e);\n }\n};\n\nfunction handleDragEnd(controller, e) {\n if (controller._dragging) {\n preventDefault(e);\n var x = e.offsetX;\n var y = e.offsetY;\n var localCursorPoint = controller.group.transformCoordToLocal(x, y);\n var eventParams = updateCoverByMouse(controller, e, localCursorPoint, true);\n controller._dragging = false;\n controller._track = [];\n controller._creatingCover = null; // trigger event shoule be at final, after procedure will be nested.\n\n eventParams && trigger(controller, eventParams);\n }\n}\n\nfunction isOutsideZrArea(controller, x, y) {\n var zr = controller._zr;\n return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight();\n}\n/**\n * key: brushType\n * @type {Object}\n */\n\n\nvar coverRenderers = {\n lineX: getLineRenderer(0),\n lineY: getLineRenderer(1),\n rect: {\n createCover: function (controller, brushOption) {\n return createBaseRectCover(curry(driftRect, function (range) {\n return range;\n }, function (range) {\n return range;\n }), controller, brushOption, ['w', 'e', 'n', 's', 'se', 'sw', 'ne', 'nw']);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n return formatRectRange(ends[1][0], ends[1][1], ends[0][0], ends[0][1]);\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n updateBaseRect(controller, cover, localRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n },\n polygon: {\n createCover: function (controller, brushOption) {\n var cover = new graphic.Group(); // Do not use graphic.Polygon because graphic.Polyline do not close the\n // border of the shape when drawing, which is a better experience for user.\n\n cover.add(new graphic.Polyline({\n name: 'main',\n style: makeStyle(brushOption),\n silent: true\n }));\n return cover;\n },\n getCreatingRange: function (localTrack) {\n return localTrack;\n },\n endCreating: function (controller, cover) {\n cover.remove(cover.childAt(0)); // Use graphic.Polygon close the shape.\n\n cover.add(new graphic.Polygon({\n name: 'main',\n draggable: true,\n drift: curry(driftPolygon, controller, cover),\n ondragend: curry(trigger, controller, {\n isEnd: true\n })\n }));\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n cover.childAt(0).setShape({\n points: clipByPanel(controller, cover, localRange)\n });\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n }\n};\n\nfunction getLineRenderer(xyIndex) {\n return {\n createCover: function (controller, brushOption) {\n return createBaseRectCover(curry(driftRect, function (range) {\n var rectRange = [range, [0, 100]];\n xyIndex && rectRange.reverse();\n return rectRange;\n }, function (rectRange) {\n return rectRange[xyIndex];\n }), controller, brushOption, [['w', 'e'], ['n', 's']][xyIndex]);\n },\n getCreatingRange: function (localTrack) {\n var ends = getTrackEnds(localTrack);\n var min = mathMin(ends[0][xyIndex], ends[1][xyIndex]);\n var max = mathMax(ends[0][xyIndex], ends[1][xyIndex]);\n return [min, max];\n },\n updateCoverShape: function (controller, cover, localRange, brushOption) {\n var otherExtent; // If brushWidth not specified, fit the panel.\n\n var panel = getPanelByCover(controller, cover);\n\n if (panel !== true && panel.getLinearBrushOtherExtent) {\n otherExtent = panel.getLinearBrushOtherExtent(xyIndex, controller._transform);\n } else {\n var zr = controller._zr;\n otherExtent = [0, [zr.getWidth(), zr.getHeight()][1 - xyIndex]];\n }\n\n var rectRange = [localRange, otherExtent];\n xyIndex && rectRange.reverse();\n updateBaseRect(controller, cover, rectRange, brushOption);\n },\n updateCommon: updateCommon,\n contain: mainShapeContain\n };\n}\n\nvar _default = BrushController;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar _whiskerBoxCommon = require(\"../helper/whiskerBoxCommon\");\n\nvar seriesModelMixin = _whiskerBoxCommon.seriesModelMixin;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar BoxplotSeries = SeriesModel.extend({\n type: 'series.boxplot',\n dependencies: ['xAxis', 'yAxis', 'grid'],\n // TODO\n // box width represents group size, so dimension should have 'size'.\n\n /**\n * @see \n * The meanings of 'min' and 'max' depend on user,\n * and echarts do not need to know it.\n * @readOnly\n */\n defaultValueDimensions: [{\n name: 'min',\n defaultTooltip: true\n }, {\n name: 'Q1',\n defaultTooltip: true\n }, {\n name: 'median',\n defaultTooltip: true\n }, {\n name: 'Q3',\n defaultTooltip: true\n }, {\n name: 'max',\n defaultTooltip: true\n }],\n\n /**\n * @type {Array.}\n * @readOnly\n */\n dimensions: null,\n\n /**\n * @override\n */\n defaultOption: {\n zlevel: 0,\n // 一级层叠\n z: 2,\n // 二级层叠\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n hoverAnimation: true,\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n layout: null,\n // 'horizontal' or 'vertical'\n boxWidth: [7, 50],\n // [min, max] can be percent of band width.\n itemStyle: {\n color: '#fff',\n borderWidth: 1\n },\n emphasis: {\n itemStyle: {\n borderWidth: 2,\n shadowBlur: 5,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n shadowColor: 'rgba(0,0,0,0.4)'\n }\n },\n animationEasing: 'elasticOut',\n animationDuration: 800\n }\n});\nzrUtil.mixin(BoxplotSeries, seriesModelMixin, true);\nvar _default = BoxplotSeries;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar featureManager = require(\"../featureManager\");\n\nvar lang = require(\"../../../lang\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar brushLang = lang.toolbox.brush;\n\nfunction Brush(model, ecModel, api) {\n this.model = model;\n this.ecModel = ecModel;\n this.api = api;\n /**\n * @private\n * @type {string}\n */\n\n this._brushType;\n /**\n * @private\n * @type {string}\n */\n\n this._brushMode;\n}\n\nBrush.defaultOption = {\n show: true,\n type: ['rect', 'polygon', 'lineX', 'lineY', 'keep', 'clear'],\n icon: {\n /* eslint-disable */\n rect: 'M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13',\n // jshint ignore:line\n polygon: 'M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2',\n // jshint ignore:line\n lineX: 'M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4',\n // jshint ignore:line\n lineY: 'M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4',\n // jshint ignore:line\n keep: 'M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z',\n // jshint ignore:line\n clear: 'M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2' // jshint ignore:line\n\n /* eslint-enable */\n\n },\n // `rect`, `polygon`, `lineX`, `lineY`, `keep`, `clear`\n title: zrUtil.clone(brushLang.title)\n};\nvar proto = Brush.prototype; // proto.updateLayout = function (featureModel, ecModel, api) {\n\n/* eslint-disable */\n\nproto.render =\n/* eslint-enable */\nproto.updateView = function (featureModel, ecModel, api) {\n var brushType;\n var brushMode;\n var isBrushed;\n ecModel.eachComponent({\n mainType: 'brush'\n }, function (brushModel) {\n brushType = brushModel.brushType;\n brushMode = brushModel.brushOption.brushMode || 'single';\n isBrushed |= brushModel.areas.length;\n });\n this._brushType = brushType;\n this._brushMode = brushMode;\n zrUtil.each(featureModel.get('type', true), function (type) {\n featureModel.setIconStatus(type, (type === 'keep' ? brushMode === 'multiple' : type === 'clear' ? isBrushed : type === brushType) ? 'emphasis' : 'normal');\n });\n};\n\nproto.getIcons = function () {\n var model = this.model;\n var availableIcons = model.get('icon', true);\n var icons = {};\n zrUtil.each(model.get('type', true), function (type) {\n if (availableIcons[type]) {\n icons[type] = availableIcons[type];\n }\n });\n return icons;\n};\n\nproto.onclick = function (ecModel, api, type) {\n var brushType = this._brushType;\n var brushMode = this._brushMode;\n\n if (type === 'clear') {\n // Trigger parallel action firstly\n api.dispatchAction({\n type: 'axisAreaSelect',\n intervals: []\n });\n api.dispatchAction({\n type: 'brush',\n command: 'clear',\n // Clear all areas of all brush components.\n areas: []\n });\n } else {\n api.dispatchAction({\n type: 'takeGlobalCursor',\n key: 'brush',\n brushOption: {\n brushType: type === 'keep' ? brushType : brushType === type ? false : type,\n brushMode: type === 'keep' ? brushMode === 'multiple' ? 'single' : 'multiple' : brushMode\n }\n });\n }\n};\n\nfeatureManager.register('brush', Brush);\nvar _default = Brush;\nmodule.exports = _default;"],"sourceRoot":""}