{"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/coord/cartesian/cartesianAxisHelper.js","webpack:///./node_modules/echarts/lib/component/gridSimple.js","webpack:///./node_modules/echarts/lib/component/helper/roamHelper.js","webpack:///./node_modules/echarts/lib/component/dataset.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/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/data/helper/sourceHelper.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/component/axisPointer/findPointFromSeries.js","webpack:///./node_modules/echarts/lib/chart/helper/Symbol.js","webpack:///./node_modules/echarts/lib/chart/radar/RadarView.js","webpack:///./node_modules/echarts/lib/component/axis/RadiusAxisView.js","webpack:///./node_modules/echarts/lib/helper.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/axisPointer/globalListener.js","webpack:///./node_modules/echarts/lib/scale/Ordinal.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:///./node_modules/echarts/lib/coord/polar/polarCreator.js","webpack:///./node_modules/echarts/lib/layout/barPolar.js","webpack:///./node_modules/echarts/lib/chart/gauge/PointerPath.js","webpack:///./node_modules/echarts/lib/coord/geo/GeoModel.js","webpack:///./node_modules/echarts/lib/coord/axisModelCommonMixin.js","webpack:///./node_modules/echarts/lib/CoordinateSystem.js","webpack:///./node_modules/echarts/lib/component/toolbox/featureManager.js","webpack:///./node_modules/echarts/lib/chart/tree/TreeSeries.js","webpack:///./node_modules/echarts/lib/scale/Time.js","webpack:///./node_modules/echarts/lib/chart/line/LineSeries.js","webpack:///./node_modules/echarts/lib/coord/parallel/ParallelModel.js","webpack:///./node_modules/echarts/lib/chart/tree/layoutHelper.js","webpack:///./node_modules/echarts/lib/util/graphic.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/preprocessor/helper/compatStyle.js","webpack:///./node_modules/echarts/lib/model/mixin/makeStyleMapper.js","webpack:///./node_modules/echarts/lib/chart/pie/pieLayout.js","webpack:///./node_modules/echarts/lib/chart/graph/categoryVisual.js","webpack:///./node_modules/echarts/lib/lang.js","webpack:///./node_modules/echarts/lib/component/visualMapPiecewise.js","webpack:///./node_modules/echarts/lib/data/helper/dataProvider.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/data/helper/dimensionHelper.js","webpack:///./node_modules/echarts/lib/component/polar.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/helper/createListFromArray.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/util/number.js","webpack:///./node_modules/echarts/lib/model/mixin/dataFormat.js","webpack:///./node_modules/echarts/lib/model/mixin/lineStyle.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/echarts/lib/echarts.js","webpack:///./node_modules/echarts/lib/component/dataZoom/SelectZoomModel.js","webpack:///./node_modules/echarts/lib/component/tooltip/TooltipView.js","webpack:///./node_modules/echarts/lib/model/Model.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/component/axisPointer/AxisPointerModel.js","webpack:///./node_modules/echarts/lib/coord/cartesian/AxisModel.js","webpack:///./node_modules/echarts/lib/action/geoRoam.js","webpack:///./node_modules/echarts/lib/component/helper/RoamController.js","webpack:///./node_modules/echarts/lib/component/axisPointer/CartesianAxisPointer.js","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/config.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/model/Series.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/model/mixin/itemStyle.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/data/DataDimensionInfo.js","webpack:///./node_modules/echarts/lib/chart/graph/forceLayout.js","webpack:///./node_modules/echarts/lib/component/axis/axisSplitHelper.js","webpack:///./node_modules/echarts/lib/coord/cartesian/Grid.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/data/List.js","webpack:///./node_modules/echarts/lib/util/clazz.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/axis/AxisView.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/coord/axisHelper.js","webpack:///./node_modules/echarts/lib/stream/Scheduler.js","webpack:///./node_modules/echarts/lib/chart/helper/EffectPolyline.js","webpack:///./node_modules/echarts/lib/component/axisPointer/PolarAxisPointer.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/model/Component.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/coord/axisDefault.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/coord/polar/PolarModel.js","webpack:///./node_modules/echarts/lib/component/helper/listComponent.js","webpack:///./node_modules/echarts/lib/component/radiusAxis.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/model/Global.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/visual/symbol.js","webpack:///./node_modules/echarts/lib/data/DataDiffer.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/ExtensionAPI.js","webpack:///./node_modules/echarts/lib/component/axis/parallelAxisAction.js","webpack:///./node_modules/echarts/lib/coord/parallel/parallelCreator.js","webpack:///./node_modules/echarts/lib/coord/Axis.js","webpack:///./node_modules/echarts/lib/component/legend/LegendModel.js","webpack:///./node_modules/echarts/lib/data/helper/completeDimensions.js","webpack:///./node_modules/echarts/lib/chart/radar/radarLayout.js","webpack:///./node_modules/echarts/lib/chart/graph/GraphSeries.js","webpack:///./node_modules/echarts/lib/layout/points.js","webpack:///./node_modules/echarts/lib/util/throttle.js","webpack:///./node_modules/echarts/lib/component/marker/MarkerView.js","webpack:///./node_modules/echarts/lib/util/component.js","webpack:///./node_modules/echarts/lib/model/globalDefault.js","webpack:///./node_modules/echarts/lib/scale/Interval.js","webpack:///./node_modules/echarts/lib/model/referHelper.js","webpack:///./node_modules/echarts/lib/scale/Log.js","webpack:///./node_modules/echarts/lib/chart/radar.js","webpack:///./node_modules/echarts/lib/data/OrdinalMeta.js","webpack:///./node_modules/echarts/lib/component/marker/MarkAreaView.js","webpack:///./node_modules/echarts/lib/component/toolbox/ToolboxModel.js","webpack:///./node_modules/echarts/lib/coord/cartesian/GridModel.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/coord/polar/RadiusAxis.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/data/helper/sourceType.js","webpack:///./node_modules/echarts/lib/chart/map/backwardCompat.js","webpack:///./node_modules/echarts/lib/scale/helper.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/loading/default.js","webpack:///./node_modules/echarts/lib/model/mixin/areaStyle.js","webpack:///./node_modules/echarts/lib/chart/treemap/treemapLayout.js","webpack:///./node_modules/echarts/lib/layout/barGrid.js","webpack:///./node_modules/echarts/lib/coord/axisModelCreator.js","webpack:///./node_modules/echarts/lib/component/dataZoom/dataZoomAction.js","webpack:///./node_modules/echarts/lib/chart/line/helper.js","webpack:///./node_modules/echarts/lib/chart/radar/RadarSeries.js","webpack:///./node_modules/echarts/lib/component/timeline/typeDefaulter.js","webpack:///./node_modules/echarts/lib/util/symbol.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/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/coord/polar/AngleAxis.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.js","webpack:///./node_modules/echarts/lib/component/axis/ParallelAxisView.js","webpack:///./node_modules/echarts/lib/chart/helper/createClipPathFromCoordSys.js","webpack:///./node_modules/echarts/lib/component/toolbox.js","webpack:///./node_modules/echarts/lib/view/Component.js","webpack:///./node_modules/echarts/lib/data/helper/createDimensions.js","webpack:///./node_modules/echarts/lib/component/visualMap/preprocessor.js","webpack:///./node_modules/echarts/lib/chart/treemap/TreemapView.js","webpack:///./node_modules/echarts/lib/component/axis/AngleAxisView.js","webpack:///./node_modules/echarts/lib/chart/bar/barItemStyle.js","webpack:///./node_modules/echarts/lib/export.js","webpack:///./node_modules/echarts/lib/visual/aria.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/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/coord/geo/parseGeoJson.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/theme/light.js","webpack:///./node_modules/echarts/lib/coord/single/AxisModel.js","webpack:///./node_modules/echarts/lib/chart/helper/labelHelper.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/model/OptionManager.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/axisPointer.js","webpack:///./node_modules/echarts/lib/component/visualMap/helper.js","webpack:///./node_modules/echarts/lib/coord/cartesian/Cartesian2D.js","webpack:///./node_modules/echarts/lib/component/dataZoom/AxisProxy.js","webpack:///./node_modules/echarts/lib/chart/helper/createRenderPlanner.js","webpack:///./node_modules/echarts/lib/component/grid.js","webpack:///./node_modules/echarts/lib/component/axisPointer/modelHelper.js","webpack:///./node_modules/echarts/lib/chart/heatmap/HeatmapLayer.js","webpack:///./node_modules/echarts/lib/chart/map/mapSymbolLayout.js","webpack:///./node_modules/echarts/lib/coord/cartesian/Cartesian.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/processor/dataStack.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/echarts/lib/processor/dataFilter.js","webpack:///./node_modules/echarts/lib/component/axisPointer/AxisPointerView.js","webpack:///./node_modules/echarts/lib/chart/line/poly.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/coord/polar/AxisModel.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/echarts/lib/component/axisPointer/BaseAxisPointer.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/model/mixin/boxLayout.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/coord/axisTickLabelBuilder.js","webpack:///./node_modules/echarts/lib/util/model.js","webpack:///./node_modules/echarts/lib/scale/Scale.js","webpack:///./node_modules/echarts/lib/chart/helper/whiskerBoxCommon.js","webpack:///./node_modules/echarts/lib/chart/helper/createListSimply.js","webpack:///./node_modules/echarts/lib/model/mixin/colorPalette.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/echarts/lib/view/Chart.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/axisPointer/axisTrigger.js","webpack:///./node_modules/echarts/lib/component/legend/scrollableLegendAction.js","webpack:///./node_modules/echarts/lib/coord/cartesian/Axis2D.js","webpack:///./node_modules/echarts/lib/coord/geo/mapDataStorage.js","webpack:///./node_modules/echarts/lib/data/Source.js","webpack:///./node_modules/echarts/lib/chart/boxplot/boxplotLayout.js","webpack:///./node_modules/echarts/lib/util/format.js","webpack:///./node_modules/echarts/lib/component/timeline/TimelineModel.js","webpack:///./node_modules/echarts/lib/coord/single/singleAxisHelper.js","webpack:///./node_modules/echarts/lib/data/helper/dataStackHelper.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/line.js","webpack:///./node_modules/echarts/lib/chart/tree.js","webpack:///./node_modules/echarts/lib/chart/line/lineAnimationDiff.js","webpack:///./node_modules/echarts/lib/component/axisPointer/SingleAxisPointer.js","webpack:///./node_modules/echarts/lib/component/legend/ScrollableLegendModel.js","webpack:///./node_modules/echarts/lib/chart/line/LineView.js","webpack:///./node_modules/echarts/lib/theme/dark.js","webpack:///./node_modules/echarts/lib/component/axis/CartesianAxisView.js","webpack:///./node_modules/echarts/lib/coord/geo/Region.js","webpack:///./node_modules/echarts/lib/component/parallel.js","webpack:///./node_modules/echarts/lib/component/brush/BrushModel.js","webpack:///./node_modules/echarts/lib/stream/task.js","webpack:///./node_modules/echarts/lib/component/helper/brushHelper.js","webpack:///./node_modules/echarts/lib/component/angleAxis.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/helper/SymbolDraw.js","webpack:///./node_modules/echarts/lib/chart/pie/PieSeries.js","webpack:///./node_modules/echarts/lib/util/layout.js","webpack:///./node_modules/echarts/lib/chart/boxplot.js","webpack:///./node_modules/echarts/lib/component/axis/AxisBuilder.js","webpack:///./node_modules/echarts/lib/preprocessor/backwardCompat.js","webpack:///./node_modules/echarts/lib/component/helper/BrushController.js","webpack:///./node_modules/echarts/lib/coord/polar/Polar.js","webpack:///./node_modules/echarts/lib/visual/seriesColor.js","webpack:///./node_modules/echarts/lib/processor/dataSample.js","webpack:///./node_modules/echarts/lib/model/mixin/textStyle.js","webpack:///./node_modules/echarts/lib/chart/boxplot/BoxplotSeries.js","webpack:///./node_modules/echarts/lib/component/toolbox/feature/Brush.js","webpack:///./node_modules/echarts/lib/component/axisPointer/viewHelper.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","gridModel","axisModel","opt","grid","axis","otherAxisOnZeroOf","getAxesOnZeroOf","rawAxisPosition","axisPosition","dim","getRect","rectBound","idx","onZero","axisOffset","posBound","onZeroCoord","toGlobalCoord","dataToCoord","max","min","rotation","PI","dirMap","labelDirection","tickDirection","nameDirection","labelOffset","labelInside","labelRotate","z2","extendComponentView","render","Rect","shape","defaults","fill","getItemStyle","silent","registerPreprocessor","xAxis","yAxis","updateViewOnPan","controllerHost","dx","dy","target","pos","dirty","updateViewOnZoom","zoomDelta","zoomX","zoomY","zoomLimit","newZoom","zoomMin","zoomMax","Infinity","zoomScale","ComponentModel","ComponentView","detectSourceFormat","_sourceType","SERIES_LAYOUT_BY_COLUMN","seriesLayoutBy","sourceHeader","optionUpdated","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","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","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","registerLayout","Axis","TimelineAxis","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","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","areaColor","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","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","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","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","legendDataIdx","ParallelAxis","axisIndex","makeInner","getDataItemValue","isTypedArray","isArrayLike","Source","assert","SOURCE_FORMAT_ORIGINAL","SOURCE_FORMAT_ARRAY_ROWS","SOURCE_FORMAT_OBJECT_ROWS","SOURCE_FORMAT_KEYED_COLUMNS","SOURCE_FORMAT_UNKNOWN","SOURCE_FORMAT_TYPED_ARRAY","SERIES_LAYOUT_BY_ROW","BE_ORDINAL","Must","Might","Not","inner","datasetModel","sourceFormat","Error","resetSourceDefaulter","datasetMap","prepareSource","seriesOption","fromDataset","dimensionsDefine","getDatasetModel","datasetOption","completeResult","completeBySourceData","startIndex","dimensionsDetectCount","encode","normalizeDimensionsDefine","arrayRowsTravelFirst","objectRowsCollectDimensions","colArr","value0","displayName","exist","maxLoop","firstIndex","makeSeriesEncodeForAxisCoordSys","baseCategoryDimIndex","categoryWayValueDimStart","encodeItemName","encodeSeriesName","coordDimInfo","coordDimIdx","getDataDimCountOnCoordDim","datasetRecord","categoryWayDim","valueWayDim","pushDim","dimIdxArr","idxFrom","idxCount","dimsDef","coordDimName","itemName","seriesName","dimCount","potentialNameDimIndex","idxResult","idxRes0","idxRes1","guessRecords","guessResult","doGuessOrdinal","isPureNumber","n","fulfilled","nameDimIndex","thisData","datasetIndex","guessOrdinal","dimIndex","dimType","dimDefItem","sample","detectValue","row","beStr","isFinite","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","atan2","undefined","__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","boundingRectBuilders","visualMappings","createVisualMappings","linkOthers","brushed","stepAParallel","hasAxisBrushed","stepAOthers","controlSeries","eachSeries","seriesBrushSelected","applyVisual","lineX","noop","lineY","getBoundingRectFromMinMax","range","polygon","minMax","rg","visualSymbol","layoutPoints","modelUtil","getSeriesByIndex","queryDataIndex","getItemGraphicEl","getTooltipPosition","getValues","applyTransform","_labelHelper","getDefaultLabel","SymbolClz","symbolProto","getSymbolSize","symbolSize","getScale","driftSymbol","drift","_createSymbol","keepAspect","symbolPath","stopSymbolAnimation","toLastFrame","getSymbolPath","highlight","downplay","setZ","setDraggable","draggable","_updateCommon","fadeIn","initProps","_seriesModel","normalStyleAccessPath","emphasisStyleAccessPath","normalLabelAccessPath","emphasisLabelAccessPath","highDownOnUpdate","fromState","toState","incremental","useHoverLayer","__symbolOriginalScale","ratio","emphasisOpt","animateTo","useStyle","symbolOffset","hoverAnimation","cursorStyle","hasItemOption","getShallow","elStyle","symbolRotate","symbolInnerColor","liftZ","z2Origin","__z2Origin","useNameLabel","getLabelDefaultText","getName","isRectText","autoColor","isAnimationEnabled","fadeOut","keepLabel","symbolUtil","normalizeSymbolSize","extendChartView","polar","oldData","_data","updateSymbols","oldPoints","newPoints","symbolGroup","__dimIdx","getInitialPoints","pt","cx","cy","diff","polyline","Polyline","newIdx","oldIdx","execute","eachItemGraphicEl","getLineStyle","stroke","areaStyleModel","hoverAreaStyleModel","polygonIgnore","isEmpty","parentModel","hoverPolygonIgnore","getAreaStyle","itemHoverStyle","labelHoverModel","labelDimIndex","AxisBuilder","AxisView","axisBuilderAttrs","selfBuilderAttrs","axisPointerClass","radiusAxisModel","radiusAxis","angleAxis","getAngleAxis","ticksCoords","getTicksCoords","minorTicksCoords","getMinorTicksCoords","axisAngle","radiusExtent","layoutAxis","axisBuilder","getGroup","isBlank","_splitLine","splitLineModel","lineStyleModel","lineColors","lineCount","splitLines","colorIndex","Circle","r","mergePath","_minorSplitLine","minorSplitLineModel","lines","k","_splitArea","splitAreaModel","areaColors","splitAreas","prevRadius","Sector","r0","startAngle","endAngle","axisHelper","axisModelCommonMixin","Model","_layout","getLayoutRect","_dataStackHelper","enableDataStack","isDimensionStacked","getStackedDimension","_completeDimensions","completeDimensions","_createDimensions","createList","dataStack","createScale","isInstance","createScaleByModel","setExtent","niceScaleExtent","mixinAxisModelCommonMethods","axisDefault","valueAxisDefault","valueAxis","defaultsShow","RadarModel","extendComponentModel","boundaryGap","axisLine","axisTick","axisLabel","nameTextStyle","showName","nameFormatter","nameGap","triggerEvent","indicatorModels","indicatorOpt","iNameTextStyle","nameLocation","indName","getIndicatorModels","radius","splitLine","splitArea","indicator","coordsOffsetMap","mapType","coordFix","cp","BaseBarSeries","getProgressive","getProgressiveThreshold","progressiveThreshold","largeThreshold","clip","roundCap","showBackground","backgroundStyle","borderType","borderRadius","register","records","initGlobalListeners","record","useHandler","eventType","dis","makeDispatchAction","dispatchTooltipFinally","pendings","initialized","doEnter","onLeave","actuallyPayload","showLen","showTip","hideLen","hideTip","currTrigger","pendingList","unregister","Scale","OrdinalMeta","scaleProto","OrdinalScale","ordinalMeta","_ordinalMeta","_extent","parse","getOrdinal","rank","normalize","getTicks","ticks","getLabel","unionExtentFromData","unionExtent","getApproximateExtent","getOrdinalMeta","niceTicks","niceExtent","create","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","NormalBoxPath","buildPath","ctx","__simpleBox","lineTo","closePath","transInit","clipped","normalItemStyleModel","LargeBoxPath","__sign","largePoints","elP","elN","setLargeStyle","suffix","updateDataSelected","hasAnimation","selectedOffset","toggleItemSelected","midAngle","cos","sin","PiePiece","sector","piePieceProto","firstCreate","labelText","sectorShape","animationTypeUpdate","setShape","animationType","lineJoin","withAnimation","_updateLabel","hoverIgnore","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","Polar","_axisHelper","CoordinateSystem","resizePolar","polarModel","getRadiusAxis","updatePolarScale","onBand","setAxis","polarCreator","polarList","findAxisModel","angleAxisModel","queryComponents","getSeriesStackId","getAxisKey","barLayoutPolar","lastStackCoords","barWidthAndOffset","calRadialBar","filter","getSeriesByType","isSeriesFiltered","axisKey","stackId","columnLayoutInfo","columnOffset","columnWidth","getOtherAxis","barMinHeight","barMinAngle","baseDim","stacked","clampLayout","valueAxisStart","dataToRadius","dataToAngle","baseValue","baseCoord","radiusSpan","angle","angleSpan","barSeries","columnsMap","axisExtent","columnsOnAxis","remainedWidth","autoWidthCount","categoryGap","stacks","maxWidth","barGap","barCategoryGap","coordSysName","barGapPercent","autoWidth","column","stack","lastColumn","widthSum","mathCos","mathSin","selectableMixin","geoCreator","GeoModel","layoutMode","getFilledRegions","_optionModelMap","reduce","optionModelMap","regionOpt","updateSelectedMap","aspectScale","boundingCoords","scaleLimit","getFormattedLabel","status","formatter","setZoom","setCenter","getMin","rangeStart","eqNaN","getMax","rangeEnd","getNeedCrossZero","getCoordSysModel","setRange","resetRange","coordinateSystemCreators","CoordinateSystemManager","_coordinateSystems","coordinateSystems","creater","concat","getCoordinateSystems","coordinateSystemCreator","features","ctor","_format","encodeHTML","layoutInfo","leaves","leavesModel","nodeData","wrapMethod","isExpand","treeDepth","expandAndCollapse","expandTreeDepth","initialTreeDepth","getRawDataItem","collapsed","formatTooltip","realRoot","edgeShape","edgeForkPosition","roam","nodeScaleRatio","animationDuration","animationDurationUpdate","numberUtil","scaleHelper","IntervalScale","intervalScaleProto","mathCeil","ceil","mathFloor","floor","ONE_SECOND","ONE_MINUTE","ONE_HOUR","ONE_DAY","bisect","a","lo","hi","mid","TimeScale","stepLvl","_stepLvl","date","Date","formatTime","getSetting","d","getFullYear","getMonth","getDate","minInterval","maxInterval","_interval","fixMin","fixMax","approxTickNum","span","approxInterval","scaleLevelsLen","scaleLevels","level","yearSpan","yearStep","nice","timezoneOffset","getTimezoneOffset","fixExtent","_niceExtent","parseDate","useUTC","useEncodeDefaulter","step","smoothMonotone","showSymbol","showAllSymbol","connectNulls","sampling","hoverLayerThreshold","Component","parallelAxisIndex","axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandRate","axisExpandDebounce","axisExpandSlideTriggerArea","axisExpandTriggerOn","parallelAxisDefault","mergeOption","_initDimensions","setAxisExpand","axisModels","dependentModels","parallelAxis","hierNode","defaultAncestor","ancestor","prelim","modifier","change","shift","thread","pop","firstWalk","separation","siblings","subtreeW","executeShifts","midPoint","apportion","secondWalk","nodeX","defaultSeparation","radialCoordinate","radialCoor","getViewRect","getBoxLayoutParams","subtreeV","nodeOutRight","nodeInRight","nodeOutLeft","nodeInLeft","sumOutRight","sumInRight","sumOutLeft","sumInLeft","nextRight","nextLeft","moveSubtree","nextAncestor","wl","wr","pathTool","colorTool","matrix","vector","ZImage","Image","Ring","BezierCurve","Arc","LinearGradient","RadialGradient","IncrementalDisplayable","subPixelOptimizeUtil","mathMax","mathMin","EMPTY_OBJ","Z2_EMPHASIS_LIFT","CACHED_LABEL_STYLE_PROPERTIES","textBorderColor","textBorderWidth","EMPHASIS","NORMAL","_highlightNextDigit","_highlightKeyMap","_customShapeMap","extendShape","opts","extendPath","pathData","extendFromString","registerShape","ShapeClass","getShapeClass","makePath","createFromString","centerGraphic","resizePath","makeImage","imageUrl","image","onload","img","aspect","pathRect","m","subPixelOptimizeLine","param","subPixelOptimizeRect","hasFillOrStroke","fillOrStroke","liftedColorMap","liftedColorCount","liftColor","liftedColor","lift","cacheElementStl","__hoverStlDirty","__hoverStl","normalStyle","__cachedNormalStl","__cachedNormalZ2","singleEnterEmphasis","hoverStl","__highlighted","__zr","isGroup","elTarget","targetStyle","addHover","rollbackDefaultTextStyle","extendFrom","setDefaultHoverFillStroke","applyDefaultTextStyle","prop","singleEnterNormal","highlighted","removeHover","normalStl","normalZ2","traverseUpdate","updater","commonParam","__highDownOnUpdate","setElementHoverStyle","onElementMouseOver","shouldSilent","__highByOuter","onElementMouseOut","onElementEmphasisEvent","highlightDigit","onElementNormalEvent","__highDownSilentOnTouch","zrByTouch","setAsHighDownDispatcher","asDispatcher","disable","__highDownDispatcher","isHighDownDispatcher","getHighlightDigit","highlightKey","emphasisStyle","normalModel","emphasisModel","normalSpecified","emphasisSpecified","baseText","labelProp","showNormal","showEmphasis","normalStyleText","emphasisStyleText","setTextStyle","modifyLabelStyle","normalStyleProps","emphasisStyleProps","textStyle","specifiedTextStyle","isEmphasis","setTextStyleCommon","setText","defaultColor","textPosition","getTextPosition","textOffset","textRotation","textDistance","richResult","globalTextStyle","richItemNames","getRichItemNames","richTextStyle","setTokenTextStyle","rich","forceRich","richItemNameMap","isBlock","getAutoColor","textStroke","textStrokeWidth","insideRollbackOpt","fontStyle","fontWeight","fontFamily","textLineHeight","textWidth","textHeight","textTag","disableBox","textBackgroundColor","textPadding","textBorderRadius","textBoxShadowColor","textBoxShadowBlur","textBoxShadowOffsetX","textBoxShadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","insideRollback","useInsideStyleCache","useAutoColorCache","gTextStyleModel","trim","animateOrSetProps","isUpdate","animatableModel","animationEnabled","postfix","animationDelay","getAnimationDelayParams","getTransform","mat","identity","mul","getLocalTransform","invert","transformDirection","direction","hBase","vBase","vertex","groupTransition","g1","g2","elMap1","getElMap","anid","oldEl","newProp","getAnimatableProps","g","elMap","clipPointsByRect","clipRectByRect","targetRect","x2","y2","iconStr","rectHover","linePolygonIntersect","a1x","a1y","a2x","a2y","lineLineIntersect","b1x","b1y","b2x","b2y","mx","my","nx","ny","nmCrossProduct","crossProduct2d","nearZero","b1a1x","b1a1y","q","x1","y1","eventTool","throttle","DataZoomView","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","thisCoord","stride","otherCoord","showDataShadow","eachTargetAxis","dimNames","seriesModels","getAxisProxy","getTargetSeriesModels","thisAxis","getOtherDim","thisDim","displaybles","handles","handleLabels","filler","getCursor","_onDragMove","ondragstart","_showDataInfo","ondragend","_onDragEnd","onmouseover","onmouseout","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","textPoint","labelFormatter","labelPrecision","getPixelPrecision","valueStr","showOrHide","stop","changed","realtime","_dispatchZoomAction","localPoint","transformCoordToLocal","offsetX","offsetY","dataZoomId","getTargetCoordInfo","coordInfoList","Graph","edges","directed","addNode","linkNameList","validEdges","linkCount","link","addEdge","coordSysCtor","dimensionNames","edgeData","datas","datasAttr","IndicatorAxis","getScaleExtent","LogScale","Radar","radarModel","_indicatorAxes","indicatorModel","indicatorAxis","resize","getIndicatorAxes","indicatorIndex","coordToPoint","pointToData","closestAxis","radian","minRadianDiff","closestAxisIdx","coordToData","viewWidth","viewHeight","viewSize","indicatorAxes","radarSeries","increaseInterval","exp10","pow","log","LN10","f","rawExtent","fixedMin","fixedMax","getInterval","setInterval","nicedSplitNumber","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","b","textX","textY","labelPosition","isLabelInside","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","rectEl","POSSIBLE_STYLES","compatEC2ItemStyle","itemStyleOpt","styleName","normalItemStyleOpt","normal","emphasisItemStyleOpt","convertNormalEmphasis","optType","useExtend","normalOpt","removeEC3NormalStatus","compatTextStyle","propName","labelOptSingle","TEXT_STYLE_OPTIONS","compatEC3CommonStyles","processSeries","seriesOpt","markPoint","markLine","markArea","links","mpData","mlData","breadcrumb","levels","toArr","toObj","isTheme","axes","axisName","axisOpt","axisPointer","parallel","parallelOpt","calendar","calendarOpt","radarOpt","geoOpt","regionObj","timeline","timelineOpt","toolbox","toolboxOpt","feature","featureOpt","properties","excludes","includes","PI2","RADIAN","minAngle","validDataCount","unitRadian","roseType","stillShowZeroSum","restAngle","valueSumLargerThanMinAngle","currentAngle","dir","paletteScope","categoriesData","getCategoriesData","categoryNameIdxMap","getColorFromPalette","itemStyleList","category","legend","all","brush","title","keep","dataView","lang","dataZoom","back","magicType","line","bar","tiled","restore","saveAsImage","typeNames","pie","scatter","effectScatter","treemap","boxplot","candlestick","heatmap","sankey","funnel","gauge","pictorialBar","themeRiver","sunburst","aria","general","withTitle","withoutTitle","single","prefix","withName","withoutName","multiple","separator","middle","allData","partialData","isDataItemOption","DefaultDataProvider","dimSize","seriesDataToSource","_source","_offset","_dimSize","methods","providerMethods","providerProto","pure","persistent","getItem","appendData","appendDataSimply","countSimply","getItemSimply","col","dims","newData","newCol","oldCol","clean","rawValueGetters","arrayRows","getRawValueSimply","objectRows","keyedColumns","original","typedArray","defaultDimValueGetters","getDimValueSimply","converDataValue","_dimensionInfos","_rawData","dimInfo","parseAndCollect","retrieveRawValue","getProvider","getDimensionInfo","retrieveRawAttr","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","OTHER_DIMENSIONS","summarizeDimensions","summary","notExtraCoordDimMap","defaultedLabel","defaultedTooltip","userOutput","dimItem","coordDim","coordDimIndex","getOrCreateEncodeArr","isExtraCoord","mayLabelDimType","defaultTooltip","encodeArr","otherDims","dataDimsOnCoord","encodeFirstDimNotExtra","dimArr","encodeLabel","encodeTooltip","getDimensionTypeByAxis","barPolar","borderColorQuery","globalColors","eachRawSeriesByType","defaulColor","legendSymbol","getMarkerPosition","clampData","offsetIndex","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","markLineTransform","mlModel","mlType","axisInfo","getAxisInfo","valueDataDim","numCalculate","valueIndex","baseIndex","mlFrom","mlTo","dataTransform","isInifinity","ifMarkLineHasOnlyDim","fromCoord","toCoord","otherDimIndex","containData","markLineFilter","dataFilter","updateSingleMarkerEndLayout","isFrom","xPx","yPx","markLineModel","fromData","__from","toData","__to","markerGroupMap","renderSeries","seriesData","lineDrawMap","lineDraw","updateDataVisualAndLayout","lineColor","dataModel","__keep","coordDimsInfos","optData","dimValueGetter","sankeyLayout","sankeyVisual","_echarts","_export","DATAS","MAIN_DATA","main","linkAll","TRANSFERABLE_METHODS","transferInjection","cloneShallowInjection","CHANGABLE_METHODS","changeInjection","isMainData","linkSingle","cloneShallow","getLinkedData","Region","roams","InsideZoomView","allCoordIds","coordInfo","generateCoordId","coordModel","getRange","eventName","roamHandlers","coordId","containsPoint","directionInfo","getDirectionInfo","percentPoint","signal","pixelStart","pixelLength","pixel","pan","makeMover","oldX","oldY","newX","newY","scrollMove","scrollDelta","getPercentDelta","percentDelta","oldPoint","newPoint","ret","angleExtent","pointToCoord","singleAxis","_dimensionHelper","_referHelper","getCoordSysInfoBySeries","coordSysDimDefs","registeredCoordSys","coordSysInfo","coordSysDims","axisMap","getDimensionsInfo","firstCategoryDimIndex","hasNameEncode","dimInfoList","generateCoord","categoryAxisModel","categoryAxisMap","stackCalculationInfo","setCalculationInfo","isNeedCompleteOrdinalData","itemOpt","defaultDimValueGetter","sampleItem","firstDataNotNull","isNumeric","_helper","BAR_BORDER_WIDTH_QUERY","LAYOUT_ATTRS","posDesc","pathForLineWidth","BarView","cartesian","coordSysRect","coordSysExtent","categoryDim","symbolMeta","getSymbolMeta","createBar","updateCommon","newIndex","oldIndex","pictorialShapeStr","getShapeStr","__pictorialShapeStr","updateBar","__pictorialSymbolMeta","removeBar","animationModel","symbolRepeat","symbolClip","symbolPosition","symbolPatternSize","symbolRepeatDirection","prepareBarLength","prepareSymbolSize","boundingLength","pxSign","prepareLineWidth","symbolScale","prepareLayoutInfo","valueLineWidth","repeatCutLength","output","symbolBoundingData","zeroPx","pxSignIdx","symbolBoundingExtent","convertToCoordOnAxis","categorySize","getLineScale","unitLength","pathLen","absBoundingLength","symbolMargin","hasEndGap","lastIndexOf","uLenWithMargin","endFix","repeatSpecified","repeatTimes","toIntTimes","mDiff","sizeFix","pathPosition","bundlePosition","barRectShape","createPath","createOrUpdateRepeatSymbols","bundle","__pictorialBundle","unit","eachPath","__pictorialAnimationIndex","__pictorialRepeatTimes","updateAttr","makeTarget","updateHoverAnimation","onMouseOver","onMouseOut","createOrUpdateSingleSymbol","mainPath","__pictorialMainPath","createOrUpdateBarRect","rectShape","barRect","__pictorialBarRect","createOrUpdateClip","__pictorialClipPath","labelRect","pathes","immediateAttrs","animationAttrs","barRectHoverStyle","barPositionOutside","times","roundedTimes","SunburstPiece","windowOpen","ROOT_TO_NODE_ACTION","SunburstView","that","virtualRoot","newRoot","getViewRoot","renderLabelForZeroData","newChildren","oldChildren","_oldChildren","dualTravel","renderRollUp","highlightPolicy","onEmphasis","unhighlight","virtualPiece","onNormal","getKey","processNode","newId","oldId","newNode","oldNode","doRenderNode","removeNode","viewRoot","_onclickEvent","_rootToNode","_initEvents","targetFound","nodeClick","linkTarget","targetNode","treeRoot","TimelineView","_axis","_viewRect","_timer","_currentPointer","_mainGroup","_labelGroup","timelineModel","mainGroup","_createGroup","labelGroup","_createAxis","_renderAxisLabel","_position","_doPlayStop","_clearTimer","labelPosOpt","horizontal","vertical","playPosition","prevBtnPosition","nextBtnPosition","labelAlignMap","labelBaselineMap","rotationMap","mainLength","controlModel","showControl","controlSize","controlGap","sizePlusGap","labelRotation","controlPosition","showPlayBtn","showPrevBtn","showNextBtn","xLeft","xRight","labelAlign","labelBaseline","rotateOriginX","rotateOriginY","translate","rotate","viewBound","getBound","mainBound","labelBound","mainPosition","labelsPosition","mainBoundIdx","toBound","setOrigin","targetGroup","fromPos","boundIdx","newGroup","_renderAxisLine","lineCap","_renderAxisTick","tickCoord","hoverStyleModel","symbolOpt","_changeTimeline","giveSymbol","labels","getViewLabels","labelItem","tickValue","normalLabelModel","formattedLabel","_renderControl","playState","getPlayState","makeBtn","iconPath","willRotate","btn","makeIcon","_handlePlayClick","_renderCurrentPointer","currentIndex","getCurrentIndex","pointerModel","callback","onCreate","pointer","_handlePointerDrag","_handlePointerDragend","pointerMoveTo","onUpdate","nextState","_pointerChangeTimeline","mousePos","_toAxisCoord","_findNearestTick","handleFrame","trans","axisCoord","nextIndex","objPath","noAnimation","dragging","DataZoomModel","SliderZoomModel","dataBackground","areaStyle","fillerColor","handleIcon","handleSize","handleStyle","showDetail","zoomLock","RADIAN_EPSILON","_trim","str","domain","clamp","subDomain","subRange","match","parseFloat","returnStr","arr","getPrecision","getPrecisionSafe","toString","eIndex","dotIndex","pixelExtent","dataQuantity","sizeQuantity","getPercentWithPrecision","valueList","acc","digits","votesPerQuota","targetSeats","seats","votes","currentSum","remainder","Number","NEGATIVE_INFINITY","maxId","MAX_SAFE_INTEGER","remRadian","pi2","isRadianAroundZero","TIME_REG","exec","hour","toUpperCase","UTC","quantity","quantityExponent","exp","nf","exponent","quantile","ascArr","H","h","littleThan","currClose","splice","_dataProvider","getTooltipMarker","formatTpl","getTooltipRenderMode","DIMENSION_LABEL_REG","rawValue","rawDataIndex","renderModeOption","isSeries","componentSubType","marker","dimensionIndex","charAt","makeStyleMapper","lineDash","getLineDash","lineType","dotSize","dashSize","setCurrentIndex","isIndexMax","setPlayState","resetOption","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","is","seriesAxisIndex","globalOption","animation","firstAxisModel","setRawRange","getValueRange","axisDimName","hostedBy","getRangePropMode","rangePropMode","rangeModeInOption","percentSpecified","valueSpecified","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","isTargetSeries","element","global","isRange","extentMax","zrender","timsort","Eventful","GlobalModel","ExtensionAPI","OptionManager","backwardCompat","_throttle","seriesColor","loadingDefault","Scheduler","lightTheme","darkTheme","mapDataStorage","parseClassType","version","TEST_FRAME_REMAIN_TIME","PRIORITY_PROCESSOR_FILTER","PRIORITY_PROCESSOR_SERIES_FILTER","PRIORITY_PROCESSOR_DATASTACK","PRIORITY_PROCESSOR_STATISTIC","PRIORITY_VISUAL_LAYOUT","PRIORITY_VISUAL_PROGRESSIVE_LAYOUT","PRIORITY_VISUAL_GLOBAL","PRIORITY_VISUAL_CHART","PRIORITY_VISUAL_POST_CHART_LAYOUT","PRIORITY_VISUAL_COMPONENT","PRIORITY_VISUAL_BRUSH","PROCESSOR","FILTER","SERIES_FILTER","STATISTIC","LAYOUT","PROGRESSIVE_LAYOUT","GLOBAL","CHART","COMPONENT","IN_MAIN_PROCESS","OPTION_UPDATED","ACTION_REG","createRegisterEventWithLowercaseName","ignoreDisposed","_disposed","toLowerCase","disposedWarning","MessageCenter","ECharts","dom","theme","themeStorage","_dom","defaultRenderer","renderer","devicePixelRatio","_throttledZrFlush","flush","_theme","_chartsViews","_chartsMap","_componentsViews","_componentsMap","_coordSysMgr","_api","createExtensionAPI","prioritySortFunc","__prio","visualFuncs","dataProcessorFuncs","_scheduler","_ecEventProcessor","EventProcessor","_messageCenter","_pendingActions","_onframe","bindRenderedEvent","setAsPrimitive","one","echartsProto","doConvertPixel","coordSysList","parseFinder","scheduler","prepare","updateMethods","flushPendingActions","triggerUpdatedEvent","unfinished","remainTime","startTime","performSeriesTasks","performDataProcessorTasks","updateStreamModes","performVisualTasks","getDom","setOption","notMerge","lazyUpdate","optionManager","optionPreprocessorFuncs","setTheme","console","error","getOption","getDevicePixelRatio","dpr","getRenderedCanvas","pixelRatio","getSvgDataURL","svgSupported","storage","getDisplayList","toDataURL","getDataURL","excludeComponents","excludesComponentViews","component","view","__viewId","url","getType","getConnectedDataURL","isSvg","groupId","MAX_NUMBER","connectedGroups","canvasList","instances","chart","canvas","getSvgDom","getBoundingClientRect","targetCanvas","createCanvas","getSvgRoot","connectedBackgroundColor","setBackgroundColor","refreshImmediately","containPixel","models","defaultMainType","dataIndexInside","indexOfRawIndex","getViewOfComponentModel","componentModel","getViewOfSeriesModel","prepareAndUpdate","coordSysMgr","restoreData","clearColorPalette","colorArr","stringify","performPostUpdateFuncs","ecIns","componentDirtyList","componentView","__alive","seriesDirtyMap","chartView","setDirty","dirtyMap","updateView","markUpdateMethod","updateVisual","restorePipelines","prepareStageTasks","prepareView","updateDirectly","condition","excludeSeriesId","callView","__model","chartsMap","doDispatchAction","payloadType","escapeConnect","actionWrap","actions","actionInfo","cptType","updateMethod","payloads","batched","eventObj","eventObjBatch","isHighDown","batchItem","sub","pendingActions","isFinished","isComponent","viewList","viewMap","doPrepare","viewId","classType","Clazz","getClass","__id","__ecComponentInfo","renderTask","renderComponents","dirtyList","updateZ","updatePayload","perform","getPerformArgs","updateBlend","updateHoverLayerStatus","postUpdateFuncs","func","_loadingFX","optionChanged","showLoading","cfg","hideLoading","loadingEffects","makeActionFromEvent","eventActionMap","browser","weChat","MOUSE_EVENT_NAMES","elCount","preventUsingHoverLayer","blendMode","blend","eachPendingDisplayable","displayable","ecInstance","getComponentByElement","modelInfo","eventInfo","eveName","isGlobalOut","targetEl","packedEvent","zrEventfulCallAtLast","actionType","setAttribute","DOM_ATTRIBUTE_KEY","normalizeQuery","cptQuery","dataQuery","otherQuery","condCptType","suffixes","dataKeys","reserved","propSuffix","suffixPos","args","check","filterForExposedEvent","host","propOnHost","afterTrigger","idBase","groupIdBase","enableConnect","STATUS_PENDING","STATUS_UPDATING","STATUS_UPDATED","STATUS_KEY","updateConnectedChartsStatus","charts","otherChart","otherCharts","existInstance","getInstanceByDom","connect","disConnect","disconnect","getAttribute","getInstanceById","registerTheme","preprocessorFunc","priority","processor","normalizeRegister","registerPostUpdate","postUpdateFunc","test","getCoordinateSystemDimensions","layoutTask","visualTask","targetList","defaultPriority","stageHandler","wrapStageHandler","__raw","registerLoading","loadingFx","setCanvasCreator","creator","$override","registerMap","geoJson","specialAreas","getMap","retrieveMap","geoJSON","dataTool","___ec_export","TooltipRichContent","findPointFromSeries","globalListener","axisPointerViewHelper","proxyRect","tooltipContent","_renderMode","_newLine","_tooltipContent","_tooltipModel","_ecModel","_lastDataByCoordSys","_alwaysShowContent","_initGlobalListener","_keepShow","triggerOn","_tryShow","_hide","_lastX","_lastY","_refreshUpdateTimeout","manuallyShowTip","_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","dataParams","getAxisRawValue","axisValueLabel","seriesTooltip","newMarkers","firstLine","positionExpr","_updateContentNotChangedOnAxis","_updatePosition","_showTooltipContent","random","tooltipTrigger","defaultHtml","asyncTicket","tooltipOpt","subTooltipModel","cbTicket","contentSize","vAlign","calcTooltipPosition","refixTooltipPosition","isCenterAlign","confineTooltipPosition","lastCoordSys","contentNotChanged","lastItemCoordSys","indexCoordSys","lastDataByAxis","thisItemCoordSys","thisDataByAxis","lastItem","indexAxis","thisItem","lastIndices","newIndices","lastIdxItem","newIdxItem","modelCascade","resultModel","gapH","gapV","domWidth","domHeight","rectWidth","rectHeight","_clazz","enableClassExtend","enableClassCheck","lineStyleMixin","areaStyleMixin","textStyleMixin","itemStyleMixin","doGet","pathArr","getParent","getParentMethod","parsePath","thisParentModel","Ctor","setReadOnly","customizeGetParent","Single","singles","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","SymbolDraw","EffectSymbol","pointsLayout","_symbolDraw","effectSymbolDraw","_updateGroupTransform","getRoamTransform","HeatmapLayer","getIsInPiecewiseRange","dataSpan","lastIndex","getIsInContinuousRange","isGeoCoordSys","visualMapOfThisSeries","targetSeries","_incrementalDisplayable","_renderOnCartesianAndCalendar","_renderOnGeo","itemStyleQuery","hoverItemStyleQuery","labelQuery","hoverLabelQuery","coordSysType","dataDims","dataToRect","contentShape","inRangeVisuals","targetVisuals","outOfRangeVisuals","hmLayer","_hmLayer","lng","lat","isInRange","getNormalizer","getColorMapper","curveTool","_graphHelper","v1","v2","v3","v2DistSquare","distSquare","mathAbs","intersectCurveCircle","curvePoints","p0","radiusSquare","_t","nextDiff","tmp0","quadraticSubdivide","pts","pts2","fromSymbol","toSymbol","__original","originalPoints","copy","scaleAndAdd","AxisPointerModel","snap","triggerTooltip","shadowStyle","axisModelCreator","AxisModel","gridIndex","gridId","getAxisType","extraOption","_roamHelper","updateCenterAndZoom","seriesGroup","interactionMutex","pointerChecker","_opt","mousedownHandler","mousedown","mousemoveHandler","mousemove","mouseupHandler","mouseup","mousewheelHandler","mousewheel","pinchHandler","pinch","controlType","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","BaseAxisPointer","viewHelper","cartesianAxisHelper","CartesianAxisPointer","makeElOption","elOption","axisPointerModel","axisPointerType","otherExtent","getCartesian","getGlobalExtent","pixelValue","buildElStyle","pointerOption","pointerShapeBuilder","graphicKey","buildCartesianSingleLabelElOption","getHandleTransform","labelMargin","getTransformedPosition","updateHandleTransform","currPosition","cursorOtherValue","cursorPoint","tooltipOptions","targetShape","makeLineShape","getAxisDimIndex","shadow","makeRectShape","registerAxisPointerClass","SingleAxis","_init","axisPointerEnabled","_adjustAxis","_updateAxisTransform","coordBase","extentSum","toLocalCoord","getAxes","getTooltipAxes","baseAxes","parseGeoJson","fixNanhai","fixTextCoord","fixGeoCoord","fixDiaoyuIsland","mapRecord","nameProperty","parsed","message","regionName","specialArea","regionRect","union","positiveBorderColorQuery","negativeBorderColorQuery","positiveColorQuery","negativeColorQuery","performRawSeries","colorP","getColor","colorN","borderColorP","getBorderColor","borderColorN","isLargeRender","FunnelPiece","funnelPieceProto","opacityAccessPath","FunnelView","funnelPiece","GaugeSeries","offsetCenter","detail","dev","dataSelectableMixin","MapSeries","needsDrawMap","dataNameMap","selectTargetList","toAppendNames","geoSource","getMapType","appendValues","seriesNames","otherIndex","originalData","showLegendSymbol","dataRangeHoverLink","NodeHighlightPolicy","NONE","DESCENDANT","ANCESTOR","SELF","DEFAULT_SECTOR_Z","DEFAULT_TEXT_Z","SunburstPieceProto","getNodeColor","fillDefaultColor","stateStyle","isNodeHighlighted","onHighlight","onDownplay","labelState","getLabelAttr","labelMinAngle","labelPadding","rotateType","stateAttr","visualMetaList","getRootId","activeNode","policy","featureManager","saveAsImageLang","SaveAsImage","unusable","proto","MouseEvent","ie","navigator","msSaveOrOpenBlob","bstr","atob","u8arr","Uint8Array","charCodeAt","blob","Blob","tab","open","write","$a","download","href","evt","bubbles","cancelable","dispatchEvent","colorPaletteMixin","mergeLayoutParam","_task","createTask","visualBorderColorAccessPath","extraOpt","dataTask","dataTaskCount","dataTaskReset","wrapData","dataBeforeProcessed","autoSeriesName","inputPositionParams","themeSubType","hasClass","getTheme","getDefaultOption","fillDataTextStyle","newSeriesOption","task","getCurrentTask","setOutputEnd","outputData","isRichText","markerId","formatArrayValue","vertially","setEachItem","markName","dimHead","dimHeadStr","valStr","tooltipDims","formatSingleValue","tooltipDimLen","isValueArr","colorEl","isNameSpecified","colorStr","requestColorNum","coordDimToDataDim","getAxisTooltipData","pipeTask","getSeriesAutoName","nameArr","dataDim","dataTaskProgress","onDataSelfChange","pipeline","getPipeline","currentTask","agentStubMap","AXIS_DIMS","COORDS","isCoordSupported","coordType","createNameEach","attrs","capitalNames","capitalFirst","capitalAttrs","nameObj","capital","createLinkedNodesFinder","forEachNode","forEachEdgeType","edgeIdGetter","sourceNode","existsLink","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","getBorderLineDash","ATTR","dataZoomInfo","store","giveStore","theDataZoomId","theCoordId","dataZoomInfos","cleanStore","createController","controllerParams","mergeControllerParams","newRecord","typePriority","oneType","validPayloadTypes","targetNodeId","getPathToRoot","viewPath","wrapTreePathInfo","treePathInfo","nodeDataIndex","DataDimensionInfo","_forceHelper","_simpleLayoutHelper","_circularLayoutHelper","graphSeries","preservedPoints","forceModel","initLayout","nodeDataExtent","edgeDataExtent","repulsion","edgeLength","rep","w","fixed","getEdgeByIndex","edgeModel","ignoreForceLayout","forceInstance","gravity","friction","oldStep","getNodeByIndex","stopped","rectCoordAxisBuildSplitArea","axisView","axisGroup","gridRect","tickModel","areaColorsLen","lastSplitAreaColors","__splitAreaColors","newSplitAreaColors","cIndex","prev","rectCoordAxisHandleRemove","ifAxisCrossZero","estimateLabelUnionRect","Cartesian2D","Axis2D","isAxisUsedInTheGrid","Grid","_coordsMap","_coordsList","_axesMap","_axesList","_initCartesian","gridProto","fixAxisOnZero","axesMap","otherAxisDim","onZeroRecords","otherAxes","onZeroAxisIndex","canOnZeroToAxis","getOnZeroRecordKey","updateAxisTransform","axisExtentSum","_updateScale","ignoreContainLabel","axesList","adjustAxes","labelUnionRect","axesMapOnDim","coordList","getCartesians","_findConvertTarget","xAxisModel","yAxisModel","coordsList","axisPositionUsed","axesCount","createAxisCreator","addAxis","isCartesian2D","axesModels","findAxesModels","otherAxis","axesTypes","grids","nodeOpacityPath","hoverNodeOpacityPath","lineOpacityPath","hoverLineOpacityPath","getItemOpacity","opacityPath","fadeOutItem","opacityRatio","getGraphicEl","fadeInItem","SankeyShape","cpx1","cpy1","cpx2","cpy2","bezierCurveTo","_focusAdjacencyDisabled","sankeyView","curve","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","geoJSONLoader","geoSVGLoader","loaders","svg","mapRecords","singleSource","makeInvoker","hostKey","results","_listComponent","makeBackground","_contentGroup","_backgroundEl","_selectorGroup","_isFirstRender","viewportSize","legendDrawnMap","selectMode","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","CATEGORY_DEFAULT_VISUAL_INDEX","_normalizeData","normalizers","visualHandler","visualHandlers","_doMap","normalizeVisualRange","preprocessForPiecewise","preprocessForSpecifiedCategory","normalized","makeApplyVisual","isNormalized","doMapCategory","returnRGBArray","fastLerp","parsedVisual","linear","piecewise","getSpecifiedVisual","doMapFixed","colorHue","makePartialColorVisualHandler","modifyHSL","colorSaturation","colorLightness","colorAlpha","modifyAlpha","makeDoMap","getter","setter","symbolCfg","doMapToArray","hasSpecialVisual","originIndex","categoryMap","visualArr","setVisualToOption","doNotNeedPair","applyValue","sourceExtent","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","active","inactive","UNDEFINED","INDEX_NOT_FOUND","ID_PREFIX","dataCtors","Float64Array","Int32Array","CtorUint32Array","Uint32Array","CtorInt32Array","CtorUint16Array","Uint16Array","getIndicesCtor","_rawCount","cloneChunk","originalChunk","TRANSFERABLE_PROPERTIES","CLONE_PROPERTIES","transferProperties","__wrappedMethods","_calculationInfo","dimensionInfos","invertedIndicesMap","dimensionInfo","dimensionName","createInvertedIndices","_indices","_count","_storage","_nameList","_idList","_optionModels","_visual","_itemVisuals","hasItemVisual","_itemLayouts","_graphicEls","_chunkSize","_chunkCount","_rawExtent","_approximateExtent","_dimensionsSummary","_invertedIndicesMap","listProto","prepareChunks","chunkSize","chunkCount","DataCtor","lastChunkIndex","resizeChunkArray","newStore","prepareInvertedIndex","invertedIndices","getRawValueFromStore","chunkIndex","chunkOffset","chunk","getRawIndexWithoutIndices","getRawIndexWithIndices","_idDimIdx","normalizeDimensions","cloneListForMapAndSample","excludeDimensions","allDimensions","originalStorage","cloneDimStore","getInitialExtent","originalDimStore","newDimStore","getDimensionsOnCoord","dimensionsSummary","nameList","notProvider","_nameRepeatCount","_dimValueGetter","_dimValueGetterArrayRows","_initDataFromProvider","rawData","values","dimLen","originalChunkCount","emptyDataItem","sourceIdx","dimRawExtent","nameDimIdx","dimensionInfoMap","idList","nameRepeatCount","_nameDimIdx","itemId","dimStorage","nameDim","nameDimChunk","getIndices","thisCount","buffer","chunkStore","getByRawIndex","rawIdx","dimStore","_getFast","dimData","initialExtent","dimExtent","currEnd","useRaw","setApproximateExtent","getCalculationInfo","getMedian","dimDataArray","sortedDimDataArray","rawIndexOf","indicesOfNearest","maxDistance","nearestIndices","minDist","minDiff","nearestIndicesLen","contextCompat","filterSelf","dim0","selectRange","originalCount","quickFinished","chunkStorage","dimStorage2","min2","max2","chunkStorage2","val2","dimk","tmpRetValue","dataCount","retValue","rawExtentOnDim","downSample","rate","sampleValue","sampleIndex","targetStorage","frameValues","frameSize","originalChunkIndex","originalChunkOffset","sampleFrameIdx","sampleChunkIndex","sampleChunkOffset","otherList","thisList","itemVisual","clearAllVisual","setItemDataAndSeriesIndex","dimensionInfoList","injectFunction","originalMethod","TYPE_DELIMITER","IS_CONTAINER","checkClassType","RootClass","mandatoryMethods","$constructor","superClass","ExtendedClass","classBase","Clz","classAttr","enableClassManagement","entity","makeContainer","registerClass","componentMainType","throwWhenNotFound","getClassesByMainType","getAllClassMainTypes","hasSubTypes","registerWhenExtend","originalExtend","ignoreSize","subtext","subtarget","subtextStyle","titleModel","subtextStyleModel","subText","subTextEl","sublink","groupRect","layoutOption","alignStyle","createParallelIfNeeded","mergeAxisOptionFromParallel","hasParallelSeries","axisOption","parallelOption","isPolyline","isLarge","lineCoords","segCount","totalCoordsCount","getLineCoordsCount","getLineCoords","axisPointerModelHelper","_axisPointer","fixValue","updateAxisPointer","force","disposeAxisPointer","forceRender","getAxisPointerClass","getAxisPointerModel","axisPointerClazz","clazz","compatibleEC2","ec2Types","transferItem","controlStyle","itemStyleEmphasis","labelNormal","excludeLabelAttr","legendModels","findComponents","categoryNames","mapSymbolLayout","mapDataStatistic","createDataSelectAction","effectType","showEffectOn","rippleEffect","barItemStyle","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","fixedLineWidth","getLineWidth","signX","signY","isZeroOnPolar","isPolar","labelPositionOutside","rawLayout","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","_barGrid","prepareLayoutBarSeries","makeColumnLayout","retrieveColumnLayout","axisDataLen","scaleType","originalExtent","getCategories","setBlank","isBaseAxisAndHasBarSeries","barSeriesModels","adjustedScale","adjustScaleForOverflow","axisLength","barsOnCurrentAxis","minOverflow","maxOverflow","totalOverFlow","oldRange","oldRangePercentOfNew","overflowBuffer","extentInfo","makeLabelFormatter","categoryTickStart","tpl","tick","realNumberScaleTicks","tickCount","categoryScaleExtent","axisLabelModel","unrotatedSingleRect","singleRect","rotateTextRect","rotateRadians","boundingBox","plain","beforeWidth","beforeHeight","afterWidth","afterHeight","rotatedRect","getOptionCategoryInterval","shouldShowAllLabels","dataProcessorHandlers","_dataProcessorHandlers","_visualHandlers","_allHandlers","_stageTaskMap","performStageTasks","stageHandlers","needSetDirty","__pipeline","stageHandlerRecord","seriesTaskMap","overallTask","overallNeedDirty","stub","performArgs","block","pipelineId","skip","taskRecord","_pipelineMap","pCtx","progressiveEnabled","progressiveRender","__idxInPipeline","blockIndex","modDataCount","modBy","dataLen","threshold","pipelineMap","head","tail","pipe","stageTaskMap","createSeriesStageTask","createOverallStageTask","__block","getUpstream","seriesTaskPlan","seriesTaskReset","seriesTaskCount","useClearVisual","isVisual","isLayout","createOnAllSeries","removeKey","overallTaskReset","overallProgress","createStub","stubReset","onDirty","stubOnDirty","agent","getSeries","upstreamContext","stubProgress","getDownstream","resetDefines","makeSeriesTaskProgress","singleSeriesTaskProgress","resetDefineIdx","resetDefine","dataEach","detectSeriseType","legacyFunc","ecModelMock","apiMock","mockMethods","cond","EffectPolyline","_lastFrame","_lastFramePercent","effectPolylineProto","_points","accLenArr","_offsets","_length","offsets","lastFrame","frame","lerp","PolarAxisPointer","animationThreshold","coordValue","labelPos","getLabelPosition","buildLabelElOption","innerTextLayout","makeSectorShape","geoCoordMap","_buildAxes","_buildSplitLineAndArea","axisBuilders","showSplitLine","showSplitArea","splitLineColors","splitAreaColors","ticksRadius","getColorIndex","realSplitNumber","axesTicksPoints","prevPoints","areaOrLine","areaOrLineColorList","themeRiverVisual","componentUtil","boxLayoutMixin","themeModel","newCptOption","fields","optList","Class","getDependencies","deps","enableSubTypeDefaulter","enableTopologicalTravel","v2ApplyTransform","TransformDummy","_roamTransformable","_center","_zoom","setBoundingRect","setViewRect","rawTransform","centerCoord","_updateCenterAndZoom","getDefaultCenter","rawRect","getCenter","rawTransformMatrix","defaultCenter","roamTransformable","_rawTransform","invTransform","_layoutHelper","bbox","TreeShape","parentPoint","childPoints","forkPosition","childLen","firstChildPos","lastChildPos","forkDim","tmpPoint","_oldTree","_updateViewCoordSys","symbolNeedsDraw","updateNode","symbolEl","_nodeScaleRatio","_updateNodeAndLinkScale","fromPoints","oldMin","_min","oldMax","_max","viewCoordSys","_viewCoordSys","_getNodeGlobalScale","invScale","getTreeNodeStyle","sourceSymbolEl","sourceLayout","sourceOldLayout","rawX","__radialOldRawX","rawY","__radialOldRawY","targetLayout","__radialRawX","__radialRawY","rad","isLeft","rootLayout","labelRotateRadian","textOrigin","drawEdge","__edge","getEdgeShape","childLayout","sourceEdge","radialCoor1","radialCoor2","radialCoor3","radialCoor4","eachAfter","eachBefore","newSnapshot","snapshot","_targetList","_selectTargetMap","targetMap","select","unSelect","toggleSelected","nameRotate","nameTruncate","ellipsis","placeholder","showMinLabel","showMaxLabel","categoryAxis","deduplication","alignWithLabel","minorTick","minorSplitLine","timeAxis","logAxis","logBase","idxMap","concatArray","mergeAll","Uint32Arr","Float64Arr","compatEc2","coords","fromName","toName","LinesSeries","_processFlatCoordsArray","_flatCoords","flatCoords","_flatCoordsOffset","flatCoordsOffset","_getCoordsFromItemModel","startOffset","coordsOffsetAndLenStorage","coordsStorage","coordsCursor","offsetCursor","effect","trailLength","autoPositionValues","targetValue","visualCluster","visualObj","controllerVisuals","visualMapping","positionElement","generateNodeKey","_directed","_nodesMap","_edgesMap","graphProto","Node","hostGraph","Edge","isDirected","nodesMap","edgesMap","getEdge","breadthFirstTraverse","startNode","__visited","queue","currentNode","otherNode","degree","inDegree","outDegree","createGraphDataProxyMixin","hostName","LineGroup","_ctor","lineDrawProto","doAdd","lineNeedsDraw","doUpdate","oldLineData","newLineData","itemEl","isEffectObject","animators","isPointNaN","isPersistent","_lineData","incrementalPrepareUpdate","_seriesScope","incrementalUpdate","updateIncrementalAndHover","_clearIncremental","_incremental","clearDisplaybles","_mapDraw","dataViewLang","BLOCK_SPLITER","ITEM_SPLITER","groupSeries","seriesGroupByCategoryAxis","otherSeries","meta","other","assembleSeriesWithCategoryAxis","tables","valueAxisDim","headers","columns","items","assembleOtherSeries","vals","argLen","getContentFromModel","isTSVFormat","itemSplitRegex","RegExp","parseTSVContents","tsv","tsvLines","header","parseListContents","hasName","parseContents","blockMetaList","blocks","blockMeta","DataView","tryMergeDataOption","newValIsObject","shouldDeleteName","readOnly","optionToContent","contentToOption","textColor","textareaColor","textareaBorderColor","buttonColor","buttonTextColor","viewMain","textarea","htmlOrDom","isDom","buttonContainer","buttonStyle","closeButton","refreshButton","addEventListener","newSeriesOptList","actionInfos","polarOptArr","polarNotRadar","polarOpt","polarIndex","radarIndex","foundAxisModel","layoutBox","boxLayoutParams","positions","bbWidth","bbHeight","BrushController","history","dataZoomLang","DATA_ZOOM_ID_BASE","DataZoom","_brushController","_onBrush","mount","_isZoomActive","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","dataZoomOpt","addForAxis","axisIndicesName","givenAxisIndices","forEachComponent","$fromToolbox","coordSysLists","save","coordIndex","LinePath","SYMBOL_CATEGORIES","makeSymbolTypeKey","symbolCategory","__specifiedRotation","setLinePoints","updateSymbolAndLabelBeforeLineUpdate","lineGroup","symbolFrom","symbolTo","__dirty","pointAt","toPos","specifiedRotation","tangent","tangentAt","__labelDistance","distanceX","distanceY","halfPercent","__position","__verticalAlign","__textAlign","_createLine","lineProto","beforeUpdate","lineLabelOriginalOpacity","visualOpacity","defaultLabelColor","rawVal","normalText","emphasisText","labelStyle","linePath","globalDefault","OPTION_INNER_KEY","_optionManager","baseOption","mountOption","initBase","timelineOption","getTimelineOption","mediaOptions","getMediaOption","mediaOption","componentsMap","newCptTypes","visitComponent","newCptOptionList","mapResult","mappingToExists","makeIdAndName","keyInfo","determineSubType","getComponentsByTypes","resultItem","ComponentModelClass","createSeriesIndices","componentOption","topologicalTravel","_seriesIndicesMap","_seriesIndices","isIdInner","cpts","isIdArray","cpt","isNameArray","filterBySubType","queryCond","getQueryCond","doFilter","indexAttr","idAttr","nameAttr","components","queryResult","oneSeries","getSeriesCount","assertSeriesInitialized","rawSeriesIndex","getCurrentSeriesIndices","filterSeries","filteredSeries","componentTypes","isNotTargetSeries","seiresIndex","mergeTheme","notMergeColorLayer","colorLayer","themeItem","existComponent","graphicUtil","_nonShapeGraphicElements","graphicOption","elements","GraphicModel","parentId","_elOptionsToUpdate","newList","existList","flattenedList","_flatten","mappingResult","elOptionsToUpdate","newElOption","setKeyInfoToNewElOption","mergeNewElOptionToExist","setLayoutInfoToExist","$action","optionList","parentOption","useElOptionsToUpdate","els","createEl","targetElParent","graphicType","__ecGraphicId","removeEl","existEl","existElParent","getCleanedElOption","LOCATION_PARAMS","isSetLoc","isSet","existElOption","newElParentOption","newElOptCopy","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","defaultSymbolType","hasSymbolTypeCallback","hasSymbolSizeCallback","hasSymbolRotateCallback","hasCallback","seriesSymbol","seriesSymbolSize","itemSymbolType","itemSymbolSize","itemSymbolRotate","itemSymbolKeepAspect","defaultKeyGetter","oldArr","newArr","oldKeyGetter","newKeyGetter","_old","_new","_oldKeyGetter","_newKeyGetter","initIndexMap","keyArr","keyGetterName","existence","_add","_update","_remove","oldDataIndexMap","newDataIndexMap","oldDataKeyArr","newDataKeyArr","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","updateMarkerLayout","markPointModel","mpModel","symbolDrawMap","symbolDraw","isFnSymbol","isFnSymbolSize","isFnSymbolRotate","dataOpt","sizeCalculable","CalendarModel","cellSize","dayLabel","firstDay","monthLabel","yearLabel","mergeAndNormalizeLayoutParams","raw","hvIdx","echartsAPIList","chartInstance","parallelAxisModel","setActiveIntervals","intervals","Parallel","_axisTickLabelBuilder","createAxisTicks","createAxisLabels","calculateCategoryInterval","NORMALIZED_EXTENT","fixExtentWithBands","nTick","fixOnBandTicksCoords","ticksLen","last","diffSize","crossLen","ticksItem","getTickModel","minorTickModel","minorTicks","getMinorTicks","minorTicksGroup","getRotate","langSelector","defaultSelectorOption","LegendModel","_updateSelector","_updateData","hasSelected","potentialData","availableNames","isPotential","getAllNames","_availableNames","allSelect","inverseSelect","selectorLabel","selectorItemGap","sysDims","dataDimNameMap","coordDimNameMap","getDimCount","userDimName","encodeDef","validDataDims","resultDimIdx","applyDim","availDimIdx","sysDimItem","sysDimIndex","sysDimItemDimsDef","sysDimItemOtherDims","sysDimItemDimsDefItem","generateCoordCount","fromZero","extra","genName","optDimCount","isValidPoint","getValueMissingPoint","firstPoint","find","createGraphFromNodeEdge","GraphSeries","_categoriesData","_updateCategoriesData","categoriesModels","_categoriesModels","categoryIdx","categoryModel","edgeLabelModel","fakeSeriesModel","emphasisEdgeLabelModel","emphasisFakeSeriesModel","edgeGetParent","getEdgeData","sourceName","targetName","circular","rotateLabel","layoutAnimation","edgeSymbol","edgeSymbolSize","edgeLabel","stackResultDim","ORIGIN_METHOD","RATE","THROTTLE_TYPE","debounce","currCall","debounceNextCall","lastCall","lastExec","timer","getTime","thisDelay","thisDebounce","debounceDelay","fnAttr","originFn","lastThrottleType","lastRate","markerModelKey","subTypeDefaulters","defaulter","componentTypeMain","dependencyGetter","makeDepndencyGraph","fullNameList","noEntryList","createDependencyGraphItem","originalDeps","availableDeps","getAvailableDependencies","entryCount","dependentName","predecessor","thatItem","successor","dep","targetNameList","targetNameSet","currComponentType","currVertex","isInTargetNameSet","removeEdgeAndAdd","removeEdge","succComponentType","platform","gradientColor","animationEasingUpdate","roundNumber","_intervalPrecision","thisExtent","getIntervalPrecision","expandToNicedExtent","niceTickExtent","intervalPrecision","safeLimit","lastNiceTick","nextTick","prevTick","minorInterval","intervalScaleNiceTicks","expandSize","CoordSysInfo","fetch","fetchers","roundingErrorFix","mathPow","mathLog","_originalScale","originalScale","powVal","__fixMin","fixRoundingError","__fixMax","err","originalVal","dataColor","radarLayout","_needCollect","needCollect","_deduplication","_map","createByAxisModel","dedplication","getOrCreateMap","colorUtil","markAreaTransform","maModel","lt","rb","ltCoord","rbCoord","markAreaFilter","getSingleMarkerEndPoint","dimPermutations","areaData","markAreaModel","areaGroupMap","polygonGroup","allClipped","xValue","yValue","__data","ToolboxModel","featureName","Feature","showTitle","iconStyle","containLabel","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","hasXOrY","hasXAndY","markerTypeCalculatorWithExtent","otherDataDim","targetDataDim","otherCoordIndex","targetCoordIndex","coordArr","calcDataDim","coordArrValue","markerTypeCalculator","average","baseDataDim","dataDimToCoordDim","RadiusAxis","radiusToData","_treeHelper","_viewRoot","clipWindow","squareRatio","leafDepth","drillDownIcon","zoomToNodeRatio","emptyItemWidth","upperLabel","gapWidth","visualDimension","visibleMin","childrenVisibleMin","completeTreeValue","designatedVisualModel","setDefault","levelModels","levelDefine","levelModel","setLayoutInfo","idIndexMap","_idIndexMap","_idIndexMapCount","childValue","thisValue","globalColorList","hasColorDefine","modelColor","level0","mapLocation","largeLayout","_symbolRadiansHalf","basedOn","_layoutNodesBasedOn","x12","y12","unitAngle","radianHalf","sumRadian","symbolRadianHalf","asin","halfRemainRadian","adjustEdge","FOCUS_ADJACENCY","UNFOCUS_ADJACENCY","opct","_lineDraw","_firstRender","graphView","groupNewProp","_layoutTimeout","_startForceLayoutIteration","warmUp","_layouting","setFixed","setUnfixed","circularRotateLabel","adjacentEdge","seiresModelMap","__paletteScope","dataAll","filteredIdx","singleDataColor","singleDataBorderColor","textContain","maskColor","showSpinner","spinnerRadius","mask","arc","animateShape","retrieveValue","PATH_BORDER_WIDTH","PATH_GAP_WIDTH","PATH_UPPER_LABEL_SHOW","PATH_UPPER_LABEL_HEIGHT","ecWidth","ecHeight","containerWidth","containerHeight","rootRect","viewAbovePath","rootSize","estimateRootSize","viewRootLayout","squarify","upperHeight","calculateRootPosition","prunning","hideChildren","thisLayout","halfGapWidth","upperLabelHeight","getUpperLabelHeight","layoutOffset","layoutOffsetUpper","totalArea","initChildren","rowFixedLength","best","score","worst","orderBy","overLeafDepth","statistic","filterByThreshold","isLeafRoot","orderedChildren","deletePoint","areaMax","areaMin","squareArea","idx0WhenH","idx1WhenH","rowOtherLength","rowLen","wh1","remain","modWH","wh0","currNode","defaultSize","viewArea","currNodeValue","defaultPosition","targetCenter","clipRect","nodeInViewAbovePath","isAboveViewRoot","childClipRect","STACK_PREFIX","LARGE_BAR_MIN_WIDTH","getLayoutOnAxis","widthAndOffsets","doCalBarWidthAndOffset","isOnCartesian","isInLargeMode","getValueAxesMinGaps","axisValues","cnt","axisMinGaps","valuesInAxis","seriesInfoList","minGap","extentSpan","scaleSpan","seriesInfo","minWidth","finalWidth","lastStackCoordsOrigin","isValueAxisH","getValueAxisStart","valueAxisHorizontal","largeBackgroundPoints","valuePair","pointsOffset","idxOffset","backgroundStart","AXIS_TYPES","BaseAxisModelClass","axisTypeDefaulter","extraDefaultOption","__ordinalMeta","linkedNodesFinder","effectedModels","prepareDataCoordInfo","valueOrigin","valueStart","getValueStart","baseAxisDim","baseDataOffset","dataDimsForPoint","stackedOverDimension","getStackedOnPoint","dataCoordInfo","stackedData","RadarSeries","_text","calculateTextPosition","Triangle","Diamond","Pin","tanX","tanY","cpLen","cpLen2","Arrow","symbolCtors","roundRect","square","circle","diamond","pin","arrow","triangle","symbolShapeMakers","symbolBuildProxies","inBundle","proxySymbol","symbolPathSetColor","innerColor","symbolStyle","symbolShape","__isEmptyBrush","disabled","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","fullData","mainSeries","fullIndex","highDownRecord","recordVersion","onRegionHighDown","enterRegionHighDown","toHighOrDown","__mapOriginalZ2","PointerPath","parsePosition","formatLabel","GaugeView","posInfo","_renderMain","axisLineModel","angleRangeSpan","prevEndAngle","axisLineWidth","showAxis","tmp","_renderTicks","_renderPointer","_renderTitle","_renderDetail","minVal","maxVal","subSplitNumber","splitLineLen","tickLen","subStep","splitLineStyle","tickLineStyle","unitX","unitY","tickLine","valueExtent","detailModel","linesLayout","linesVisual","polygonContain","getLineSelectors","xyIndex","inLineRange","layoutRange","showContent","displayMode","confine","showDelay","hideDelay","extraCssText","crossStyle","AngleAxis","angleToData","ordinalScale","ordinalExtent","unitSpan","unitH","maxH","dh","cache","lastAutoInterval","lastTickCount","percentPrecision","VISUAL_PRIORITY","resultVisual","visualMeta","concreteDim","opacityMap","itemOpacity","LargeSymbolDraw","_updateSymbolDraw","_getClipShape","_finished","DATA_NAME_INDEX","ThemeRiverSeries","fixData","rawDataLength","timeValueKeys","layData","dataList","timeValue","lenCount","indexArr","index1","index2","nestestValue","nearestIdx","theValue","htmlName","htmlValue","_updateLineDraw","getLayer","_lastZlevel","configLayer","motionBlur","_showEffect","lastFrameAlpha","_clearLayer","hasEffect","_hasEffet","_isPolyline","DEFAULT_TOOLBOX_BTNS","isNew","brushComponents","brushComponentSpecifiedBtns","brushOpt","tbs","toolboxFeature","toolboxBrush","brushTypes","removeDuplicate","flag","brushHelper","elementList","fromAxisAreaSelect","oldAxisGroup","_axisGroup","coordSysModel","areaSelectStyle","getAreaSelectStyle","areaWidth","axisLayout","getAxisLayout","builderOpt","strokeContainThreshold","_refreshBrushController","extentLen","enableGlobalPan","panelId","makeRectPanelClipPath","isTargetByCursor","makeRectIsTargetByCursor","getLinearBrushOtherExtent","makeLinearBrushOtherExtent","removeOnClick","getCoverInfoList","coverInfoList","coverInfo","parallelAxisId","activeIntervals","createGridClipPath","createPolarClipPath","sectorArea","clazzUtil","componentProto","splitList","Breadcrumb","animationUtil","DRAG_THRESHOLD","PATH_LABEL_NOAMAL","PATH_LABEL_EMPHASIS","PATH_UPPERLABEL_NORMAL","PATH_UPPERLABEL_EMPHASIS","Z_BASE","Z_BG","Z_CONTENT","getItemStyleEmphasis","getItemStyleNormal","createStorage","_breadcrumb","_state","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","renderContent","useUpperLabel","processInvisible","visualBorderColor","emphasisBorderColor","upperLabelWidth","prepareText","contentWidth","contentHeight","upperLabelRect","addDrillDownIcon","truncate","outerWidth","outerHeight","minChar","iconChar","lasts","prepareAnimationWhenHasOld","calculateZ","__tmDepth","__tmStorageName","prepareAnimationWhenNoOld","lastCfg","parentOldX","parentOldY","parentOldBg","zInLevel","zb","getAxisLineShape","rExtent","getRadiusIdx","fixAngleOverlap","firstItem","ticksAngles","minorTickAngles","_axisLine","rId","r0Id","_axisTick","tickAngleItem","_minorTick","tickAngles","_axisLabel","rawCategoryData","commonLabelModel","labelTextAlign","labelTextVerticalAlign","isLabelSilent","makeAxisEventDataBase","targetType","rawLabel","prevAngle","r1","number","format","ecHelper","parseGeoJSON","_List","_Model","_Axis","_env","ecUtil","util","ariaModel","seriesCnt","ariaLabel","maxDataCnt","maxSeriesCnt","displaySeriesCnt","getTitle","getConfig","seriesLabels","seriesCount","seriesLabel","seriesTpl","getSeriesTypeName","displayCnt","dataLabels","keyValues","userConfig","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","bleedMargin","truncateText","hasLabelRotate","minShowLabelRadian","labelLineLen2","x3","y3","singleAxisHelper","_axisSplitHelper","SingleAxisView","_whiskerBoxCommon","seriesModelMixin","CandlestickSeries","defaultValueDimensions","color0","borderColor0","animationUpdate","COORD_CONVERTS","INCLUDE_FINDER_MAIN_TYPES","targetInfoList","_targetInfoList","foundCpts","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","cartesians","panelRectBuilder","geoModels","axisConvert","rangeOrCoordRange","xminymin","xmaxymax","axisNameIndex","axisDiffProcessor","refer","scales","xyMinMaxCurr","xyMinMaxOrigin","sizeCurr","sizeOrigin","decode","json","UTF8Encoding","encodeScale","UTF8Scale","coordinates","encodeOffsets","c","coordinate","decodePolygon","c2","prevX","prevY","featureObj","setNodePosition","pieLayout","dr","rCenter","unitStartX","unitStartY","unitEndX","unitEndY","lessThanCircle","_visualEncoding","updateController","modelId","$from","getDataWithEncodedVisual","dataWithEncodedVisual","IRRELEVANT_EXCLUDES","targetCoordSysModel","topTarget","colorAll","labelDims","EFFECT_RIPPLE_NUMBER","updateRipplePath","rippleGroup","effectCfg","rippleEffectColor","ripplePath","effectSymbolProto","stopEffectAnimation","startEffectAnimation","effectOffset","rippleScale","animateStyle","updateEffectAnimation","oldEffectCfg","_effectCfg","DIFFICULT_PROPS","_parseSVG","parseSVG","makeViewBoxTransform","originRoot","buildGraphic","field","rootMap","originRootHostKey","svgXML","ignoreViewBox","ignoreRootClip","svgWidth","svgHeight","viewBoxRect","viewBoxTransform","elRoot","BOOST_SIZE_THRESHOLD","LargeSymbolPath","symbolProxy","softClipShape","symbolProxyShape","getContext","canBoost","afterBrush","setTransform","fillRect","restoreTransform","largeSymbolProto","endIndex","byteOffset","extrudeShadow","_traversalHelper","sep","commonLayout","coorX","coorY","finalCoor","QUERY_REG","_timelineOptions","_mediaList","_mediaDefault","_currentMediaIndices","_optionBackup","_newBaseOption","parseRawOption","rawOption","mediaDefault","timelineOptions","mediaList","media","singleMedia","preProcess","applyMediaQuery","realMap","aspectratio","applicatable","matched","operator","realAttr","compare","real","expect","indicesEquals","indices1","indices2","oldOption","newCptOpt","oldCptOpt","oldOptionBackup","newParsedOption","isRecreate","optionBackup","rootDepth","renderRollupNode","rPerLevel","rStart","rEnd","siblingAngle","isAsc","sortOrder","axisTrigger","collect","realIndex","paramsSet","reals","fakeValue","layoutInput","rParam","Cartesian","getAxesByScale","axisX","axisY","xScale","yScale","xAxisExtent","yAxisExtent","xExtent","yExtent","_dimName","_axisIndex","_valueWindow","_percentWindow","_dataExtent","_minMaxSpan","_dataZoomModel","calculateDataExtent","seriesExtent","fixExtentByAxis","isCategoryAxis","setAxisModel","isRestore","percentWindow","useOrigin","setMinMaxSpan","percentSpan","valueSpan","getOtherAxisModel","coordSysIndexName","foundOtherAxisModel","isCartesian","otherAxisModel","hasPropModeValue","boundPercent","boundValue","spans","restrictSet","fromWindow","toWindow","fromExtent","toExtent","toValue","dataWindow","leftOut","rightOut","thisHasValue","thisLeftOut","thisRightOut","isInWindow","originalLarge","originalProgressive","axesInfo","seriesInvolved","coordSysMap","collectAxesInfo","collectSeriesInfo","globalAxisPointerModel","linksOption","linkGroups","coordSysKey","makeKey","axesInfoInCoordSys","baseTooltipModel","saveTooltipAxisInfo","triggerAxis","cross","tooltipAxes","fromTooltip","axisPointerShow","isHandleTrigger","makeAxisPointerModel","involveSeries","groupIndex","getLinkGroupIndex","linkGroup","mapper","tooltipAxisPointerModel","volatileOption","labelOption","tooltipAxisPointerLabelShow","seriesTooltipTrigger","seriesTooltipShow","seriesDataCount","linkOption","checkPropInLink","linkPropValue","axisPropValue","GRADIENT_LEVELS","Heatmap","_gradientPixels","colorFunc","_getBrush","gradientInRange","_getGradient","gradientOutOfRange","globalAlpha","drawImage","imageData","getImageData","pixels","pixelLen","diffOpacity","gradientOffset","gradient","putImageData","brushCanvas","_brushCanvas","clearRect","beginPath","gradientPixels","pixelsSingleState","Uint8ClampedArray","processedMapType","mapSymbolOffsets","subMapSeries","dimAxisMapper","_axes","_dimList","_dataCoordConvert","input","dimList","SankeySeries","localPosition","rawDataOpt","layoutIterations","makeAction","PROXIMATE_ONE_DAY","Calendar","calendarModel","_rangeInfo","_sw","_sh","getFirstDayOfWeek","_firstDayOfWeek","getDateInfo","day","getDay","formatedDate","getNextNDay","setDate","_lineWidth","_getRangeInfo","_initRangeOption","whNames","cellNumbers","cellSizeSpecified","whGlobal","calendarRect","dayInfo","week","nthWeek","pointToDate","tl","tr","br","bl","nthX","nthY","_getDateByWeeksAndDay","setMonth","reversed","startDateNum","endDateNum","dateNum","fweek","lweek","nthDay","calendarList","calendarSeries","stackInfoMap","stackInfoList","stackInfo","stackResultDimension","stackedDimension","stackedByDimension","isStackedByIndex","calculateStack","targetStackInfo","idxInStack","resultVal","resultNaN","targetData","v0","byValue","stackedDataRawIndex","stackedOver","legendFilter","magicTypeLang","INNER_STACK_KEYWORD","MagicType","getIcons","availableIcons","icons","seriesOptGenreator","isStack","radioTypes","newTitle","generateNewSeriesTypes","newSeriesOpt","radio","currentType","AxisPointerView","fixClipWithShadow","vec2Min","vec2Max","v2Copy","cp0","isPointNull","drawSegment","segLen","allLen","smoothMin","smoothMax","drawMono","drawNonMono","prevIdx","prevP","ctrlLen","nextP","ratioNextSeg","lenPrevSeg","lenNextSeg","getBoundingBox","ptMin","ptMax","stackedOnBBox","PictorialBarSeries","sunburstLayout","previousZoom","fixX","fixY","_axesLayout","restrict","layoutAxisWithoutExpand","layoutLength","axisCount","axisNameAvailableWidth","axisLabelShow","layoutAxisWithExpand","nameTruncateMaxWidth","axisCollapseWidth","winInnerIndices","axisExpandWindow0Pos","axisExpandWindow","_updateAxesFromSeries","_makeLayoutInfo","axisBase","layoutBase","pixelDimIndex","pAxis","pLayout","_layoutAxes","winSize","layoutExtent","positionTable","rotationTable","axisCoordToPoint","dataDimensions","hasActiveSet","lenj","getActiveState","getSlidedAxisExpandWindow","behavior","pointCoord","triggerArea","useJump","PolarAxisModel","polarId","polarAxisDefaultExtendedOption","treemapVisual","treemapLayout","listComponentHelper","toolboxModel","featureOpts","_features","featureNames","_featureNames","processFeature","titleText","__title","makeFont","needPutOnTop","topOffset","oldName","isUserFeatureName","createIconPaths","iconName","iconPaths","iconStatus","iconStyleModel","iconStyleEmphasisModel","titles","defaultTextPosition","moveAnimation","propsEqual","lastProp","lastProps","newProps","equals","updateLabelShowHide","labelEl","getHandleTransProps","updateMandatoryProps","_group","_lastGraphicKey","_handle","_lastValue","_lastStatus","_payloadInfo","_axisModel","_axisPointerModel","_moveAnimation","determineAnimation","doUpdateProps","updatePointerEl","updateLabelEl","createPointerEl","createLabelEl","useSnap","pointerEl","handleModel","onmousedown","_onHandleDragMove","_onHandleDragEnd","includeStyles","_moveHandleToValue","_doDispatchAxisPointer","payloadInfo","doClear","buildLabel","xDimIndex","BoxplotView","constDim","updateNormalBoxData","BoxPath","TimelineModel","SliderTimelineModel","checkpointStyle","playIcon","stopIcon","nextIcon","prevIcon","colorQuery","opacityQuery","restoreLang","Restore","prepareCartesian2d","prepareGeo","prepareSingleAxis","preparePolar","prepareCalendar","ITEM_STYLE_NORMAL_PATH","ITEM_STYLE_EMPHASIS_PATH","LABEL_NORMAL","LABEL_EMPHASIS","GROUP_DIFF_PREFIX","prepareCustoms","getPathData","__customPathData","__customImagePath","__customText","__customGraphicType","updateEl","isRoot","transitionProps","prepareStyleTransition","targetOpacity","styleEmphasis","oldElStyle","makeRenderItem","customSeries","prepareResult","currDataIndexInside","currItemModel","currLabelNormalModel","currLabelEmphasisModel","currVisualColor","userAPI","barLayout","currentSeriesIndices","userParams","dataInsideLength","wrapEncodeDef","currDirty","updateCache","applyExtraBefore","applyExtraAfter","doCreateOrUpdate","simplyRemove","elOptionType","elOptionShape","hasOwnPathData","hasOwn","mergeChildren","newLen","$mergeChildren","byName","diffChildrenByName","diffGroupChildren","processAddUpdate","processRemove","childOption","dummyModel","stylePropName","useTransform","setIncrementalAndHoverLayer","elementName","makeCategoryLabels","makeRealNumberLabels","makeCategoryTicks","makeCategoryLabelsActually","labelCategoryInterval","numericLabelInterval","labelsCache","getListCache","optionLabelInterval","listCacheGet","makeLabelsByCustomizedCategoryInterval","makeAutoCategoryInterval","makeLabelsByNumericCategoryInterval","listCacheSet","tickCategoryInterval","ticksCache","optionTickInterval","labelsResult","autoInterval","fetchAutoCategoryIntervalCalculationParams","axisRotate","unitW","maxW","dw","axisExtend0","axisExtend1","categoryInterval","onlyTick","startTick","showAllLabel","includeMinLabel","includeMaxLabel","addItem","tVal","DUMMY_COMPONENT_NAME_PREFIX","subOpts","subOptName","newCptOptions","cptOption","idMap","existCpt","idNum","batchA","batchB","mapA","mapB","makeMap","mapToArray","sourceBatch","otherMap","otherDataIndices","isData","innerUniqueIndex","hostObj","parsedKey","queryType","queryParam","domSupported","_setting","_isBlank","_baseAxisDim","addOrdinal","xAxisType","yAxisType","baseAxisDimIndex","baseAxisType","otherAxisType","newOptionData","newItem","getNearestColorPalette","colors","paletteNum","colorIdx","colorNameMap","scopeFields","defaultColorPalette","layeredColorPalette","colorPalette","doneCallback","elExistsMap","fixPosition","renderPlanner","Chart","renderTaskPlan","renderTaskReset","toggleHighlight","chartProto","elSetState","childCount","progressMethodMap","forceFirstProgress","seriesItem","replacableOptionKeys","dataBound","contentColor","getTargetSeriesIndices","optionSeriesIndex","isMinMax","optDim","listDimensions","isCalculationCoord","completeSingle","defa","completeInactive","stateExist","stateAbsent","optExist","optAbsent","completeController","symbolExists","symbolSizeExists","modelHelper","illegalPoint","isIllegalPoint","inputAxesInfo","shouldHide","outputFinder","showValueMap","updaters","showPointer","showTooltip","coordSysContainsPoint","inputAxisInfo","findInputAxisInfo","processOnAxis","linkTriggers","tarAxisInfo","tarKey","srcAxisInfo","srcKey","srcValItem","makeMapperParam","updateModelActually","dispatchTooltipActually","dispatchHighDownActually","newValue","dontSnap","buildPayloadsBySeries","payloadBatch","snapToValue","seriesNestestValue","coordSysItem","coordSysId","coordSysIndex","coordSysMainType","outputAxesInfo","valItem","highDownKey","lastHighlights","newHighlights","toHighlight","toDownplay","setScrollDataIndex","parseXML","rawGeoJson","rawSpecialAreas","parsers","JSON","Function","groupSeriesByAxis","groupItem","calculateBase","layoutSingleSeries","boxOffsetList","boxWidthList","axisList","boundList","maxDataCount","boxWidthBound","availableWidth","boxGap","boxWidth","halfWidth","median","end1","end2","end4","end5","layEndLine","endCenter","upperCaseFirst","group1","replaceReg","replaceMap","'","TPL_VAR_ALIAS","wrapVar","varName","seriesIdx","paramsList","seriesLen","alias","formatTplSimple","pad","isUTC","utc","M","S","getTextBoundingRect","blank","opener","autoPlay","rewind","playInterval","_names","_initData","dataArr","idxArr","positionMap","directionMap","stackedByDimInfo","stackedDimInfo","byIndex","stackedCoordDimension","mayStack","stackedDimCoordDim","stackedDimType","stackedDimCoordIndex","stackedDim","targetDim","MONTH_TEXT","EN","CN","WEEK_TEXT","_tlpoints","_blpoints","_firstDayOfMonth","_firstDayPoints","rangeData","_renderDayRect","_renderLines","_renderYearText","_renderMonthText","_renderWeekText","itemRectStyleModel","sw","sh","addPoints","_getLinePointsOfOneWeek","_drawSplitline","_getEdgesPoints","rs","poyline","tmpD","_formatterLabel","_yearTextPositionControl","aligns","xc","yc","posPoints","yearText","_monthTextPositionControl","isCenter","termPoints","firstDayPoints","yyyy","yy","MM","monthText","_weekTextPositionControl","isStart","firstDayOfWeek","weekText","resizeGeo","leftTop","rightBottom","boxLayoutOption","useCenterAndSize","setGeoCoords","geoList","mapModelGroupBySeries","nameMapList","singleMapSeries","originRegionArr","regionsArr","pp","initialFriction","v12","nLen","repFact","handleSpan","originalDistSign","getSpanSign","extentMinSpan","realExtent","currDistSign","dataSample","treeLayout","diffData","diffResult","cmd","idx1","oldStackedOnPoints","newStackedOnPoints","oldCoordSys","newCoordSys","oldValueOrigin","newValueOrigin","currPoints","nextPoints","currStackedPoints","nextStackedPoints","sortedIndices","rawIndices","newDataOldCoordInfo","oldDataNewCoordInfo","diffItem","pointAdded","currentPt","nextPt","sortedCurrPoints","sortedNextPoints","sortedCurrStackedPoints","sortedNextStackedPoints","sortedStatus","stackedOnCurrent","stackedOnNext","SingleAxisPointer","getPointDimIndex","ScrollableLegendModel","pageButtonItemGap","pageIcons","pageIconColor","pageIconInactiveColor","pageTextStyle","_bbox","lineAnimationDiff","isPointsSame","points2","getBoundingDiff","min1","max1","getSmooth","getStackedOnPoints","turnPointsIntoStep","stepTurnAt","stepPoints","stepPt","stepPt2","getVisualGradient","stopLen","tinyExtent","minCoord","maxCoord","coordSpan","getIsIgnoreFunc","isAuto","canShowAllSymbolForCategory","categoryDataDim","labelMap","availSize","createLineClipPath","_lineGroup","isCoordSysPolar","prevCoordSys","_coordSys","_polyline","_polygon","isAreaChart","isIgnoreFunc","__temp","clipShapeForSymbol","_clipShapeForSymbol","_step","_newPolygon","isIgnore","_stackedOnPoints","_updateAnimation","_newPolyline","stackedOnSeries","_valueOrigin","__points","updatedDataInfo","diffStatus","ptIdx","contrastColor","axisCommon","CartesianAxisView","loopGeo","newRegion","parallelPreprocessor","CLICK_THRESHOLD","_handlers","_throttledDispatchExpand","_dispatchExpand","checkTrigger","_mouseDownPoint","mouseDownPoint","DEFAULT_OUT_OF_BRUSH_COLOR","BrushModel","brushMode","transformable","inBrush","outOfBrush","generateBrushOption","define","Task","_reset","_plan","_onDirty","_dirty","taskProto","planResult","upTask","_upstream","lastModBy","normalizeModBy","_modBy","lastModDataCount","_modDataCount","_dueEnd","_outputDueEnd","_progress","_dueIndex","doProgress","outputDueEnd","_settedOutputEnd","iterator","winCount","it","sStep","sCount","modNext","sequentialNext","taskIns","_callingProgress","downstream","_downstream","downTask","normalizeRect","localPoints","specifiedXYIndex","brushWidth","targetModel","localCursorPoint","TEXT_PADDING","ITEM_GAP","ARRAY_LENGTH","makeItemPoints","packEventData","itemNode","selfType","normalStyleModel","layoutParam","totalWidth","renderList","_prepare","_renderContent","lastX","availableSize","getAvailableSize","dataStatistics","statisticType","mapKey","seriesGroups","hostGeoModel","seriesList","symbolCtor","_symbolCtor","symbolDrawProto","normalizeUpdateOpt","SymbolCtor","enableAnimation","PieSeries","_createSelectableList","minShowLabelAngle","hoverOffset","avoidLabelOverlap","alignTo","distanceToLabelLine","HV_NAMES","boxLayout","maxHeight","currentLineMaxSize","nextX","nextY","nextChild","nextChildRect","moveX","moveY","vbox","hbox","containerRect","verticalMargin","horizontalMargin","needLocalTransform","elPos","targetOption","hResult","vResult","newParams","newValueCount","merged","mergedValueCount","enoughParamNumber","hasProp","boxplotVisual","boxplotLayout","matrixUtil","_vector","dumbGroup","_transform","_dumbGroup","hasBuilder","builders","pt1","pt2","arrows","arrowSize","arrowOffset","symbolWidth","symbolHeight","axisTickLabel","ticksEls","buildAxisMajorTicks","labelEls","buildAxisLabel","fixMinMaxLabelShow","buildAxisMinorTicks","gapSignal","isNameLocationCenter","nameRotation","endTextLayout","truncateOpt","truncatedText","__fullText","__truncatedText","axisRotation","rotationDiff","textRotate","onLeft","tickEls","firstLabel","nextLabel","lastLabel","prevLabel","firstTick","lastTick","ignoreEl","isTwoLabelOverlapped","firstRect","nextRect","mRotationBack","createTicks","tickTransform","tickEndCoord","aniid","tickEl","minorTickLineStyle","minorTicksEls","itemLabelModel","compatStyle","overwrite","compatLayoutProperties","LAYOUT_PROPERTIES","COMPATITABLE_COMPONENTS","clipOverflow","clockWise","pointerColor","dataRange","componentName","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","endCreating","creatingCover","coverRenderer","getCoverRenderer","updateCoverShape","updateCoverAfterCreation","getPanelByPoint","panel","panels","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","_radiusAxis","_angleAxis","maxAngle","d2","Gradient","colorAccessPath","colorCallback","borderColorAccessPath","samplers","nearest","indexSampler","sampler","PATH_COLOR","BoxplotSeries","brushLang","Brush","_brushMode","isBrushed","command","styleModel","paddings","confineInContainer","bgColor","axisDimension"],"mappings":"kGAoBA,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,G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Z,EAAGa,EAAYC,GAClD,MAAO,CACL9D,GAAIA,EACJC,GAAIA,EACJ2D,GAAIA,EACJZ,EAAGA,EACHa,WAAYA,EACZC,SAAUA,EACVyL,WAAW,GAIfl5C,EAAQ67G,aAAeA,EACvB77G,EAAQ60I,mBAAqBA,EAC7B70I,EAAQ8tG,cAAgBA,EACxB9tG,EAAQo8G,uBAAyBA,EACjCp8G,EAAQi8G,kCAAoCA,EAC5Cj8G,EAAQ28G,cAAgBA,EACxB38G,EAAQ88G,cAAgBA,EACxB98G,EAAQ+0I,gBAAkBA","file":"static/js/npm.echarts.5d4cc6a1.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\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 * Can only be called after coordinate system creation stage.\n * (Can be called before coordinate system update stage).\n *\n * @param {Object} opt {labelInside}\n * @return {Object} {\n * position, rotation, labelDirection, labelOffset,\n * tickDirection, labelRotate, z2\n * }\n */\nfunction layout(gridModel, axisModel, opt) {\n opt = opt || {};\n var grid = gridModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0];\n var rawAxisPosition = axis.position;\n var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition;\n var axisDim = axis.dim;\n var rect = grid.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var idx = {\n left: 0,\n right: 1,\n top: 0,\n bottom: 1,\n onZero: 2\n };\n var axisOffset = axisModel.get('offset') || 0;\n var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset];\n\n if (otherAxisOnZeroOf) {\n var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0));\n posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]);\n } // Axis position\n\n\n layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]]; // Axis rotation\n\n layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1); // Tick and label direction, x y is axisDim\n\n var dirMap = {\n top: -1,\n bottom: 1,\n left: -1,\n right: 1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition];\n layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0;\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 } // Special label rotation\n\n\n var labelRotate = axisModel.get('axisLabel.rotate');\n layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate; // Over splitLine and splitArea\n\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\nrequire(\"../coord/cartesian/Grid\");\n\nrequire(\"./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// Grid view\necharts.extendComponentView({\n type: 'grid',\n render: function (gridModel, ecModel) {\n this.group.removeAll();\n\n if (gridModel.get('show')) {\n this.group.add(new graphic.Rect({\n shape: gridModel.coordinateSystem.getRect(),\n style: zrUtil.defaults({\n fill: gridModel.get('backgroundColor')\n }, gridModel.getItemStyle()),\n silent: true,\n z2: -1\n }));\n }\n }\n});\necharts.registerPreprocessor(function (option) {\n // Only create grid when need\n if (option.xAxis && option.yAxis && !option.grid) {\n option.grid = {};\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 * 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 ComponentModel = require(\"../model/Component\");\n\nvar ComponentView = require(\"../view/Component\");\n\nvar _sourceHelper = require(\"../data/helper/sourceHelper\");\n\nvar detectSourceFormat = _sourceHelper.detectSourceFormat;\n\nvar _sourceType = require(\"../data/helper/sourceType\");\n\nvar SERIES_LAYOUT_BY_COLUMN = _sourceType.SERIES_LAYOUT_BY_COLUMN;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * This module is imported by echarts directly.\n *\n * Notice:\n * Always keep this file exists for backward compatibility.\n * Because before 4.1.0, dataset is an optional component,\n * some users may import this module manually.\n */\nComponentModel.extend({\n type: 'dataset',\n\n /**\n * @protected\n */\n defaultOption: {\n // 'row', 'column'\n seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN,\n // null/'auto': auto detect header, see \"module:echarts/data/helper/sourceHelper\"\n sourceHeader: null,\n dimensions: null,\n source: null\n },\n optionUpdated: function () {\n detectSourceFormat(this);\n }\n});\nComponentView.extend({\n type: 'dataset'\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar _model = require(\"../../util/model\");\n\nvar makeInner = _model.makeInner;\nvar getDataItemValue = _model.getDataItemValue;\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar createHashMap = _util.createHashMap;\nvar each = _util.each;\nvar map = _util.map;\nvar isArray = _util.isArray;\nvar isString = _util.isString;\nvar isObject = _util.isObject;\nvar isTypedArray = _util.isTypedArray;\nvar isArrayLike = _util.isArrayLike;\nvar extend = _util.extend;\nvar assert = _util.assert;\n\nvar Source = require(\"../Source\");\n\nvar _sourceType = require(\"./sourceType\");\n\nvar SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL;\nvar SOURCE_FORMAT_ARRAY_ROWS = _sourceType.SOURCE_FORMAT_ARRAY_ROWS;\nvar SOURCE_FORMAT_OBJECT_ROWS = _sourceType.SOURCE_FORMAT_OBJECT_ROWS;\nvar SOURCE_FORMAT_KEYED_COLUMNS = _sourceType.SOURCE_FORMAT_KEYED_COLUMNS;\nvar SOURCE_FORMAT_UNKNOWN = _sourceType.SOURCE_FORMAT_UNKNOWN;\nvar SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY;\nvar SERIES_LAYOUT_BY_ROW = _sourceType.SERIES_LAYOUT_BY_ROW;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// The result of `guessOrdinal`.\nvar BE_ORDINAL = {\n Must: 1,\n // Encounter string but not '-' and not number-like.\n Might: 2,\n // Encounter string but number-like.\n Not: 3 // Other cases\n\n};\nvar inner = makeInner();\n/**\n * @see {module:echarts/data/Source}\n * @param {module:echarts/component/dataset/DatasetModel} datasetModel\n * @return {string} sourceFormat\n */\n\nfunction detectSourceFormat(datasetModel) {\n var data = datasetModel.option.source;\n var sourceFormat = SOURCE_FORMAT_UNKNOWN;\n\n if (isTypedArray(data)) {\n sourceFormat = SOURCE_FORMAT_TYPED_ARRAY;\n } else if (isArray(data)) {\n // FIXME Whether tolerate null in top level array?\n if (data.length === 0) {\n sourceFormat = SOURCE_FORMAT_ARRAY_ROWS;\n }\n\n for (var i = 0, len = data.length; i < len; i++) {\n var item = data[i];\n\n if (item == null) {\n continue;\n } else if (isArray(item)) {\n sourceFormat = SOURCE_FORMAT_ARRAY_ROWS;\n break;\n } else if (isObject(item)) {\n sourceFormat = SOURCE_FORMAT_OBJECT_ROWS;\n break;\n }\n }\n } else if (isObject(data)) {\n for (var key in data) {\n if (data.hasOwnProperty(key) && isArrayLike(data[key])) {\n sourceFormat = SOURCE_FORMAT_KEYED_COLUMNS;\n break;\n }\n }\n } else if (data != null) {\n throw new Error('Invalid data');\n }\n\n inner(datasetModel).sourceFormat = sourceFormat;\n}\n/**\n * [Scenarios]:\n * (1) Provide source data directly:\n * series: {\n * encode: {...},\n * dimensions: [...]\n * seriesLayoutBy: 'row',\n * data: [[...]]\n * }\n * (2) Refer to datasetModel.\n * series: [{\n * encode: {...}\n * // Ignore datasetIndex means `datasetIndex: 0`\n * // and the dimensions defination in dataset is used\n * }, {\n * encode: {...},\n * seriesLayoutBy: 'column',\n * datasetIndex: 1\n * }]\n *\n * Get data from series itself or datset.\n * @return {module:echarts/data/Source} source\n */\n\n\nfunction getSource(seriesModel) {\n return inner(seriesModel).source;\n}\n/**\n * MUST be called before mergeOption of all series.\n * @param {module:echarts/model/Global} ecModel\n */\n\n\nfunction resetSourceDefaulter(ecModel) {\n // `datasetMap` is used to make default encode.\n inner(ecModel).datasetMap = createHashMap();\n}\n/**\n * [Caution]:\n * MUST be called after series option merged and\n * before \"series.getInitailData()\" called.\n *\n * [The rule of making default encode]:\n * Category axis (if exists) alway map to the first dimension.\n * Each other axis occupies a subsequent dimension.\n *\n * [Why make default encode]:\n * Simplify the typing of encode in option, avoiding the case like that:\n * series: [{encode: {x: 0, y: 1}}, {encode: {x: 0, y: 2}}, {encode: {x: 0, y: 3}}],\n * where the \"y\" have to be manually typed as \"1, 2, 3, ...\".\n *\n * @param {module:echarts/model/Series} seriesModel\n */\n\n\nfunction prepareSource(seriesModel) {\n var seriesOption = seriesModel.option;\n var data = seriesOption.data;\n var sourceFormat = isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL;\n var fromDataset = false;\n var seriesLayoutBy = seriesOption.seriesLayoutBy;\n var sourceHeader = seriesOption.sourceHeader;\n var dimensionsDefine = seriesOption.dimensions;\n var datasetModel = getDatasetModel(seriesModel);\n\n if (datasetModel) {\n var datasetOption = datasetModel.option;\n data = datasetOption.source;\n sourceFormat = inner(datasetModel).sourceFormat;\n fromDataset = true; // These settings from series has higher priority.\n\n seriesLayoutBy = seriesLayoutBy || datasetOption.seriesLayoutBy;\n sourceHeader == null && (sourceHeader = datasetOption.sourceHeader);\n dimensionsDefine = dimensionsDefine || datasetOption.dimensions;\n }\n\n var completeResult = completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine);\n inner(seriesModel).source = new Source({\n data: data,\n fromDataset: fromDataset,\n seriesLayoutBy: seriesLayoutBy,\n sourceFormat: sourceFormat,\n dimensionsDefine: completeResult.dimensionsDefine,\n startIndex: completeResult.startIndex,\n dimensionsDetectCount: completeResult.dimensionsDetectCount,\n // Note: dataset option does not have `encode`.\n encodeDefine: seriesOption.encode\n });\n} // return {startIndex, dimensionsDefine, dimensionsCount}\n\n\nfunction completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine) {\n if (!data) {\n return {\n dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine)\n };\n }\n\n var dimensionsDetectCount;\n var startIndex;\n\n if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {\n // Rule: Most of the first line are string: it is header.\n // Caution: consider a line with 5 string and 1 number,\n // it still can not be sure it is a head, because the\n // 5 string may be 5 values of category columns.\n if (sourceHeader === 'auto' || sourceHeader == null) {\n arrayRowsTravelFirst(function (val) {\n // '-' is regarded as null/undefined.\n if (val != null && val !== '-') {\n if (isString(val)) {\n startIndex == null && (startIndex = 1);\n } else {\n startIndex = 0;\n }\n } // 10 is an experience number, avoid long loop.\n\n }, seriesLayoutBy, data, 10);\n } else {\n startIndex = sourceHeader ? 1 : 0;\n }\n\n if (!dimensionsDefine && startIndex === 1) {\n dimensionsDefine = [];\n arrayRowsTravelFirst(function (val, index) {\n dimensionsDefine[index] = val != null ? val : '';\n }, seriesLayoutBy, data);\n }\n\n dimensionsDetectCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === SERIES_LAYOUT_BY_ROW ? data.length : data[0] ? data[0].length : null;\n } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n if (!dimensionsDefine) {\n dimensionsDefine = objectRowsCollectDimensions(data);\n }\n } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n if (!dimensionsDefine) {\n dimensionsDefine = [];\n each(data, function (colArr, key) {\n dimensionsDefine.push(key);\n });\n }\n } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n var value0 = getDataItemValue(data[0]);\n dimensionsDetectCount = isArray(value0) && value0.length || 1;\n } else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {}\n\n return {\n startIndex: startIndex,\n dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine),\n dimensionsDetectCount: dimensionsDetectCount\n };\n} // Consider dimensions defined like ['A', 'price', 'B', 'price', 'C', 'price'],\n// which is reasonable. But dimension name is duplicated.\n// Returns undefined or an array contains only object without null/undefiend or string.\n\n\nfunction normalizeDimensionsDefine(dimensionsDefine) {\n if (!dimensionsDefine) {\n // The meaning of null/undefined is different from empty array.\n return;\n }\n\n var nameMap = createHashMap();\n return map(dimensionsDefine, function (item, index) {\n item = extend({}, isObject(item) ? item : {\n name: item\n }); // User can set null in dimensions.\n // We dont auto specify name, othewise a given name may\n // cause it be refered unexpectedly.\n\n if (item.name == null) {\n return item;\n } // Also consider number form like 2012.\n\n\n item.name += ''; // User may also specify displayName.\n // displayName will always exists except user not\n // specified or dim name is not specified or detected.\n // (A auto generated dim name will not be used as\n // displayName).\n\n if (item.displayName == null) {\n item.displayName = item.name;\n }\n\n var exist = nameMap.get(item.name);\n\n if (!exist) {\n nameMap.set(item.name, {\n count: 1\n });\n } else {\n item.name += '-' + exist.count++;\n }\n\n return item;\n });\n}\n\nfunction arrayRowsTravelFirst(cb, seriesLayoutBy, data, maxLoop) {\n maxLoop == null && (maxLoop = Infinity);\n\n if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) {\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n cb(data[i] ? data[i][0] : null, i);\n }\n } else {\n var value0 = data[0] || [];\n\n for (var i = 0; i < value0.length && i < maxLoop; i++) {\n cb(value0[i], i);\n }\n }\n}\n\nfunction objectRowsCollectDimensions(data) {\n var firstIndex = 0;\n var obj;\n\n while (firstIndex < data.length && !(obj = data[firstIndex++])) {} // jshint ignore: line\n\n\n if (obj) {\n var dimensions = [];\n each(obj, function (value, key) {\n dimensions.push(key);\n });\n return dimensions;\n }\n}\n/**\n * [The strategy of the arrengment of data dimensions for dataset]:\n * \"value way\": all axes are non-category axes. So series one by one take\n * several (the number is coordSysDims.length) dimensions from dataset.\n * The result of data arrengment of data dimensions like:\n * | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | ser2_y |\n * \"category way\": at least one axis is category axis. So the the first data\n * dimension is always mapped to the first category axis and shared by\n * all of the series. The other data dimensions are taken by series like\n * \"value way\" does.\n * The result of data arrengment of data dimensions like:\n * | ser_shared_x | ser0_y | ser1_y | ser2_y |\n *\n * @param {Array.} coordDimensions [{name: , type: , dimsDef: }, ...]\n * @param {module:model/Series} seriesModel\n * @param {module:data/Source} source\n * @return {Object} encode Never be `null/undefined`.\n */\n\n\nfunction makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {\n var encode = {};\n var datasetModel = getDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur.\n\n if (!datasetModel || !coordDimensions) {\n return encode;\n }\n\n var encodeItemName = [];\n var encodeSeriesName = [];\n var ecModel = seriesModel.ecModel;\n var datasetMap = inner(ecModel).datasetMap;\n var key = datasetModel.uid + '_' + source.seriesLayoutBy;\n var baseCategoryDimIndex;\n var categoryWayValueDimStart;\n coordDimensions = coordDimensions.slice();\n each(coordDimensions, function (coordDimInfo, coordDimIdx) {\n !isObject(coordDimInfo) && (coordDimensions[coordDimIdx] = {\n name: coordDimInfo\n });\n\n if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) {\n baseCategoryDimIndex = coordDimIdx;\n categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimensions[coordDimIdx]);\n }\n\n encode[coordDimInfo.name] = [];\n });\n var datasetRecord = datasetMap.get(key) || datasetMap.set(key, {\n categoryWayDim: categoryWayValueDimStart,\n valueWayDim: 0\n }); // TODO\n // Auto detect first time axis and do arrangement.\n\n each(coordDimensions, function (coordDimInfo, coordDimIdx) {\n var coordDimName = coordDimInfo.name;\n var count = getDataDimCountOnCoordDim(coordDimInfo); // In value way.\n\n if (baseCategoryDimIndex == null) {\n var start = datasetRecord.valueWayDim;\n pushDim(encode[coordDimName], start, count);\n pushDim(encodeSeriesName, start, count);\n datasetRecord.valueWayDim += count; // ??? TODO give a better default series name rule?\n // especially when encode x y specified.\n // consider: when mutiple series share one dimension\n // category axis, series name should better use\n // the other dimsion name. On the other hand, use\n // both dimensions name.\n } // In category way, the first category axis.\n else if (baseCategoryDimIndex === coordDimIdx) {\n pushDim(encode[coordDimName], 0, count);\n pushDim(encodeItemName, 0, count);\n } // In category way, the other axis.\n else {\n var start = datasetRecord.categoryWayDim;\n pushDim(encode[coordDimName], start, count);\n pushDim(encodeSeriesName, start, count);\n datasetRecord.categoryWayDim += count;\n }\n });\n\n function pushDim(dimIdxArr, idxFrom, idxCount) {\n for (var i = 0; i < idxCount; i++) {\n dimIdxArr.push(idxFrom + i);\n }\n }\n\n function getDataDimCountOnCoordDim(coordDimInfo) {\n var dimsDef = coordDimInfo.dimsDef;\n return dimsDef ? dimsDef.length : 1;\n }\n\n encodeItemName.length && (encode.itemName = encodeItemName);\n encodeSeriesName.length && (encode.seriesName = encodeSeriesName);\n return encode;\n}\n/**\n * Work for data like [{name: ..., value: ...}, ...].\n *\n * @param {module:model/Series} seriesModel\n * @param {module:data/Source} source\n * @return {Object} encode Never be `null/undefined`.\n */\n\n\nfunction makeSeriesEncodeForNameBased(seriesModel, source, dimCount) {\n var encode = {};\n var datasetModel = getDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur.\n\n if (!datasetModel) {\n return encode;\n }\n\n var sourceFormat = source.sourceFormat;\n var dimensionsDefine = source.dimensionsDefine;\n var potentialNameDimIndex;\n\n if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS || sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n each(dimensionsDefine, function (dim, idx) {\n if ((isObject(dim) ? dim.name : dim) === 'name') {\n potentialNameDimIndex = idx;\n }\n });\n } // idxResult: {v, n}.\n\n\n var idxResult = function () {\n var idxRes0 = {};\n var idxRes1 = {};\n var guessRecords = []; // 5 is an experience value.\n\n for (var i = 0, len = Math.min(5, dimCount); i < len; i++) {\n var guessResult = doGuessOrdinal(source.data, sourceFormat, source.seriesLayoutBy, dimensionsDefine, source.startIndex, i);\n guessRecords.push(guessResult);\n var isPureNumber = guessResult === BE_ORDINAL.Not; // [Strategy of idxRes0]: find the first BE_ORDINAL.Not as the value dim,\n // and then find a name dim with the priority:\n // \"BE_ORDINAL.Might|BE_ORDINAL.Must\" > \"other dim\" > \"the value dim itself\".\n\n if (isPureNumber && idxRes0.v == null && i !== potentialNameDimIndex) {\n idxRes0.v = i;\n }\n\n if (idxRes0.n == null || idxRes0.n === idxRes0.v || !isPureNumber && guessRecords[idxRes0.n] === BE_ORDINAL.Not) {\n idxRes0.n = i;\n }\n\n if (fulfilled(idxRes0) && guessRecords[idxRes0.n] !== BE_ORDINAL.Not) {\n return idxRes0;\n } // [Strategy of idxRes1]: if idxRes0 not satisfied (that is, no BE_ORDINAL.Not),\n // find the first BE_ORDINAL.Might as the value dim,\n // and then find a name dim with the priority:\n // \"other dim\" > \"the value dim itself\".\n // That is for backward compat: number-like (e.g., `'3'`, `'55'`) can be\n // treated as number.\n\n\n if (!isPureNumber) {\n if (guessResult === BE_ORDINAL.Might && idxRes1.v == null && i !== potentialNameDimIndex) {\n idxRes1.v = i;\n }\n\n if (idxRes1.n == null || idxRes1.n === idxRes1.v) {\n idxRes1.n = i;\n }\n }\n }\n\n function fulfilled(idxResult) {\n return idxResult.v != null && idxResult.n != null;\n }\n\n return fulfilled(idxRes0) ? idxRes0 : fulfilled(idxRes1) ? idxRes1 : null;\n }();\n\n if (idxResult) {\n encode.value = idxResult.v; // `potentialNameDimIndex` has highest priority.\n\n var nameDimIndex = potentialNameDimIndex != null ? potentialNameDimIndex : idxResult.n; // By default, label use itemName in charts.\n // So we dont set encodeLabel here.\n\n encode.itemName = [nameDimIndex];\n encode.seriesName = [nameDimIndex];\n }\n\n return encode;\n}\n/**\n * If return null/undefined, indicate that should not use datasetModel.\n */\n\n\nfunction getDatasetModel(seriesModel) {\n var option = seriesModel.option; // Caution: consider the scenario:\n // A dataset is declared and a series is not expected to use the dataset,\n // and at the beginning `setOption({series: { noData })` (just prepare other\n // option but no data), then `setOption({series: {data: [...]}); In this case,\n // the user should set an empty array to avoid that dataset is used by default.\n\n var thisData = option.data;\n\n if (!thisData) {\n return seriesModel.ecModel.getComponent('dataset', option.datasetIndex || 0);\n }\n}\n/**\n * The rule should not be complex, otherwise user might not\n * be able to known where the data is wrong.\n * The code is ugly, but how to make it neat?\n *\n * @param {module:echars/data/Source} source\n * @param {number} dimIndex\n * @return {BE_ORDINAL} guess result.\n */\n\n\nfunction guessOrdinal(source, dimIndex) {\n return doGuessOrdinal(source.data, source.sourceFormat, source.seriesLayoutBy, source.dimensionsDefine, source.startIndex, dimIndex);\n} // dimIndex may be overflow source data.\n// return {BE_ORDINAL}\n\n\nfunction doGuessOrdinal(data, sourceFormat, seriesLayoutBy, dimensionsDefine, startIndex, dimIndex) {\n var result; // Experience value.\n\n var maxLoop = 5;\n\n if (isTypedArray(data)) {\n return BE_ORDINAL.Not;\n } // When sourceType is 'objectRows' or 'keyedColumns', dimensionsDefine\n // always exists in source.\n\n\n var dimName;\n var dimType;\n\n if (dimensionsDefine) {\n var dimDefItem = dimensionsDefine[dimIndex];\n\n if (isObject(dimDefItem)) {\n dimName = dimDefItem.name;\n dimType = dimDefItem.type;\n } else if (isString(dimDefItem)) {\n dimName = dimDefItem;\n }\n }\n\n if (dimType != null) {\n return dimType === 'ordinal' ? BE_ORDINAL.Must : BE_ORDINAL.Not;\n }\n\n if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {\n if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) {\n var sample = data[dimIndex];\n\n for (var i = 0; i < (sample || []).length && i < maxLoop; i++) {\n if ((result = detectValue(sample[startIndex + i])) != null) {\n return result;\n }\n }\n } else {\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n var row = data[startIndex + i];\n\n if (row && (result = detectValue(row[dimIndex])) != null) {\n return result;\n }\n }\n }\n } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n if (!dimName) {\n return BE_ORDINAL.Not;\n }\n\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n var item = data[i];\n\n if (item && (result = detectValue(item[dimName])) != null) {\n return result;\n }\n }\n } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n if (!dimName) {\n return BE_ORDINAL.Not;\n }\n\n var sample = data[dimName];\n\n if (!sample || isTypedArray(sample)) {\n return BE_ORDINAL.Not;\n }\n\n for (var i = 0; i < sample.length && i < maxLoop; i++) {\n if ((result = detectValue(sample[i])) != null) {\n return result;\n }\n }\n } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n for (var i = 0; i < data.length && i < maxLoop; i++) {\n var item = data[i];\n var val = getDataItemValue(item);\n\n if (!isArray(val)) {\n return BE_ORDINAL.Not;\n }\n\n if ((result = detectValue(val[dimIndex])) != null) {\n return result;\n }\n }\n }\n\n function detectValue(val) {\n var beStr = isString(val); // Consider usage convenience, '1', '2' will be treated as \"number\".\n // `isFinit('')` get `true`.\n\n if (val != null && isFinite(val) && val !== '') {\n return beStr ? BE_ORDINAL.Might : BE_ORDINAL.Not;\n } else if (beStr && val !== '-') {\n return BE_ORDINAL.Must;\n }\n }\n\n return BE_ORDINAL.Not;\n}\n\nexports.BE_ORDINAL = BE_ORDINAL;\nexports.detectSourceFormat = detectSourceFormat;\nexports.getSource = getSource;\nexports.resetSourceDefaulter = resetSourceDefaulter;\nexports.prepareSource = prepareSource;\nexports.makeSeriesEncodeForAxisCoordSys = makeSeriesEncodeForAxisCoordSys;\nexports.makeSeriesEncodeForNameBased = makeSeriesEncodeForNameBased;\nexports.guessOrdinal = guessOrdinal;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 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*/\n\n/**\n * @param {Object} finder contains {seriesIndex, dataIndex, dataIndexInside}\n * @param {module:echarts/model/Global} ecModel\n * @return {Object} {point: [x, y], el: ...} point Will not be null.\n */\nfunction _default(finder, ecModel) {\n var point = [];\n var seriesIndex = finder.seriesIndex;\n var seriesModel;\n\n if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) {\n return {\n point: []\n };\n }\n\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, finder);\n\n if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) {\n return {\n point: []\n };\n }\n\n var el = data.getItemGraphicEl(dataIndex);\n var coordSys = seriesModel.coordinateSystem;\n\n if (seriesModel.getTooltipPosition) {\n point = seriesModel.getTooltipPosition(dataIndex) || [];\n } else if (coordSys && coordSys.dataToPoint) {\n point = coordSys.dataToPoint(data.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex, true)) || [];\n } else if (el) {\n // Use graphic bounding rect\n var rect = el.getBoundingRect().clone();\n rect.applyTransform(el.transform);\n point = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n }\n\n return {\n point: point,\n el: el\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 _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar graphic = require(\"../../util/graphic\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar _labelHelper = require(\"./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*/\n\n/**\n * @module echarts/chart/helper/Symbol\n */\n\n/**\n * @constructor\n * @alias {module:echarts/chart/helper/Symbol}\n * @param {module:echarts/data/List} data\n * @param {number} idx\n * @extends {module:zrender/graphic/Group}\n */\nfunction SymbolClz(data, idx, seriesScope) {\n graphic.Group.call(this);\n this.updateData(data, idx, seriesScope);\n}\n\nvar symbolProto = SymbolClz.prototype;\n/**\n * @public\n * @static\n * @param {module:echarts/data/List} data\n * @param {number} dataIndex\n * @return {Array.} [width, height]\n */\n\nvar getSymbolSize = SymbolClz.getSymbolSize = function (data, idx) {\n var symbolSize = data.getItemVisual(idx, 'symbolSize');\n return symbolSize instanceof Array ? symbolSize.slice() : [+symbolSize, +symbolSize];\n};\n\nfunction getScale(symbolSize) {\n return [symbolSize[0] / 2, symbolSize[1] / 2];\n}\n\nfunction driftSymbol(dx, dy) {\n this.parent.drift(dx, dy);\n}\n\nsymbolProto._createSymbol = function (symbolType, data, idx, symbolSize, keepAspect) {\n // Remove paths created before\n this.removeAll();\n var color = data.getItemVisual(idx, 'color'); // var symbolPath = createSymbol(\n // symbolType, -0.5, -0.5, 1, 1, color\n // );\n // If width/height are set too small (e.g., set to 1) on ios10\n // and macOS Sierra, a circle stroke become a rect, no matter what\n // the scale is set. So we set width/height as 2. See #4150.\n\n var symbolPath = createSymbol(symbolType, -1, -1, 2, 2, color, keepAspect);\n symbolPath.attr({\n z2: 100,\n culling: true,\n scale: getScale(symbolSize)\n }); // Rewrite drift method\n\n symbolPath.drift = driftSymbol;\n this._symbolType = symbolType;\n this.add(symbolPath);\n};\n/**\n * Stop animation\n * @param {boolean} toLastFrame\n */\n\n\nsymbolProto.stopSymbolAnimation = function (toLastFrame) {\n this.childAt(0).stopAnimation(toLastFrame);\n};\n/**\n * FIXME:\n * Caution: This method breaks the encapsulation of this module,\n * but it indeed brings convenience. So do not use the method\n * unless you detailedly know all the implements of `Symbol`,\n * especially animation.\n *\n * Get symbol path element.\n */\n\n\nsymbolProto.getSymbolPath = function () {\n return this.childAt(0);\n};\n/**\n * Get scale(aka, current symbol size).\n * Including the change caused by animation\n */\n\n\nsymbolProto.getScale = function () {\n return this.childAt(0).scale;\n};\n/**\n * Highlight symbol\n */\n\n\nsymbolProto.highlight = function () {\n this.childAt(0).trigger('emphasis');\n};\n/**\n * Downplay symbol\n */\n\n\nsymbolProto.downplay = function () {\n this.childAt(0).trigger('normal');\n};\n/**\n * @param {number} zlevel\n * @param {number} z\n */\n\n\nsymbolProto.setZ = function (zlevel, z) {\n var symbolPath = this.childAt(0);\n symbolPath.zlevel = zlevel;\n symbolPath.z = z;\n};\n\nsymbolProto.setDraggable = function (draggable) {\n var symbolPath = this.childAt(0);\n symbolPath.draggable = draggable;\n symbolPath.cursor = draggable ? 'move' : symbolPath.cursor;\n};\n/**\n * Update symbol properties\n * @param {module:echarts/data/List} data\n * @param {number} idx\n * @param {Object} [seriesScope]\n * @param {Object} [seriesScope.itemStyle]\n * @param {Object} [seriesScope.hoverItemStyle]\n * @param {Object} [seriesScope.symbolRotate]\n * @param {Object} [seriesScope.symbolOffset]\n * @param {module:echarts/model/Model} [seriesScope.labelModel]\n * @param {module:echarts/model/Model} [seriesScope.hoverLabelModel]\n * @param {boolean} [seriesScope.hoverAnimation]\n * @param {Object} [seriesScope.cursorStyle]\n * @param {module:echarts/model/Model} [seriesScope.itemModel]\n * @param {string} [seriesScope.symbolInnerColor]\n * @param {Object} [seriesScope.fadeIn=false]\n */\n\n\nsymbolProto.updateData = function (data, idx, seriesScope) {\n this.silent = false;\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var seriesModel = data.hostModel;\n var symbolSize = getSymbolSize(data, idx);\n var isInit = symbolType !== this._symbolType;\n\n if (isInit) {\n var keepAspect = data.getItemVisual(idx, 'symbolKeepAspect');\n\n this._createSymbol(symbolType, data, idx, symbolSize, keepAspect);\n } else {\n var symbolPath = this.childAt(0);\n symbolPath.silent = false;\n graphic.updateProps(symbolPath, {\n scale: getScale(symbolSize)\n }, seriesModel, idx);\n }\n\n this._updateCommon(data, idx, symbolSize, seriesScope);\n\n if (isInit) {\n var symbolPath = this.childAt(0);\n var fadeIn = seriesScope && seriesScope.fadeIn;\n var target = {\n scale: symbolPath.scale.slice()\n };\n fadeIn && (target.style = {\n opacity: symbolPath.style.opacity\n });\n symbolPath.scale = [0, 0];\n fadeIn && (symbolPath.style.opacity = 0);\n graphic.initProps(symbolPath, target, seriesModel, idx);\n }\n\n this._seriesModel = seriesModel;\n}; // Update common properties\n\n\nvar normalStyleAccessPath = ['itemStyle'];\nvar emphasisStyleAccessPath = ['emphasis', 'itemStyle'];\nvar normalLabelAccessPath = ['label'];\nvar emphasisLabelAccessPath = ['emphasis', 'label'];\n/**\n * @param {module:echarts/data/List} data\n * @param {number} idx\n * @param {Array.} symbolSize\n * @param {Object} [seriesScope]\n */\n\nsymbolProto._updateCommon = function (data, idx, symbolSize, seriesScope) {\n var symbolPath = this.childAt(0);\n var seriesModel = data.hostModel;\n var color = data.getItemVisual(idx, 'color'); // Reset style\n\n if (symbolPath.type !== 'image') {\n symbolPath.useStyle({\n strokeNoScale: true\n });\n } else {\n symbolPath.setStyle({\n opacity: 1,\n shadowBlur: null,\n shadowOffsetX: null,\n shadowOffsetY: null,\n shadowColor: null\n });\n }\n\n var itemStyle = seriesScope && seriesScope.itemStyle;\n var hoverItemStyle = seriesScope && seriesScope.hoverItemStyle;\n var symbolOffset = seriesScope && seriesScope.symbolOffset;\n var labelModel = seriesScope && seriesScope.labelModel;\n var hoverLabelModel = seriesScope && seriesScope.hoverLabelModel;\n var hoverAnimation = seriesScope && seriesScope.hoverAnimation;\n var cursorStyle = seriesScope && seriesScope.cursorStyle;\n\n if (!seriesScope || data.hasItemOption) {\n var itemModel = seriesScope && seriesScope.itemModel ? seriesScope.itemModel : data.getItemModel(idx); // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n\n itemStyle = itemModel.getModel(normalStyleAccessPath).getItemStyle(['color']);\n hoverItemStyle = itemModel.getModel(emphasisStyleAccessPath).getItemStyle();\n symbolOffset = itemModel.getShallow('symbolOffset');\n labelModel = itemModel.getModel(normalLabelAccessPath);\n hoverLabelModel = itemModel.getModel(emphasisLabelAccessPath);\n hoverAnimation = itemModel.getShallow('hoverAnimation');\n cursorStyle = itemModel.getShallow('cursor');\n } else {\n hoverItemStyle = zrUtil.extend({}, hoverItemStyle);\n }\n\n var elStyle = symbolPath.style;\n var symbolRotate = data.getItemVisual(idx, 'symbolRotate');\n symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);\n\n if (symbolOffset) {\n symbolPath.attr('position', [parsePercent(symbolOffset[0], symbolSize[0]), parsePercent(symbolOffset[1], symbolSize[1])]);\n }\n\n cursorStyle && symbolPath.attr('cursor', cursorStyle); // PENDING setColor before setStyle!!!\n\n symbolPath.setColor(color, seriesScope && seriesScope.symbolInnerColor);\n symbolPath.setStyle(itemStyle);\n var opacity = data.getItemVisual(idx, 'opacity');\n\n if (opacity != null) {\n elStyle.opacity = opacity;\n }\n\n var liftZ = data.getItemVisual(idx, 'liftZ');\n var z2Origin = symbolPath.__z2Origin;\n\n if (liftZ != null) {\n if (z2Origin == null) {\n symbolPath.__z2Origin = symbolPath.z2;\n symbolPath.z2 += liftZ;\n }\n } else if (z2Origin != null) {\n symbolPath.z2 = z2Origin;\n symbolPath.__z2Origin = null;\n }\n\n var useNameLabel = seriesScope && seriesScope.useNameLabel;\n graphic.setLabelStyle(elStyle, hoverItemStyle, labelModel, hoverLabelModel, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: getLabelDefaultText,\n isRectText: true,\n autoColor: color\n }); // Do not execute util needed.\n\n function getLabelDefaultText(idx, opt) {\n return useNameLabel ? data.getName(idx) : getDefaultLabel(data, idx);\n }\n\n symbolPath.__symbolOriginalScale = getScale(symbolSize);\n symbolPath.hoverStyle = hoverItemStyle;\n symbolPath.highDownOnUpdate = hoverAnimation && seriesModel.isAnimationEnabled() ? highDownOnUpdate : null;\n graphic.setHoverStyle(symbolPath);\n};\n\nfunction highDownOnUpdate(fromState, toState) {\n // Do not support this hover animation util some scenario required.\n // Animation can only be supported in hover layer when using `el.incremetal`.\n if (this.incremental || this.useHoverLayer) {\n return;\n }\n\n if (toState === 'emphasis') {\n var scale = this.__symbolOriginalScale;\n var ratio = scale[1] / scale[0];\n var emphasisOpt = {\n scale: [Math.max(scale[0] * 1.1, scale[0] + 3), Math.max(scale[1] * 1.1, scale[1] + 3 * ratio)]\n }; // FIXME\n // modify it after support stop specified animation.\n // toState === fromState\n // ? (this.stopAnimation(), this.attr(emphasisOpt))\n\n this.animateTo(emphasisOpt, 400, 'elasticOut');\n } else if (toState === 'normal') {\n this.animateTo({\n scale: this.__symbolOriginalScale\n }, 400, 'elasticOut');\n }\n}\n/**\n * @param {Function} cb\n * @param {Object} [opt]\n * @param {Object} [opt.keepLabel=true]\n */\n\n\nsymbolProto.fadeOut = function (cb, opt) {\n var symbolPath = this.childAt(0); // Avoid mistaken hover when fading out\n\n this.silent = symbolPath.silent = true; // Not show text when animating\n\n !(opt && opt.keepLabel) && (symbolPath.style.text = null);\n graphic.updateProps(symbolPath, {\n style: {\n opacity: 0\n },\n scale: [0, 0]\n }, this._seriesModel, this.dataIndex, cb);\n};\n\nzrUtil.inherits(SymbolClz, graphic.Group);\nvar _default = SymbolClz;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar symbolUtil = require(\"../../util/symbol\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction normalizeSymbolSize(symbolSize) {\n if (!zrUtil.isArray(symbolSize)) {\n symbolSize = [+symbolSize, +symbolSize];\n }\n\n return symbolSize;\n}\n\nvar _default = echarts.extendChartView({\n type: 'radar',\n render: function (seriesModel, ecModel, api) {\n var polar = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var oldData = this._data;\n\n function createSymbol(data, idx) {\n var symbolType = data.getItemVisual(idx, 'symbol') || 'circle';\n var color = data.getItemVisual(idx, 'color');\n\n if (symbolType === 'none') {\n return;\n }\n\n var symbolSize = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));\n var symbolPath = symbolUtil.createSymbol(symbolType, -1, -1, 2, 2, color);\n 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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar AxisBuilder = require(\"./AxisBuilder\");\n\nvar AxisView = require(\"./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 axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitLine', 'splitArea', 'minorSplitLine'];\n\nvar _default = AxisView.extend({\n type: 'radiusAxis',\n axisPointerClass: 'PolarAxisPointer',\n render: function (radiusAxisModel, ecModel) {\n this.group.removeAll();\n\n if (!radiusAxisModel.get('show')) {\n return;\n }\n\n var radiusAxis = radiusAxisModel.axis;\n var polar = radiusAxis.polar;\n var angleAxis = polar.getAngleAxis();\n var ticksCoords = radiusAxis.getTicksCoords();\n var minorTicksCoords = radiusAxis.getMinorTicksCoords();\n var axisAngle = angleAxis.getExtent()[0];\n var radiusExtent = radiusAxis.getExtent();\n var layout = layoutAxis(polar, radiusAxisModel, axisAngle);\n var axisBuilder = new AxisBuilder(radiusAxisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n this.group.add(axisBuilder.getGroup());\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (radiusAxisModel.get(name + '.show') && !radiusAxis.scale.isBlank()) {\n this['_' + name](radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords);\n }\n }, this);\n },\n\n /**\n * @private\n */\n _splitLine: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n var splitLineModel = radiusAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n\n for (var i = 0; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic.Circle({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: ticksCoords[i].coord\n }\n }));\n } // Simple optimization\n // Batching the lines if color are the same\n\n\n for (var i = 0; i < splitLines.length; i++) {\n this.group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length],\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n }\n },\n\n /**\n * @private\n */\n _minorSplitLine: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords, minorTicksCoords) {\n if (!minorTicksCoords.length) {\n return;\n }\n\n var minorSplitLineModel = radiusAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n lines.push(new graphic.Circle({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: minorTicksCoords[i][k].coord\n }\n }));\n }\n }\n\n this.group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults({\n fill: null\n }, lineStyleModel.getLineStyle()),\n silent: true\n }));\n },\n\n /**\n * @private\n */\n _splitArea: function (radiusAxisModel, polar, axisAngle, radiusExtent, ticksCoords) {\n if (!ticksCoords.length) {\n return;\n }\n\n var splitAreaModel = radiusAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var prevRadius = ticksCoords[0].coord;\n\n for (var i = 1; i < ticksCoords.length; i++) {\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: prevRadius,\n r: ticksCoords[i].coord,\n startAngle: 0,\n endAngle: Math.PI * 2\n },\n silent: true\n }));\n prevRadius = ticksCoords[i].coord;\n } // Simple optimization\n // Batching the lines if color are the same\n\n\n for (var i = 0; i < splitAreas.length; i++) {\n this.group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: true\n }));\n }\n }\n});\n/**\n * @inner\n */\n\n\nfunction layoutAxis(polar, radiusAxisModel, axisAngle) {\n return {\n position: [polar.cx, polar.cy],\n rotation: axisAngle / 180 * Math.PI,\n labelDirection: -1,\n tickDirection: -1,\n nameDirection: 1,\n labelRotate: radiusAxisModel.getModel('axisLabel').get('rotate'),\n // Over splitLine and splitArea\n z2: 1\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 createListFromArray = require(\"./chart/helper/createListFromArray\");\n\nvar axisHelper = require(\"./coord/axisHelper\");\n\nvar axisModelCommonMixin = require(\"./coord/axisModelCommonMixin\");\n\nvar Model = require(\"./model/Model\");\n\nvar _layout = require(\"./util/layout\");\n\nvar getLayoutRect = _layout.getLayoutRect;\nexports.getLayoutRect = _layout.getLayoutRect;\n\nvar _dataStackHelper = require(\"./data/helper/dataStackHelper\");\n\nvar enableDataStack = _dataStackHelper.enableDataStack;\nvar isDimensionStacked = _dataStackHelper.isDimensionStacked;\nvar getStackedDimension = _dataStackHelper.getStackedDimension;\n\nvar _completeDimensions = require(\"./data/helper/completeDimensions\");\n\nexports.completeDimensions = _completeDimensions;\n\nvar _createDimensions = require(\"./data/helper/createDimensions\");\n\nexports.createDimensions = _createDimensions;\n\nvar _symbol = require(\"./util/symbol\");\n\nexports.createSymbol = _symbol.createSymbol;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 createGraphFromNodeEdge from './chart/helper/createGraphFromNodeEdge';\n\n/**\n * Create a muti dimension List structure from seriesModel.\n * @param {module:echarts/model/Model} seriesModel\n * @return {module:echarts/data/List} list\n */\nfunction createList(seriesModel) {\n return createListFromArray(seriesModel.getSource(), seriesModel);\n} // export function createGraph(seriesModel) {\n// var nodes = seriesModel.get('data');\n// var links = seriesModel.get('links');\n// return createGraphFromNodeEdge(nodes, links, seriesModel);\n// }\n\n\nvar dataStack = {\n isDimensionStacked: isDimensionStacked,\n enableDataStack: enableDataStack,\n getStackedDimension: getStackedDimension\n};\n/**\n * Create a symbol element with given symbol configuration: shape, x, y, width, height, color\n * @param {string} symbolDesc\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @param {string} color\n */\n\n/**\n * Create scale\n * @param {Array.} dataExtent\n * @param {Object|module:echarts/Model} option\n */\nfunction createScale(dataExtent, option) {\n var axisModel = option;\n\n if (!Model.isInstance(option)) {\n axisModel = new Model(option);\n zrUtil.mixin(axisModel, axisModelCommonMixin);\n }\n\n var scale = axisHelper.createScaleByModel(axisModel);\n scale.setExtent(dataExtent[0], dataExtent[1]);\n axisHelper.niceScaleExtent(scale, axisModel);\n return scale;\n}\n/**\n * Mixin common methods to axis model,\n *\n * Inlcude methods\n * `getFormattedLabels() => Array.`\n * `getCategories() => Array.`\n * `getMin(origin: boolean) => number`\n * `getMax(origin: boolean) => number`\n * `getNeedCrossZero() => boolean`\n * `setRange(start: number, end: number)`\n * `resetRange()`\n */\n\n\nfunction mixinAxisModelCommonMethods(Model) {\n zrUtil.mixin(Model, axisModelCommonMixin);\n}\n\nexports.createList = createList;\nexports.dataStack = dataStack;\nexports.createScale = createScale;\nexports.mixinAxisModelCommonMethods = mixinAxisModelCommonMethods;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar env = require(\"zrender/lib/core/env\");\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 each = zrUtil.each;\n/**\n * @param {string} key\n * @param {module:echarts/ExtensionAPI} api\n * @param {Function} handler\n * param: {string} currTrigger\n * param: {Array.} point\n */\n\nfunction register(key, api, handler) {\n if (env.node) {\n return;\n }\n\n var zr = api.getZr();\n inner(zr).records || (inner(zr).records = {});\n initGlobalListeners(zr, api);\n var record = inner(zr).records[key] || (inner(zr).records[key] = {});\n record.handler = handler;\n}\n\nfunction initGlobalListeners(zr, api) {\n if (inner(zr).initialized) {\n return;\n }\n\n inner(zr).initialized = true;\n useHandler('click', zrUtil.curry(doEnter, 'click'));\n useHandler('mousemove', zrUtil.curry(doEnter, 'mousemove')); // useHandler('mouseout', onLeave);\n\n useHandler('globalout', onLeave);\n\n function useHandler(eventType, cb) {\n zr.on(eventType, function (e) {\n var dis = makeDispatchAction(api);\n each(inner(zr).records, function (record) {\n record && cb(record, e, dis.dispatchAction);\n });\n dispatchTooltipFinally(dis.pendings, api);\n });\n }\n}\n\nfunction dispatchTooltipFinally(pendings, api) {\n var showLen = pendings.showTip.length;\n var hideLen = pendings.hideTip.length;\n var actuallyPayload;\n\n if (showLen) {\n actuallyPayload = pendings.showTip[showLen - 1];\n } else if (hideLen) {\n actuallyPayload = pendings.hideTip[hideLen - 1];\n }\n\n if (actuallyPayload) {\n actuallyPayload.dispatchAction = null;\n api.dispatchAction(actuallyPayload);\n }\n}\n\nfunction onLeave(record, e, dispatchAction) {\n record.handler('leave', null, dispatchAction);\n}\n\nfunction doEnter(currTrigger, record, e, dispatchAction) {\n record.handler(currTrigger, e, dispatchAction);\n}\n\nfunction makeDispatchAction(api) {\n var pendings = {\n showTip: [],\n hideTip: []\n }; // FIXME\n // better approach?\n // 'showTip' and 'hideTip' can be triggered by axisPointer and tooltip,\n // which may be conflict, (axisPointer call showTip but tooltip call hideTip);\n // So we have to add \"final stage\" to merge those dispatched actions.\n\n var dispatchAction = function (payload) {\n var pendingList = pendings[payload.type];\n\n if (pendingList) {\n pendingList.push(payload);\n } else {\n payload.dispatchAction = dispatchAction;\n api.dispatchAction(payload);\n }\n };\n\n return {\n dispatchAction: dispatchAction,\n pendings: pendings\n };\n}\n/**\n * @param {string} key\n * @param {module:echarts/ExtensionAPI} api\n */\n\n\nfunction unregister(key, api) {\n if (env.node) {\n return;\n }\n\n var zr = api.getZr();\n var record = (inner(zr).records || {})[key];\n\n if (record) {\n inner(zr).records[key] = null;\n }\n}\n\nexports.register = register;\nexports.unregister = unregister;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 Scale = require(\"./Scale\");\n\nvar OrdinalMeta = require(\"../data/OrdinalMeta\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * Linear continuous scale\n * @module echarts/coord/scale/Ordinal\n *\n * http://en.wikipedia.org/wiki/Level_of_measurement\n */\n// FIXME only one data\nvar scaleProto = Scale.prototype;\nvar OrdinalScale = Scale.extend({\n type: 'ordinal',\n\n /**\n * @param {module:echarts/data/OrdianlMeta|Array.} ordinalMeta\n */\n init: function (ordinalMeta, extent) {\n // Caution: Should not use instanceof, consider ec-extensions using\n // import approach to get OrdinalMeta class.\n if (!ordinalMeta || zrUtil.isArray(ordinalMeta)) {\n ordinalMeta = new OrdinalMeta({\n categories: ordinalMeta\n });\n }\n\n this._ordinalMeta = ordinalMeta;\n this._extent = extent || [0, ordinalMeta.categories.length - 1];\n },\n parse: function (val) {\n return typeof val === 'string' ? this._ordinalMeta.getOrdinal(val) // val might be float.\n : Math.round(val);\n },\n contain: function (rank) {\n rank = this.parse(rank);\n return scaleProto.contain.call(this, rank) && this._ordinalMeta.categories[rank] != null;\n },\n\n /**\n * Normalize given rank or name to linear [0, 1]\n * @param {number|string} [val]\n * @return {number}\n */\n normalize: function (val) {\n return scaleProto.normalize.call(this, this.parse(val));\n },\n scale: function (val) {\n return Math.round(scaleProto.scale.call(this, val));\n },\n\n /**\n * @return {Array}\n */\n getTicks: function () {\n var ticks = [];\n var extent = this._extent;\n var rank = extent[0];\n\n while (rank <= extent[1]) {\n ticks.push(rank);\n rank++;\n }\n\n return ticks;\n },\n\n /**\n * Get item on rank n\n * @param {number} n\n * @return {string}\n */\n getLabel: function (n) {\n if (!this.isBlank()) {\n // Note that if no data, ordinalMeta.categories is an empty array.\n return this._ordinalMeta.categories[n];\n }\n },\n\n /**\n * @return {number}\n */\n count: function () {\n return this._extent[1] - this._extent[0] + 1;\n },\n\n /**\n * @override\n */\n unionExtentFromData: function (data, dim) {\n this.unionExtent(data.getApproximateExtent(dim));\n },\n getOrdinalMeta: function () {\n return this._ordinalMeta;\n },\n niceTicks: zrUtil.noop,\n niceExtent: zrUtil.noop\n});\n/**\n * @return {module:echarts/scale/Time}\n */\n\nOrdinalScale.create = function () {\n return new OrdinalScale();\n};\n\nvar _default = OrdinalScale;\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;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 Polar = require(\"./Polar\");\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar _axisHelper = require(\"../../coord/axisHelper\");\n\nvar createScaleByModel = _axisHelper.createScaleByModel;\nvar niceScaleExtent = _axisHelper.niceScaleExtent;\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\n\nvar _dataStackHelper = require(\"../../data/helper/dataStackHelper\");\n\nvar getStackedDimension = _dataStackHelper.getStackedDimension;\n\nrequire(\"./PolarModel\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 Axis scale\n\n/**\n * Resize method bound to the polar\n * @param {module:echarts/coord/polar/PolarModel} polarModel\n * @param {module:echarts/ExtensionAPI} api\n */\nfunction resizePolar(polar, polarModel, api) {\n var center = polarModel.get('center');\n var width = api.getWidth();\n var height = api.getHeight();\n polar.cx = parsePercent(center[0], width);\n polar.cy = parsePercent(center[1], height);\n var radiusAxis = polar.getRadiusAxis();\n var size = Math.min(width, height) / 2;\n var radius = polarModel.get('radius');\n\n if (radius == null) {\n radius = [0, '100%'];\n } else if (!zrUtil.isArray(radius)) {\n // r0 = 0\n radius = [0, radius];\n }\n\n radius = [parsePercent(radius[0], size), parsePercent(radius[1], size)];\n radiusAxis.inverse ? radiusAxis.setExtent(radius[1], radius[0]) : radiusAxis.setExtent(radius[0], radius[1]);\n}\n/**\n * Update polar\n */\n\n\nfunction updatePolarScale(ecModel, api) {\n var polar = this;\n var angleAxis = polar.getAngleAxis();\n var radiusAxis = polar.getRadiusAxis(); // Reset scale\n\n angleAxis.scale.setExtent(Infinity, -Infinity);\n radiusAxis.scale.setExtent(Infinity, -Infinity);\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === polar) {\n var data = seriesModel.getData();\n zrUtil.each(data.mapDimension('radius', true), function (dim) {\n radiusAxis.scale.unionExtentFromData(data, getStackedDimension(data, dim));\n });\n zrUtil.each(data.mapDimension('angle', true), function (dim) {\n angleAxis.scale.unionExtentFromData(data, getStackedDimension(data, dim));\n });\n }\n });\n niceScaleExtent(angleAxis.scale, angleAxis.model);\n niceScaleExtent(radiusAxis.scale, radiusAxis.model); // Fix extent of category angle axis\n\n if (angleAxis.type === 'category' && !angleAxis.onBand) {\n var extent = angleAxis.getExtent();\n var diff = 360 / angleAxis.scale.count();\n angleAxis.inverse ? extent[1] += diff : extent[1] -= diff;\n angleAxis.setExtent(extent[0], extent[1]);\n }\n}\n/**\n * Set common axis properties\n * @param {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n * @param {module:echarts/coord/polar/AxisModel}\n * @inner\n */\n\n\nfunction setAxis(axis, axisModel) {\n axis.type = axisModel.get('type');\n axis.scale = createScaleByModel(axisModel);\n axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category';\n axis.inverse = axisModel.get('inverse');\n\n if (axisModel.mainType === 'angleAxis') {\n axis.inverse ^= axisModel.get('clockwise');\n var startAngle = axisModel.get('startAngle');\n axis.setExtent(startAngle, startAngle + (axis.inverse ? -360 : 360));\n } // Inject axis instance\n\n\n axisModel.axis = axis;\n axis.model = axisModel;\n}\n\nvar polarCreator = {\n dimensions: Polar.prototype.dimensions,\n create: function (ecModel, api) {\n var polarList = [];\n ecModel.eachComponent('polar', function (polarModel, idx) {\n var polar = new Polar(idx); // Inject resize and update method\n\n polar.update = updatePolarScale;\n var radiusAxis = polar.getRadiusAxis();\n var angleAxis = polar.getAngleAxis();\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n setAxis(radiusAxis, radiusAxisModel);\n setAxis(angleAxis, angleAxisModel);\n resizePolar(polar, polarModel, api);\n polarList.push(polar);\n polarModel.coordinateSystem = polar;\n polar.model = polarModel;\n }); // Inject coordinateSystem to series\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'polar') {\n var polarModel = ecModel.queryComponents({\n mainType: 'polar',\n index: seriesModel.get('polarIndex'),\n id: seriesModel.get('polarId')\n })[0];\n seriesModel.coordinateSystem = polarModel.coordinateSystem;\n }\n });\n return polarList;\n }\n};\nCoordinateSystem.register('polar', polarCreator);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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\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*/\nfunction getSeriesStackId(seriesModel) {\n return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex;\n}\n\nfunction getAxisKey(polar, axis) {\n return axis.dim + polar.model.componentIndex;\n}\n/**\n * @param {string} seriesType\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n */\n\n\nfunction barLayoutPolar(seriesType, ecModel, api) {\n var lastStackCoords = {};\n var barWidthAndOffset = calRadialBar(zrUtil.filter(ecModel.getSeriesByType(seriesType), function (seriesModel) {\n return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'polar';\n }));\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n // Check series coordinate, do layout for polar only\n if (seriesModel.coordinateSystem.type !== 'polar') {\n return;\n }\n\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var stackId = getSeriesStackId(seriesModel);\n var columnLayoutInfo = barWidthAndOffset[axisKey][stackId];\n var columnOffset = columnLayoutInfo.offset;\n var columnWidth = columnLayoutInfo.width;\n var valueAxis = polar.getOtherAxis(baseAxis);\n var cx = seriesModel.coordinateSystem.cx;\n var cy = seriesModel.coordinateSystem.cy;\n var barMinHeight = seriesModel.get('barMinHeight') || 0;\n var barMinAngle = seriesModel.get('barMinAngle') || 0;\n lastStackCoords[stackId] = lastStackCoords[stackId] || [];\n var valueDim = data.mapDimension(valueAxis.dim);\n var baseDim = data.mapDimension(baseAxis.dim);\n var stacked = isDimensionStacked(data, valueDim\n /*, baseDim*/\n );\n var clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true);\n var valueAxisStart = valueAxis.dim === 'radius' ? valueAxis.dataToRadius(0) : valueAxis.dataToAngle(0);\n\n for (var idx = 0, len = data.count(); idx < len; idx++) {\n var value = data.get(valueDim, idx);\n var baseValue = data.get(baseDim, idx);\n var sign = value >= 0 ? 'p' : 'n';\n var baseCoord = valueAxisStart; // Because of the barMinHeight, we can not use the value in\n // stackResultDimension directly.\n // Only ordinal axis can be stacked.\n\n if (stacked) {\n if (!lastStackCoords[stackId][baseValue]) {\n lastStackCoords[stackId][baseValue] = {\n p: valueAxisStart,\n // Positive stack\n n: valueAxisStart // Negative stack\n\n };\n } // Should also consider #4243\n\n\n baseCoord = lastStackCoords[stackId][baseValue][sign];\n }\n\n var r0;\n var r;\n var startAngle;\n var endAngle; // radial sector\n\n if (valueAxis.dim === 'radius') {\n var radiusSpan = valueAxis.dataToRadius(value) - valueAxisStart;\n var angle = baseAxis.dataToAngle(baseValue);\n\n if (Math.abs(radiusSpan) < barMinHeight) {\n radiusSpan = (radiusSpan < 0 ? -1 : 1) * barMinHeight;\n }\n\n r0 = baseCoord;\n r = baseCoord + radiusSpan;\n startAngle = angle - columnOffset;\n endAngle = startAngle - columnWidth;\n stacked && (lastStackCoords[stackId][baseValue][sign] = r);\n } // tangential sector\n else {\n var angleSpan = valueAxis.dataToAngle(value, clampLayout) - valueAxisStart;\n var radius = baseAxis.dataToRadius(baseValue);\n\n if (Math.abs(angleSpan) < barMinAngle) {\n angleSpan = (angleSpan < 0 ? -1 : 1) * barMinAngle;\n }\n\n r0 = radius + columnOffset;\n r = r0 + columnWidth;\n startAngle = baseCoord;\n endAngle = baseCoord + angleSpan; // if the previous stack is at the end of the ring,\n // add a round to differentiate it from origin\n // var extent = angleAxis.getExtent();\n // var stackCoord = angle;\n // if (stackCoord === extent[0] && value > 0) {\n // stackCoord = extent[1];\n // }\n // else if (stackCoord === extent[1] && value < 0) {\n // stackCoord = extent[0];\n // }\n\n stacked && (lastStackCoords[stackId][baseValue][sign] = endAngle);\n }\n\n data.setItemLayout(idx, {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n // Consider that positive angle is anti-clockwise,\n // while positive radian of sector is clockwise\n startAngle: -startAngle * Math.PI / 180,\n endAngle: -endAngle * Math.PI / 180\n });\n }\n }, this);\n}\n/**\n * Calculate bar width and offset for radial bar charts\n */\n\n\nfunction calRadialBar(barSeries, api) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n }); // Recalculate width again\n\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}\n\nvar _default = barLayoutPolar;\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 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\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// import * as axisHelper from './axisHelper';\nvar _default = {\n /**\n * @param {boolean} origin\n * @return {number|string} min value or 'dataMin' or null/undefined (means auto) or NaN\n */\n getMin: function (origin) {\n var option = this.option;\n var min = !origin && option.rangeStart != null ? option.rangeStart : option.min;\n\n if (this.axis && min != null && min !== 'dataMin' && typeof min !== 'function' && !zrUtil.eqNaN(min)) {\n min = this.axis.scale.parse(min);\n }\n\n return min;\n },\n\n /**\n * @param {boolean} origin\n * @return {number|string} max value or 'dataMax' or null/undefined (means auto) or NaN\n */\n getMax: function (origin) {\n var option = this.option;\n var max = !origin && option.rangeEnd != null ? option.rangeEnd : option.max;\n\n if (this.axis && max != null && max !== 'dataMax' && typeof max !== 'function' && !zrUtil.eqNaN(max)) {\n max = this.axis.scale.parse(max);\n }\n\n return max;\n },\n\n /**\n * @return {boolean}\n */\n getNeedCrossZero: function () {\n var option = this.option;\n return option.rangeStart != null || option.rangeEnd != null ? false : !option.scale;\n },\n\n /**\n * Should be implemented by each axis model if necessary.\n * @return {module:echarts/model/Component} coordinate system model\n */\n getCoordSysModel: zrUtil.noop,\n\n /**\n * @param {number} rangeStart Can only be finite number or null/undefined or NaN.\n * @param {number} rangeEnd Can only be finite number or null/undefined or NaN.\n */\n setRange: function (rangeStart, rangeEnd) {\n this.option.rangeStart = rangeStart;\n this.option.rangeEnd = rangeEnd;\n },\n\n /**\n * Reset range\n */\n resetRange: function () {\n // rangeStart and rangeEnd is readonly.\n this.option.rangeStart = this.option.rangeEnd = null;\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 coordinateSystemCreators = {};\n\nfunction CoordinateSystemManager() {\n this._coordinateSystems = [];\n}\n\nCoordinateSystemManager.prototype = {\n constructor: CoordinateSystemManager,\n create: function (ecModel, api) {\n var coordinateSystems = [];\n zrUtil.each(coordinateSystemCreators, function (creater, type) {\n var list = creater.create(ecModel, api);\n coordinateSystems = coordinateSystems.concat(list || []);\n });\n this._coordinateSystems = coordinateSystems;\n },\n update: function (ecModel, api) {\n zrUtil.each(this._coordinateSystems, function (coordSys) {\n coordSys.update && coordSys.update(ecModel, api);\n });\n },\n getCoordinateSystems: function () {\n return this._coordinateSystems.slice();\n }\n};\n\nCoordinateSystemManager.register = function (type, coordinateSystemCreator) {\n coordinateSystemCreators[type] = coordinateSystemCreator;\n};\n\nCoordinateSystemManager.get = function (type) {\n return coordinateSystemCreators[type];\n};\n\nvar _default = CoordinateSystemManager;\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 numberUtil = require(\"../util/number\");\n\nvar formatUtil = require(\"../util/format\");\n\nvar scaleHelper = require(\"./helper\");\n\nvar IntervalScale = require(\"./Interval\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 \"scaleLevels\" was originally copied from \"d3.js\" with some\n* modifications made for this project.\n* (See more details in the comment on the definition of \"scaleLevels\" 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*/\n// [About UTC and local time zone]:\n// In most cases, `number.parseDate` will treat input data string as local time\n// (except time zone is specified in time string). And `format.formateTime` returns\n// local time by default. option.useUTC is false by default. This design have\n// concidered these common case:\n// (1) Time that is persistent in server is in UTC, but it is needed to be diplayed\n// in local time by default.\n// (2) By default, the input data string (e.g., '2011-01-02') should be displayed\n// as its original time, without any time difference.\nvar intervalScaleProto = IntervalScale.prototype;\nvar mathCeil = Math.ceil;\nvar mathFloor = Math.floor;\nvar ONE_SECOND = 1000;\nvar ONE_MINUTE = ONE_SECOND * 60;\nvar ONE_HOUR = ONE_MINUTE * 60;\nvar ONE_DAY = ONE_HOUR * 24; // FIXME 公用?\n\nvar bisect = function (a, x, lo, hi) {\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n\n if (a[mid][1] < x) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n\n return lo;\n};\n/**\n * @alias module:echarts/coord/scale/Time\n * @constructor\n */\n\n\nvar TimeScale = IntervalScale.extend({\n type: 'time',\n\n /**\n * @override\n */\n getLabel: function (val) {\n var stepLvl = this._stepLvl;\n var date = new Date(val);\n return formatUtil.formatTime(stepLvl[0], date, this.getSetting('useUTC'));\n },\n\n /**\n * @override\n */\n niceExtent: function (opt) {\n var extent = this._extent; // If extent start and end are same, expand them\n\n if (extent[0] === extent[1]) {\n // Expand extent\n extent[0] -= ONE_DAY;\n extent[1] += ONE_DAY;\n } // If there are no data and extent are [Infinity, -Infinity]\n\n\n if (extent[1] === -Infinity && extent[0] === Infinity) {\n var d = new Date();\n extent[1] = +new Date(d.getFullYear(), d.getMonth(), d.getDate());\n extent[0] = extent[1] - ONE_DAY;\n }\n\n this.niceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval); // var extent = this._extent;\n\n var interval = this._interval;\n\n if (!opt.fixMin) {\n extent[0] = numberUtil.round(mathFloor(extent[0] / interval) * interval);\n }\n\n if (!opt.fixMax) {\n extent[1] = numberUtil.round(mathCeil(extent[1] / interval) * interval);\n }\n },\n\n /**\n * @override\n */\n niceTicks: function (approxTickNum, minInterval, maxInterval) {\n approxTickNum = approxTickNum || 10;\n var extent = this._extent;\n var span = extent[1] - extent[0];\n var approxInterval = span / approxTickNum;\n\n if (minInterval != null && approxInterval < minInterval) {\n approxInterval = minInterval;\n }\n\n if (maxInterval != null && approxInterval > maxInterval) {\n approxInterval = maxInterval;\n }\n\n var scaleLevelsLen = scaleLevels.length;\n var idx = bisect(scaleLevels, approxInterval, 0, scaleLevelsLen);\n var level = scaleLevels[Math.min(idx, scaleLevelsLen - 1)];\n var interval = level[1]; // Same with interval scale if span is much larger than 1 year\n\n if (level[0] === 'year') {\n var yearSpan = span / interval; // From \"Nice Numbers for Graph Labels\" of Graphic Gems\n // var niceYearSpan = numberUtil.nice(yearSpan, false);\n\n var yearStep = numberUtil.nice(yearSpan / approxTickNum, true);\n interval *= yearStep;\n }\n\n var timezoneOffset = this.getSetting('useUTC') ? 0 : new Date(+extent[0] || +extent[1]).getTimezoneOffset() * 60 * 1000;\n var niceExtent = [Math.round(mathCeil((extent[0] - timezoneOffset) / interval) * interval + timezoneOffset), Math.round(mathFloor((extent[1] - timezoneOffset) / interval) * interval + timezoneOffset)];\n scaleHelper.fixExtent(niceExtent, extent);\n this._stepLvl = level; // Interval will be used in getTicks\n\n this._interval = interval;\n this._niceExtent = niceExtent;\n },\n parse: function (val) {\n // val might be float.\n return +numberUtil.parseDate(val);\n }\n});\nzrUtil.each(['contain', 'normalize'], function (methodName) {\n TimeScale.prototype[methodName] = function (val) {\n return intervalScaleProto[methodName].call(this, this.parse(val));\n };\n});\n/**\n * This implementation 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\nvar scaleLevels = [// Format interval\n['hh:mm:ss', ONE_SECOND], // 1s\n['hh:mm:ss', ONE_SECOND * 5], // 5s\n['hh:mm:ss', ONE_SECOND * 10], // 10s\n['hh:mm:ss', ONE_SECOND * 15], // 15s\n['hh:mm:ss', ONE_SECOND * 30], // 30s\n['hh:mm\\nMM-dd', ONE_MINUTE], // 1m\n['hh:mm\\nMM-dd', ONE_MINUTE * 5], // 5m\n['hh:mm\\nMM-dd', ONE_MINUTE * 10], // 10m\n['hh:mm\\nMM-dd', ONE_MINUTE * 15], // 15m\n['hh:mm\\nMM-dd', ONE_MINUTE * 30], // 30m\n['hh:mm\\nMM-dd', ONE_HOUR], // 1h\n['hh:mm\\nMM-dd', ONE_HOUR * 2], // 2h\n['hh:mm\\nMM-dd', ONE_HOUR * 6], // 6h\n['hh:mm\\nMM-dd', ONE_HOUR * 12], // 12h\n['MM-dd\\nyyyy', ONE_DAY], // 1d\n['MM-dd\\nyyyy', ONE_DAY * 2], // 2d\n['MM-dd\\nyyyy', ONE_DAY * 3], // 3d\n['MM-dd\\nyyyy', ONE_DAY * 4], // 4d\n['MM-dd\\nyyyy', ONE_DAY * 5], // 5d\n['MM-dd\\nyyyy', ONE_DAY * 6], // 6d\n['week', ONE_DAY * 7], // 7d\n['MM-dd\\nyyyy', ONE_DAY * 10], // 10d\n['week', ONE_DAY * 14], // 2w\n['week', ONE_DAY * 21], // 3w\n['month', ONE_DAY * 31], // 1M\n['week', ONE_DAY * 42], // 6w\n['month', ONE_DAY * 62], // 2M\n['week', ONE_DAY * 70], // 10w\n['quarter', ONE_DAY * 95], // 3M\n['month', ONE_DAY * 31 * 4], // 4M\n['month', ONE_DAY * 31 * 5], // 5M\n['half-year', ONE_DAY * 380 / 2], // 6M\n['month', ONE_DAY * 31 * 8], // 8M\n['month', ONE_DAY * 31 * 10], // 10M\n['year', ONE_DAY * 380] // 1Y\n];\n/**\n * @param {module:echarts/model/Model}\n * @return {module:echarts/scale/Time}\n */\n\nTimeScale.create = function (model) {\n return new TimeScale({\n useUTC: model.ecModel.get('useUTC')\n });\n};\n\nvar _default = TimeScale;\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 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.line',\n dependencies: ['grid', 'polar'],\n getInitialData: function (option, ecModel) {\n return createListFromArray(this.getSource(), this, {\n useEncodeDefaulter: true\n });\n },\n defaultOption: {\n zlevel: 0,\n z: 2,\n coordinateSystem: 'cartesian2d',\n legendHoverLink: true,\n hoverAnimation: true,\n // stack: null\n // xAxisIndex: 0,\n // yAxisIndex: 0,\n // polarIndex: 0,\n // If clip the overflow value\n clip: true,\n // cursor: null,\n label: {\n position: 'top'\n },\n // itemStyle: {\n // },\n lineStyle: {\n width: 2,\n type: 'solid'\n },\n // areaStyle: {\n // origin of areaStyle. Valid values:\n // `'auto'/null/undefined`: from axisLine to data\n // `'start'`: from min to data\n // `'end'`: from data to max\n // origin: 'auto'\n // },\n // false, 'start', 'end', 'middle'\n step: false,\n // Disabled if step is true\n smooth: false,\n smoothMonotone: null,\n symbol: 'emptyCircle',\n symbolSize: 4,\n symbolRotate: null,\n showSymbol: true,\n // `false`: follow the label interval strategy.\n // `true`: show all symbols.\n // `'auto'`: If possible, show all symbols, otherwise\n // follow the label interval strategy.\n showAllSymbol: 'auto',\n // Whether to connect break point.\n connectNulls: false,\n // Sampling for large data. Can be: 'average', 'max', 'min', 'sum'.\n sampling: 'none',\n animationEasing: 'linear',\n // Disable progressive\n progressive: 0,\n hoverLayerThreshold: Infinity\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 pathTool = require(\"zrender/lib/tool/path\");\n\nvar colorTool = require(\"zrender/lib/tool/color\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar vector = require(\"zrender/lib/core/vector\");\n\nvar Path = require(\"zrender/lib/graphic/Path\");\n\nvar Transformable = require(\"zrender/lib/mixin/Transformable\");\n\nvar ZImage = require(\"zrender/lib/graphic/Image\");\n\nexports.Image = ZImage;\n\nvar Group = require(\"zrender/lib/container/Group\");\n\nexports.Group = Group;\n\nvar Text = require(\"zrender/lib/graphic/Text\");\n\nexports.Text = Text;\n\nvar Circle = require(\"zrender/lib/graphic/shape/Circle\");\n\nexports.Circle = Circle;\n\nvar Sector = require(\"zrender/lib/graphic/shape/Sector\");\n\nexports.Sector = Sector;\n\nvar Ring = require(\"zrender/lib/graphic/shape/Ring\");\n\nexports.Ring = Ring;\n\nvar Polygon = require(\"zrender/lib/graphic/shape/Polygon\");\n\nexports.Polygon = Polygon;\n\nvar Polyline = require(\"zrender/lib/graphic/shape/Polyline\");\n\nexports.Polyline = Polyline;\n\nvar Rect = require(\"zrender/lib/graphic/shape/Rect\");\n\nexports.Rect = Rect;\n\nvar Line = require(\"zrender/lib/graphic/shape/Line\");\n\nexports.Line = Line;\n\nvar BezierCurve = require(\"zrender/lib/graphic/shape/BezierCurve\");\n\nexports.BezierCurve = BezierCurve;\n\nvar Arc = require(\"zrender/lib/graphic/shape/Arc\");\n\nexports.Arc = Arc;\n\nvar CompoundPath = require(\"zrender/lib/graphic/CompoundPath\");\n\nexports.CompoundPath = CompoundPath;\n\nvar LinearGradient = require(\"zrender/lib/graphic/LinearGradient\");\n\nexports.LinearGradient = LinearGradient;\n\nvar RadialGradient = require(\"zrender/lib/graphic/RadialGradient\");\n\nexports.RadialGradient = RadialGradient;\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nexports.BoundingRect = BoundingRect;\n\nvar IncrementalDisplayable = require(\"zrender/lib/graphic/IncrementalDisplayable\");\n\nexports.IncrementalDisplayable = IncrementalDisplayable;\n\nvar subPixelOptimizeUtil = require(\"zrender/lib/graphic/helper/subPixelOptimize\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 mathMax = Math.max;\nvar mathMin = Math.min;\nvar EMPTY_OBJ = {};\nvar Z2_EMPHASIS_LIFT = 1; // key: label model property nane, value: style property name.\n\nvar CACHED_LABEL_STYLE_PROPERTIES = {\n color: 'textFill',\n textBorderColor: 'textStroke',\n textBorderWidth: 'textStrokeWidth'\n};\nvar EMPHASIS = 'emphasis';\nvar NORMAL = 'normal'; // Reserve 0 as default.\n\nvar _highlightNextDigit = 1;\nvar _highlightKeyMap = {};\nvar _customShapeMap = {};\n/**\n * Extend shape with parameters\n */\n\nfunction extendShape(opts) {\n return Path.extend(opts);\n}\n/**\n * Extend path\n */\n\n\nfunction extendPath(pathData, opts) {\n return pathTool.extendFromString(pathData, opts);\n}\n/**\n * Register a user defined shape.\n * The shape class can be fetched by `getShapeClass`\n * This method will overwrite the registered shapes, including\n * the registered built-in shapes, if using the same `name`.\n * The shape can be used in `custom series` and\n * `graphic component` by declaring `{type: name}`.\n *\n * @param {string} name\n * @param {Object} ShapeClass Can be generated by `extendShape`.\n */\n\n\nfunction registerShape(name, ShapeClass) {\n _customShapeMap[name] = ShapeClass;\n}\n/**\n * Find shape class registered by `registerShape`. Usually used in\n * fetching user defined shape.\n *\n * [Caution]:\n * (1) This method **MUST NOT be used inside echarts !!!**, unless it is prepared\n * to use user registered shapes.\n * Because the built-in shape (see `getBuiltInShape`) will be registered by\n * `registerShape` by default. That enables users to get both built-in\n * shapes as well as the shapes belonging to themsleves. But users can overwrite\n * the built-in shapes by using names like 'circle', 'rect' via calling\n * `registerShape`. So the echarts inner featrues should not fetch shapes from here\n * in case that it is overwritten by users, except that some features, like\n * `custom series`, `graphic component`, do it deliberately.\n *\n * (2) In the features like `custom series`, `graphic component`, the user input\n * `{tpye: 'xxx'}` does not only specify shapes but also specify other graphic\n * elements like `'group'`, `'text'`, `'image'` or event `'path'`. Those names\n * are reserved names, that is, if some user register a shape named `'image'`,\n * the shape will not be used. If we intending to add some more reserved names\n * in feature, that might bring break changes (disable some existing user shape\n * names). But that case probably rearly happen. So we dont make more mechanism\n * to resolve this issue here.\n *\n * @param {string} name\n * @return {Object} The shape class. If not found, return nothing.\n */\n\n\nfunction getShapeClass(name) {\n if (_customShapeMap.hasOwnProperty(name)) {\n return _customShapeMap[name];\n }\n}\n/**\n * Create a path element from path data string\n * @param {string} pathData\n * @param {Object} opts\n * @param {module:zrender/core/BoundingRect} rect\n * @param {string} [layout=cover] 'center' or 'cover'\n */\n\n\nfunction makePath(pathData, opts, rect, layout) {\n var path = pathTool.createFromString(pathData, opts);\n\n if (rect) {\n if (layout === 'center') {\n rect = centerGraphic(rect, path.getBoundingRect());\n }\n\n resizePath(path, rect);\n }\n\n return path;\n}\n/**\n * Create a image element from image url\n * @param {string} imageUrl image url\n * @param {Object} opts options\n * @param {module:zrender/core/BoundingRect} rect constrain rect\n * @param {string} [layout=cover] 'center' or 'cover'\n */\n\n\nfunction makeImage(imageUrl, rect, layout) {\n var path = new ZImage({\n style: {\n image: imageUrl,\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n onload: function (img) {\n if (layout === 'center') {\n var boundingRect = {\n width: img.width,\n height: img.height\n };\n path.setStyle(centerGraphic(rect, boundingRect));\n }\n }\n });\n return path;\n}\n/**\n * Get position of centered element in bounding box.\n *\n * @param {Object} rect element local bounding box\n * @param {Object} boundingRect constraint bounding box\n * @return {Object} element position containing x, y, width, and height\n */\n\n\nfunction centerGraphic(rect, boundingRect) {\n // Set rect to center, keep width / height ratio.\n var aspect = boundingRect.width / boundingRect.height;\n var width = rect.height * aspect;\n var height;\n\n if (width <= rect.width) {\n height = rect.height;\n } else {\n width = rect.width;\n height = width / aspect;\n }\n\n var cx = rect.x + rect.width / 2;\n var cy = rect.y + rect.height / 2;\n return {\n x: cx - width / 2,\n y: cy - height / 2,\n width: width,\n height: height\n };\n}\n\nvar mergePath = pathTool.mergePath;\n/**\n * Resize a path to fit the rect\n * @param {module:zrender/graphic/Path} path\n * @param {Object} rect\n */\n\nfunction resizePath(path, rect) {\n if (!path.applyTransform) {\n return;\n }\n\n var pathRect = path.getBoundingRect();\n var m = pathRect.calculateTransform(rect);\n path.applyTransform(m);\n}\n/**\n * Sub pixel optimize line for canvas\n *\n * @param {Object} param\n * @param {Object} [param.shape]\n * @param {number} [param.shape.x1]\n * @param {number} [param.shape.y1]\n * @param {number} [param.shape.x2]\n * @param {number} [param.shape.y2]\n * @param {Object} [param.style]\n * @param {number} [param.style.lineWidth]\n * @return {Object} Modified param\n */\n\n\nfunction subPixelOptimizeLine(param) {\n subPixelOptimizeUtil.subPixelOptimizeLine(param.shape, param.shape, param.style);\n return param;\n}\n/**\n * Sub pixel optimize rect for canvas\n *\n * @param {Object} param\n * @param {Object} [param.shape]\n * @param {number} [param.shape.x]\n * @param {number} [param.shape.y]\n * @param {number} [param.shape.width]\n * @param {number} [param.shape.height]\n * @param {Object} [param.style]\n * @param {number} [param.style.lineWidth]\n * @return {Object} Modified param\n */\n\n\nfunction subPixelOptimizeRect(param) {\n subPixelOptimizeUtil.subPixelOptimizeRect(param.shape, param.shape, param.style);\n return param;\n}\n/**\n * Sub pixel optimize for canvas\n *\n * @param {number} position Coordinate, such as x, y\n * @param {number} lineWidth Should be nonnegative integer.\n * @param {boolean=} positiveOrNegative Default false (negative).\n * @return {number} Optimized position.\n */\n\n\nvar subPixelOptimize = subPixelOptimizeUtil.subPixelOptimize;\n\nfunction hasFillOrStroke(fillOrStroke) {\n return fillOrStroke != null && fillOrStroke !== 'none';\n} // Most lifted color are duplicated.\n\n\nvar liftedColorMap = zrUtil.createHashMap();\nvar liftedColorCount = 0;\n\nfunction liftColor(color) {\n if (typeof color !== 'string') {\n return color;\n }\n\n var liftedColor = liftedColorMap.get(color);\n\n if (!liftedColor) {\n liftedColor = colorTool.lift(color, -0.1);\n\n if (liftedColorCount < 10000) {\n liftedColorMap.set(color, liftedColor);\n liftedColorCount++;\n }\n }\n\n return liftedColor;\n}\n\nfunction cacheElementStl(el) {\n if (!el.__hoverStlDirty) {\n return;\n }\n\n el.__hoverStlDirty = false;\n var hoverStyle = el.__hoverStl;\n\n if (!hoverStyle) {\n el.__cachedNormalStl = el.__cachedNormalZ2 = null;\n return;\n }\n\n var normalStyle = el.__cachedNormalStl = {};\n el.__cachedNormalZ2 = el.z2;\n var elStyle = el.style;\n\n for (var name in hoverStyle) {\n // See comment in `singleEnterEmphasis`.\n if (hoverStyle[name] != null) {\n normalStyle[name] = elStyle[name];\n }\n } // Always cache fill and stroke to normalStyle for lifting color.\n\n\n normalStyle.fill = elStyle.fill;\n normalStyle.stroke = elStyle.stroke;\n}\n\nfunction singleEnterEmphasis(el) {\n var hoverStl = el.__hoverStl;\n\n if (!hoverStl || el.__highlighted) {\n return;\n }\n\n var zr = el.__zr;\n var useHoverLayer = el.useHoverLayer && zr && zr.painter.type === 'canvas';\n el.__highlighted = useHoverLayer ? 'layer' : 'plain';\n\n if (el.isGroup || !zr && el.useHoverLayer) {\n return;\n }\n\n var elTarget = el;\n var targetStyle = el.style;\n\n if (useHoverLayer) {\n elTarget = zr.addHover(el);\n targetStyle = elTarget.style;\n }\n\n rollbackDefaultTextStyle(targetStyle);\n\n if (!useHoverLayer) {\n cacheElementStl(elTarget);\n } // styles can be:\n // {\n // label: {\n // show: false,\n // position: 'outside',\n // fontSize: 18\n // },\n // emphasis: {\n // label: {\n // show: true\n // }\n // }\n // },\n // where properties of `emphasis` may not appear in `normal`. We previously use\n // module:echarts/util/model#defaultEmphasis to merge `normal` to `emphasis`.\n // But consider rich text and setOption in merge mode, it is impossible to cover\n // all properties in merge. So we use merge mode when setting style here.\n // But we choose the merge strategy that only properties that is not `null/undefined`.\n // Because when making a textStyle (espacially rich text), it is not easy to distinguish\n // `hasOwnProperty` and `null/undefined` in code, so we trade them as the same for simplicity.\n // But this strategy brings a trouble that `null/undefined` can not be used to remove\n // style any more in `emphasis`. Users can both set properties directly on normal and\n // emphasis to avoid this issue, or we might support `'none'` for this case if required.\n\n\n targetStyle.extendFrom(hoverStl);\n setDefaultHoverFillStroke(targetStyle, hoverStl, 'fill');\n setDefaultHoverFillStroke(targetStyle, hoverStl, 'stroke');\n applyDefaultTextStyle(targetStyle);\n\n if (!useHoverLayer) {\n el.dirty(false);\n el.z2 += Z2_EMPHASIS_LIFT;\n }\n}\n\nfunction setDefaultHoverFillStroke(targetStyle, hoverStyle, prop) {\n if (!hasFillOrStroke(hoverStyle[prop]) && hasFillOrStroke(targetStyle[prop])) {\n targetStyle[prop] = liftColor(targetStyle[prop]);\n }\n}\n\nfunction singleEnterNormal(el) {\n var highlighted = el.__highlighted;\n\n if (!highlighted) {\n return;\n }\n\n el.__highlighted = false;\n\n if (el.isGroup) {\n return;\n }\n\n if (highlighted === 'layer') {\n el.__zr && el.__zr.removeHover(el);\n } else {\n var style = el.style;\n var normalStl = el.__cachedNormalStl;\n\n if (normalStl) {\n rollbackDefaultTextStyle(style);\n el.setStyle(normalStl);\n applyDefaultTextStyle(style);\n } // `__cachedNormalZ2` will not be reset if calling `setElementHoverStyle`\n // when `el` is on emphasis state. So here by comparing with 1, we try\n // hard to make the bug case rare.\n\n\n var normalZ2 = el.__cachedNormalZ2;\n\n if (normalZ2 != null && el.z2 - normalZ2 === Z2_EMPHASIS_LIFT) {\n el.z2 = normalZ2;\n }\n }\n}\n\nfunction traverseUpdate(el, updater, commonParam) {\n // If root is group, also enter updater for `highDownOnUpdate`.\n var fromState = NORMAL;\n var toState = NORMAL;\n var trigger; // See the rule of `highDownOnUpdate` on `graphic.setAsHighDownDispatcher`.\n\n el.__highlighted && (fromState = EMPHASIS, trigger = true);\n updater(el, commonParam);\n el.__highlighted && (toState = EMPHASIS, trigger = true);\n el.isGroup && el.traverse(function (child) {\n !child.isGroup && updater(child, commonParam);\n });\n trigger && el.__highDownOnUpdate && el.__highDownOnUpdate(fromState, toState);\n}\n/**\n * Set hover style (namely \"emphasis style\") of element, based on the current\n * style of the given `el`.\n * This method should be called after all of the normal styles have been adopted\n * to the `el`. See the reason on `setHoverStyle`.\n *\n * @param {module:zrender/Element} el Should not be `zrender/container/Group`.\n * @param {Object} [el.hoverStyle] Can be set on el or its descendants,\n * e.g., `el.hoverStyle = ...; graphic.setHoverStyle(el); `.\n * Often used when item group has a label element and it's hoverStyle is different.\n * @param {Object|boolean} [hoverStl] The specified hover style.\n * If set as `false`, disable the hover style.\n * Similarly, The `el.hoverStyle` can alse be set\n * as `false` to disable the hover style.\n * Otherwise, use the default hover style if not provided.\n */\n\n\nfunction setElementHoverStyle(el, hoverStl) {\n // For performance consideration, it might be better to make the \"hover style\" only the\n // difference properties from the \"normal style\", but not a entire copy of all styles.\n hoverStl = el.__hoverStl = hoverStl !== false && (el.hoverStyle || hoverStl || {});\n el.__hoverStlDirty = true; // FIXME\n // It is not completely right to save \"normal\"/\"emphasis\" flag on elements.\n // It probably should be saved on `data` of series. Consider the cases:\n // (1) A highlighted elements are moved out of the view port and re-enter\n // again by dataZoom.\n // (2) call `setOption` and replace elements totally when they are highlighted.\n\n if (el.__highlighted) {\n // Consider the case:\n // The styles of a highlighted `el` is being updated. The new \"emphasis style\"\n // should be adapted to the `el`. Notice here new \"normal styles\" should have\n // been set outside and the cached \"normal style\" is out of date.\n el.__cachedNormalStl = null; // Do not clear `__cachedNormalZ2` here, because setting `z2` is not a constraint\n // of this method. In most cases, `z2` is not set and hover style should be able\n // to rollback. Of course, that would bring bug, but only in a rare case, see\n // `doSingleLeaveHover` for details.\n\n singleEnterNormal(el);\n singleEnterEmphasis(el);\n }\n}\n\nfunction onElementMouseOver(e) {\n !shouldSilent(this, e) // \"emphasis\" event highlight has higher priority than mouse highlight.\n && !this.__highByOuter && traverseUpdate(this, singleEnterEmphasis);\n}\n\nfunction onElementMouseOut(e) {\n !shouldSilent(this, e) // \"emphasis\" event highlight has higher priority than mouse highlight.\n && !this.__highByOuter && traverseUpdate(this, singleEnterNormal);\n}\n\nfunction onElementEmphasisEvent(highlightDigit) {\n this.__highByOuter |= 1 << (highlightDigit || 0);\n traverseUpdate(this, singleEnterEmphasis);\n}\n\nfunction onElementNormalEvent(highlightDigit) {\n !(this.__highByOuter &= ~(1 << (highlightDigit || 0))) && traverseUpdate(this, singleEnterNormal);\n}\n\nfunction shouldSilent(el, e) {\n return el.__highDownSilentOnTouch && e.zrByTouch;\n}\n/**\n * Set hover style (namely \"emphasis style\") of element,\n * based on the current style of the given `el`.\n *\n * (1)\n * **CONSTRAINTS** for this method:\n * This method MUST be called after all of the normal styles having been adopted\n * to the `el`.\n * The input `hoverStyle` (that is, \"emphasis style\") MUST be the subset of the\n * \"normal style\" having been set to the el.\n * `color` MUST be one of the \"normal styles\" (because color might be lifted as\n * a default hover style).\n *\n * The reason: this method treat the current style of the `el` as the \"normal style\"\n * and cache them when enter/update the \"emphasis style\". Consider the case: the `el`\n * is in \"emphasis\" state and `setOption`/`dispatchAction` trigger the style updating\n * logic, where the el should shift from the original emphasis style to the new\n * \"emphasis style\" and should be able to \"downplay\" back to the new \"normal style\".\n *\n * Indeed, it is error-prone to make a interface has so many constraints, but I have\n * not found a better solution yet to fit the backward compatibility, performance and\n * the current programming style.\n *\n * (2)\n * Call the method for a \"root\" element once. Do not call it for each descendants.\n * If the descendants elemenets of a group has itself hover style different from the\n * root group, we can simply mount the style on `el.hoverStyle` for them, but should\n * not call this method for them.\n *\n * (3) These input parameters can be set directly on `el`:\n *\n * @param {module:zrender/Element} el\n * @param {Object} [el.hoverStyle] See `graphic.setElementHoverStyle`.\n * @param {boolean} [el.highDownSilentOnTouch=false] See `graphic.setAsHighDownDispatcher`.\n * @param {Function} [el.highDownOnUpdate] See `graphic.setAsHighDownDispatcher`.\n * @param {Object|boolean} [hoverStyle] See `graphic.setElementHoverStyle`.\n */\n\n\nfunction setHoverStyle(el, hoverStyle) {\n setAsHighDownDispatcher(el, true);\n traverseUpdate(el, setElementHoverStyle, hoverStyle);\n}\n/**\n * @param {module:zrender/Element} el\n * @param {Function} [el.highDownOnUpdate] Called when state updated.\n * Since `setHoverStyle` has the constraint that it must be called after\n * all of the normal style updated, `highDownOnUpdate` is not needed to\n * trigger if both `fromState` and `toState` is 'normal', and needed to\n * trigger if both `fromState` and `toState` is 'emphasis', which enables\n * to sync outside style settings to \"emphasis\" state.\n * @this {string} This dispatcher `el`.\n * @param {string} fromState Can be \"normal\" or \"emphasis\".\n * `fromState` might equal to `toState`,\n * for example, when this method is called when `el` is\n * on \"emphasis\" state.\n * @param {string} toState Can be \"normal\" or \"emphasis\".\n *\n * FIXME\n * CAUTION: Do not expose `highDownOnUpdate` outside echarts.\n * Because it is not a complete solution. The update\n * listener should not have been mount in element,\n * and the normal/emphasis state should not have\n * mantained on elements.\n *\n * @param {boolean} [el.highDownSilentOnTouch=false]\n * In touch device, mouseover event will be trigger on touchstart event\n * (see module:zrender/dom/HandlerProxy). By this mechanism, we can\n * conveniently use hoverStyle when tap on touch screen without additional\n * code for compatibility.\n * But if the chart/component has select feature, which usually also use\n * hoverStyle, there might be conflict between 'select-highlight' and\n * 'hover-highlight' especially when roam is enabled (see geo for example).\n * In this case, `highDownSilentOnTouch` should be used to disable\n * hover-highlight on touch device.\n * @param {boolean} [asDispatcher=true] If `false`, do not set as \"highDownDispatcher\".\n */\n\n\nfunction setAsHighDownDispatcher(el, asDispatcher) {\n var disable = asDispatcher === false; // Make `highDownSilentOnTouch` and `highDownOnUpdate` only work after\n // `setAsHighDownDispatcher` called. Avoid it is modified by user unexpectedly.\n\n el.__highDownSilentOnTouch = el.highDownSilentOnTouch;\n el.__highDownOnUpdate = el.highDownOnUpdate; // Simple optimize, since this method might be\n // called for each elements of a group in some cases.\n\n if (!disable || el.__highDownDispatcher) {\n var method = disable ? 'off' : 'on'; // Duplicated function will be auto-ignored, see Eventful.js.\n\n el[method]('mouseover', onElementMouseOver)[method]('mouseout', onElementMouseOut); // Emphasis, normal can be triggered manually by API or other components like hover link.\n\n el[method]('emphasis', onElementEmphasisEvent)[method]('normal', onElementNormalEvent); // Also keep previous record.\n\n el.__highByOuter = el.__highByOuter || 0;\n el.__highDownDispatcher = !disable;\n }\n}\n/**\n * @param {module:zrender/src/Element} el\n * @return {boolean}\n */\n\n\nfunction isHighDownDispatcher(el) {\n return !!(el && el.__highDownDispatcher);\n}\n/**\n * Support hightlight/downplay record on each elements.\n * For the case: hover highlight/downplay (legend, visualMap, ...) and\n * user triggerred hightlight/downplay should not conflict.\n * Only all of the highlightDigit cleared, return to normal.\n * @param {string} highlightKey\n * @return {number} highlightDigit\n */\n\n\nfunction getHighlightDigit(highlightKey) {\n var highlightDigit = _highlightKeyMap[highlightKey];\n\n if (highlightDigit == null && _highlightNextDigit <= 32) {\n highlightDigit = _highlightKeyMap[highlightKey] = _highlightNextDigit++;\n }\n\n return highlightDigit;\n}\n/**\n * See more info in `setTextStyleCommon`.\n * @param {Object|module:zrender/graphic/Style} normalStyle\n * @param {Object} emphasisStyle\n * @param {module:echarts/model/Model} normalModel\n * @param {module:echarts/model/Model} emphasisModel\n * @param {Object} opt Check `opt` of `setTextStyleCommon` to find other props.\n * @param {string|Function} [opt.defaultText]\n * @param {module:echarts/model/Model} [opt.labelFetcher] Fetch text by\n * `opt.labelFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`\n * @param {number} [opt.labelDataIndex] Fetch text by\n * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`\n * @param {number} [opt.labelDimIndex] Fetch text by\n * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`\n * @param {string} [opt.labelProp] Fetch text by\n * `opt.textFetcher.getFormattedLabel(opt.labelDataIndex, 'normal'/'emphasis', null, opt.labelDimIndex, opt.labelProp)`\n * @param {Object} [normalSpecified]\n * @param {Object} [emphasisSpecified]\n */\n\n\nfunction setLabelStyle(normalStyle, emphasisStyle, normalModel, emphasisModel, opt, normalSpecified, emphasisSpecified) {\n opt = opt || EMPTY_OBJ;\n var labelFetcher = opt.labelFetcher;\n var labelDataIndex = opt.labelDataIndex;\n var labelDimIndex = opt.labelDimIndex;\n var labelProp = opt.labelProp; // This scenario, `label.normal.show = true; label.emphasis.show = false`,\n // is not supported util someone requests.\n\n var showNormal = normalModel.getShallow('show');\n var showEmphasis = emphasisModel.getShallow('show'); // Consider performance, only fetch label when necessary.\n // If `normal.show` is `false` and `emphasis.show` is `true` and `emphasis.formatter` is not set,\n // label should be displayed, where text is fetched by `normal.formatter` or `opt.defaultText`.\n\n var baseText;\n\n if (showNormal || showEmphasis) {\n if (labelFetcher) {\n baseText = labelFetcher.getFormattedLabel(labelDataIndex, 'normal', null, labelDimIndex, labelProp);\n }\n\n if (baseText == null) {\n baseText = zrUtil.isFunction(opt.defaultText) ? opt.defaultText(labelDataIndex, opt) : opt.defaultText;\n }\n }\n\n var normalStyleText = showNormal ? baseText : null;\n var emphasisStyleText = showEmphasis ? zrUtil.retrieve2(labelFetcher ? labelFetcher.getFormattedLabel(labelDataIndex, 'emphasis', null, labelDimIndex, labelProp) : null, baseText) : null; // Optimize: If style.text is null, text will not be drawn.\n\n if (normalStyleText != null || emphasisStyleText != null) {\n // Always set `textStyle` even if `normalStyle.text` is null, because default\n // values have to be set on `normalStyle`.\n // If we set default values on `emphasisStyle`, consider case:\n // Firstly, `setOption(... label: {normal: {text: null}, emphasis: {show: true}} ...);`\n // Secondly, `setOption(... label: {noraml: {show: true, text: 'abc', color: 'red'} ...);`\n // Then the 'red' will not work on emphasis.\n setTextStyle(normalStyle, normalModel, normalSpecified, opt);\n setTextStyle(emphasisStyle, emphasisModel, emphasisSpecified, opt, true);\n }\n\n normalStyle.text = normalStyleText;\n emphasisStyle.text = emphasisStyleText;\n}\n/**\n * Modify label style manually.\n * Only works after `setLabelStyle` and `setElementHoverStyle` called.\n *\n * @param {module:zrender/src/Element} el\n * @param {Object} [normalStyleProps] optional\n * @param {Object} [emphasisStyleProps] optional\n */\n\n\nfunction modifyLabelStyle(el, normalStyleProps, emphasisStyleProps) {\n var elStyle = el.style;\n\n if (normalStyleProps) {\n rollbackDefaultTextStyle(elStyle);\n el.setStyle(normalStyleProps);\n applyDefaultTextStyle(elStyle);\n }\n\n elStyle = el.__hoverStl;\n\n if (emphasisStyleProps && elStyle) {\n rollbackDefaultTextStyle(elStyle);\n zrUtil.extend(elStyle, emphasisStyleProps);\n applyDefaultTextStyle(elStyle);\n }\n}\n/**\n * Set basic textStyle properties.\n * See more info in `setTextStyleCommon`.\n * @param {Object|module:zrender/graphic/Style} textStyle\n * @param {module:echarts/model/Model} model\n * @param {Object} [specifiedTextStyle] Can be overrided by settings in model.\n * @param {Object} [opt] See `opt` of `setTextStyleCommon`.\n * @param {boolean} [isEmphasis]\n */\n\n\nfunction setTextStyle(textStyle, textStyleModel, specifiedTextStyle, opt, isEmphasis) {\n setTextStyleCommon(textStyle, textStyleModel, opt, isEmphasis);\n specifiedTextStyle && zrUtil.extend(textStyle, specifiedTextStyle); // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false);\n\n return textStyle;\n}\n/**\n * Set text option in the style.\n * See more info in `setTextStyleCommon`.\n * @deprecated\n * @param {Object} textStyle\n * @param {module:echarts/model/Model} labelModel\n * @param {string|boolean} defaultColor Default text color.\n * If set as false, it will be processed as a emphasis style.\n */\n\n\nfunction setText(textStyle, labelModel, defaultColor) {\n var opt = {\n isRectText: true\n };\n var isEmphasis;\n\n if (defaultColor === false) {\n isEmphasis = true;\n } else {\n // Support setting color as 'auto' to get visual color.\n opt.autoColor = defaultColor;\n }\n\n setTextStyleCommon(textStyle, labelModel, opt, isEmphasis); // textStyle.host && textStyle.host.dirty && textStyle.host.dirty(false);\n}\n/**\n * The uniform entry of set text style, that is, retrieve style definitions\n * from `model` and set to `textStyle` object.\n *\n * Never in merge mode, but in overwrite mode, that is, all of the text style\n * properties will be set. (Consider the states of normal and emphasis and\n * default value can be adopted, merge would make the logic too complicated\n * to manage.)\n *\n * The `textStyle` object can either be a plain object or an instance of\n * `zrender/src/graphic/Style`, and either be the style of normal or emphasis.\n * After this mothod called, the `textStyle` object can then be used in\n * `el.setStyle(textStyle)` or `el.hoverStyle = textStyle`.\n *\n * Default value will be adopted and `insideRollbackOpt` will be created.\n * See `applyDefaultTextStyle` `rollbackDefaultTextStyle` for more details.\n *\n * opt: {\n * disableBox: boolean, Whether diable drawing box of block (outer most).\n * isRectText: boolean,\n * autoColor: string, specify a color when color is 'auto',\n * for textFill, textStroke, textBackgroundColor, and textBorderColor.\n * If autoColor specified, it is used as default textFill.\n * useInsideStyle:\n * `true`: Use inside style (textFill, textStroke, textStrokeWidth)\n * if `textFill` is not specified.\n * `false`: Do not use inside style.\n * `null/undefined`: use inside style if `isRectText` is true and\n * `textFill` is not specified and textPosition contains `'inside'`.\n * forceRich: boolean\n * }\n */\n\n\nfunction setTextStyleCommon(textStyle, textStyleModel, opt, isEmphasis) {\n // Consider there will be abnormal when merge hover style to normal style if given default value.\n opt = opt || EMPTY_OBJ;\n\n if (opt.isRectText) {\n var textPosition;\n\n if (opt.getTextPosition) {\n textPosition = opt.getTextPosition(textStyleModel, isEmphasis);\n } else {\n textPosition = textStyleModel.getShallow('position') || (isEmphasis ? null : 'inside'); // 'outside' is not a valid zr textPostion value, but used\n // in bar series, and magric type should be considered.\n\n textPosition === 'outside' && (textPosition = 'top');\n }\n\n textStyle.textPosition = textPosition;\n textStyle.textOffset = textStyleModel.getShallow('offset');\n var labelRotate = textStyleModel.getShallow('rotate');\n labelRotate != null && (labelRotate *= Math.PI / 180);\n textStyle.textRotation = labelRotate;\n textStyle.textDistance = zrUtil.retrieve2(textStyleModel.getShallow('distance'), isEmphasis ? null : 5);\n }\n\n var ecModel = textStyleModel.ecModel;\n var globalTextStyle = ecModel && ecModel.option.textStyle; // Consider case:\n // {\n // data: [{\n // value: 12,\n // label: {\n // rich: {\n // // no 'a' here but using parent 'a'.\n // }\n // }\n // }],\n // rich: {\n // a: { ... }\n // }\n // }\n\n var richItemNames = getRichItemNames(textStyleModel);\n var richResult;\n\n if (richItemNames) {\n richResult = {};\n\n for (var name in richItemNames) {\n if (richItemNames.hasOwnProperty(name)) {\n // Cascade is supported in rich.\n var richTextStyle = textStyleModel.getModel(['rich', name]); // In rich, never `disableBox`.\n // FIXME: consider `label: {formatter: '{a|xx}', color: 'blue', rich: {a: {}}}`,\n // the default color `'blue'` will not be adopted if no color declared in `rich`.\n // That might confuses users. So probably we should put `textStyleModel` as the\n // root ancestor of the `richTextStyle`. But that would be a break change.\n\n setTokenTextStyle(richResult[name] = {}, richTextStyle, globalTextStyle, opt, isEmphasis);\n }\n }\n }\n\n textStyle.rich = richResult;\n setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isEmphasis, true);\n\n if (opt.forceRich && !opt.textStyle) {\n opt.textStyle = {};\n }\n\n return textStyle;\n} // Consider case:\n// {\n// data: [{\n// value: 12,\n// label: {\n// rich: {\n// // no 'a' here but using parent 'a'.\n// }\n// }\n// }],\n// rich: {\n// a: { ... }\n// }\n// }\n\n\nfunction getRichItemNames(textStyleModel) {\n // Use object to remove duplicated names.\n var richItemNameMap;\n\n while (textStyleModel && textStyleModel !== textStyleModel.ecModel) {\n var rich = (textStyleModel.option || EMPTY_OBJ).rich;\n\n if (rich) {\n richItemNameMap = richItemNameMap || {};\n\n for (var name in rich) {\n if (rich.hasOwnProperty(name)) {\n richItemNameMap[name] = 1;\n }\n }\n }\n\n textStyleModel = textStyleModel.parentModel;\n }\n\n return richItemNameMap;\n}\n\nfunction setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isEmphasis, isBlock) {\n // In merge mode, default value should not be given.\n globalTextStyle = !isEmphasis && globalTextStyle || EMPTY_OBJ;\n textStyle.textFill = getAutoColor(textStyleModel.getShallow('color'), opt) || globalTextStyle.color;\n textStyle.textStroke = getAutoColor(textStyleModel.getShallow('textBorderColor'), opt) || globalTextStyle.textBorderColor;\n textStyle.textStrokeWidth = zrUtil.retrieve2(textStyleModel.getShallow('textBorderWidth'), globalTextStyle.textBorderWidth);\n\n if (!isEmphasis) {\n if (isBlock) {\n textStyle.insideRollbackOpt = opt;\n applyDefaultTextStyle(textStyle);\n } // Set default finally.\n\n\n if (textStyle.textFill == null) {\n textStyle.textFill = opt.autoColor;\n }\n } // Do not use `getFont` here, because merge should be supported, where\n // part of these properties may be changed in emphasis style, and the\n // others should remain their original value got from normal style.\n\n\n textStyle.fontStyle = textStyleModel.getShallow('fontStyle') || globalTextStyle.fontStyle;\n textStyle.fontWeight = textStyleModel.getShallow('fontWeight') || globalTextStyle.fontWeight;\n textStyle.fontSize = textStyleModel.getShallow('fontSize') || globalTextStyle.fontSize;\n textStyle.fontFamily = textStyleModel.getShallow('fontFamily') || globalTextStyle.fontFamily;\n textStyle.textAlign = textStyleModel.getShallow('align');\n textStyle.textVerticalAlign = textStyleModel.getShallow('verticalAlign') || textStyleModel.getShallow('baseline');\n textStyle.textLineHeight = textStyleModel.getShallow('lineHeight');\n textStyle.textWidth = textStyleModel.getShallow('width');\n textStyle.textHeight = textStyleModel.getShallow('height');\n textStyle.textTag = textStyleModel.getShallow('tag');\n\n if (!isBlock || !opt.disableBox) {\n textStyle.textBackgroundColor = getAutoColor(textStyleModel.getShallow('backgroundColor'), opt);\n textStyle.textPadding = textStyleModel.getShallow('padding');\n textStyle.textBorderColor = getAutoColor(textStyleModel.getShallow('borderColor'), opt);\n textStyle.textBorderWidth = textStyleModel.getShallow('borderWidth');\n textStyle.textBorderRadius = textStyleModel.getShallow('borderRadius');\n textStyle.textBoxShadowColor = textStyleModel.getShallow('shadowColor');\n textStyle.textBoxShadowBlur = textStyleModel.getShallow('shadowBlur');\n textStyle.textBoxShadowOffsetX = textStyleModel.getShallow('shadowOffsetX');\n textStyle.textBoxShadowOffsetY = textStyleModel.getShallow('shadowOffsetY');\n }\n\n textStyle.textShadowColor = textStyleModel.getShallow('textShadowColor') || globalTextStyle.textShadowColor;\n textStyle.textShadowBlur = textStyleModel.getShallow('textShadowBlur') || globalTextStyle.textShadowBlur;\n textStyle.textShadowOffsetX = textStyleModel.getShallow('textShadowOffsetX') || globalTextStyle.textShadowOffsetX;\n textStyle.textShadowOffsetY = textStyleModel.getShallow('textShadowOffsetY') || globalTextStyle.textShadowOffsetY;\n}\n\nfunction getAutoColor(color, opt) {\n return color !== 'auto' ? color : opt && opt.autoColor ? opt.autoColor : null;\n}\n/**\n * Give some default value to the input `textStyle` object, based on the current settings\n * in this `textStyle` object.\n *\n * The Scenario:\n * when text position is `inside` and `textFill` is not specified, we show\n * text border by default for better view. But it should be considered that text position\n * might be changed when hovering or being emphasis, where the `insideRollback` is used to\n * restore the style.\n *\n * Usage (& NOTICE):\n * When a style object (eithor plain object or instance of `zrender/src/graphic/Style`) is\n * about to be modified on its text related properties, `rollbackDefaultTextStyle` should\n * be called before the modification and `applyDefaultTextStyle` should be called after that.\n * (For the case that all of the text related properties is reset, like `setTextStyleCommon`\n * does, `rollbackDefaultTextStyle` is not needed to be called).\n */\n\n\nfunction applyDefaultTextStyle(textStyle) {\n var textPosition = textStyle.textPosition;\n var opt = textStyle.insideRollbackOpt;\n var insideRollback;\n\n if (opt && textStyle.textFill == null) {\n var autoColor = opt.autoColor;\n var isRectText = opt.isRectText;\n var useInsideStyle = opt.useInsideStyle;\n var useInsideStyleCache = useInsideStyle !== false && (useInsideStyle === true || isRectText && textPosition // textPosition can be [10, 30]\n && typeof textPosition === 'string' && textPosition.indexOf('inside') >= 0);\n var useAutoColorCache = !useInsideStyleCache && autoColor != null; // All of the props declared in `CACHED_LABEL_STYLE_PROPERTIES` are to be cached.\n\n if (useInsideStyleCache || useAutoColorCache) {\n insideRollback = {\n textFill: textStyle.textFill,\n textStroke: textStyle.textStroke,\n textStrokeWidth: textStyle.textStrokeWidth\n };\n }\n\n if (useInsideStyleCache) {\n textStyle.textFill = '#fff'; // Consider text with #fff overflow its container.\n\n if (textStyle.textStroke == null) {\n textStyle.textStroke = autoColor;\n textStyle.textStrokeWidth == null && (textStyle.textStrokeWidth = 2);\n }\n }\n\n if (useAutoColorCache) {\n textStyle.textFill = autoColor;\n }\n } // Always set `insideRollback`, so that the previous one can be cleared.\n\n\n textStyle.insideRollback = insideRollback;\n}\n/**\n * Consider the case: in a scatter,\n * label: {\n * normal: {position: 'inside'},\n * emphasis: {position: 'top'}\n * }\n * In the normal state, the `textFill` will be set as '#fff' for pretty view (see\n * `applyDefaultTextStyle`), but when switching to emphasis state, the `textFill`\n * should be retured to 'autoColor', but not keep '#fff'.\n */\n\n\nfunction rollbackDefaultTextStyle(style) {\n var insideRollback = style.insideRollback;\n\n if (insideRollback) {\n // Reset all of the props in `CACHED_LABEL_STYLE_PROPERTIES`.\n style.textFill = insideRollback.textFill;\n style.textStroke = insideRollback.textStroke;\n style.textStrokeWidth = insideRollback.textStrokeWidth;\n style.insideRollback = null;\n }\n}\n\nfunction getFont(opt, ecModel) {\n var gTextStyleModel = ecModel && ecModel.getModel('textStyle');\n return zrUtil.trim([// FIXME in node-canvas fontWeight is before fontStyle\n opt.fontStyle || gTextStyleModel && gTextStyleModel.getShallow('fontStyle') || '', opt.fontWeight || gTextStyleModel && gTextStyleModel.getShallow('fontWeight') || '', (opt.fontSize || gTextStyleModel && gTextStyleModel.getShallow('fontSize') || 12) + 'px', opt.fontFamily || gTextStyleModel && gTextStyleModel.getShallow('fontFamily') || 'sans-serif'].join(' '));\n}\n\nfunction animateOrSetProps(isUpdate, el, props, animatableModel, dataIndex, cb) {\n if (typeof dataIndex === 'function') {\n cb = dataIndex;\n dataIndex = null;\n } // Do not check 'animation' property directly here. Consider this case:\n // animation model is an `itemModel`, whose does not have `isAnimationEnabled`\n // but its parent model (`seriesModel`) does.\n\n\n var animationEnabled = animatableModel && animatableModel.isAnimationEnabled();\n\n if (animationEnabled) {\n var postfix = isUpdate ? 'Update' : '';\n var duration = animatableModel.getShallow('animationDuration' + postfix);\n var animationEasing = animatableModel.getShallow('animationEasing' + postfix);\n var animationDelay = animatableModel.getShallow('animationDelay' + postfix);\n\n if (typeof animationDelay === 'function') {\n animationDelay = animationDelay(dataIndex, animatableModel.getAnimationDelayParams ? animatableModel.getAnimationDelayParams(el, dataIndex) : null);\n }\n\n if (typeof duration === 'function') {\n duration = duration(dataIndex);\n }\n\n duration > 0 ? el.animateTo(props, duration, animationDelay || 0, animationEasing, cb, !!cb) : (el.stopAnimation(), el.attr(props), cb && cb());\n } else {\n el.stopAnimation();\n el.attr(props);\n cb && cb();\n }\n}\n/**\n * Update graphic element properties with or without animation according to the\n * configuration in series.\n *\n * Caution: this method will stop previous animation.\n * So do not use this method to one element twice before\n * animation starts, unless you know what you are doing.\n *\n * @param {module:zrender/Element} el\n * @param {Object} props\n * @param {module:echarts/model/Model} [animatableModel]\n * @param {number} [dataIndex]\n * @param {Function} [cb]\n * @example\n * graphic.updateProps(el, {\n * position: [100, 100]\n * }, seriesModel, dataIndex, function () { console.log('Animation done!'); });\n * // Or\n * graphic.updateProps(el, {\n * position: [100, 100]\n * }, seriesModel, function () { console.log('Animation done!'); });\n */\n\n\nfunction updateProps(el, props, animatableModel, dataIndex, cb) {\n animateOrSetProps(true, el, props, animatableModel, dataIndex, cb);\n}\n/**\n * Init graphic element properties with or without animation according to the\n * configuration in series.\n *\n * Caution: this method will stop previous animation.\n * So do not use this method to one element twice before\n * animation starts, unless you know what you are doing.\n *\n * @param {module:zrender/Element} el\n * @param {Object} props\n * @param {module:echarts/model/Model} [animatableModel]\n * @param {number} [dataIndex]\n * @param {Function} cb\n */\n\n\nfunction initProps(el, props, animatableModel, dataIndex, cb) {\n animateOrSetProps(false, el, props, animatableModel, dataIndex, cb);\n}\n/**\n * Get transform matrix of target (param target),\n * in coordinate of its ancestor (param ancestor)\n *\n * @param {module:zrender/mixin/Transformable} target\n * @param {module:zrender/mixin/Transformable} [ancestor]\n */\n\n\nfunction getTransform(target, ancestor) {\n var mat = matrix.identity([]);\n\n while (target && target !== ancestor) {\n matrix.mul(mat, target.getLocalTransform(), mat);\n target = target.parent;\n }\n\n return mat;\n}\n/**\n * Apply transform to an vertex.\n * @param {Array.} target [x, y]\n * @param {Array.|TypedArray.|Object} transform Can be:\n * + Transform matrix: like [1, 0, 0, 1, 0, 0]\n * + {position, rotation, scale}, the same as `zrender/Transformable`.\n * @param {boolean=} invert Whether use invert matrix.\n * @return {Array.} [x, y]\n */\n\n\nfunction applyTransform(target, transform, invert) {\n if (transform && !zrUtil.isArrayLike(transform)) {\n transform = Transformable.getLocalTransform(transform);\n }\n\n if (invert) {\n transform = matrix.invert([], transform);\n }\n\n return vector.applyTransform([], target, transform);\n}\n/**\n * @param {string} direction 'left' 'right' 'top' 'bottom'\n * @param {Array.} transform Transform matrix: like [1, 0, 0, 1, 0, 0]\n * @param {boolean=} invert Whether use invert matrix.\n * @return {string} Transformed direction. 'left' 'right' 'top' 'bottom'\n */\n\n\nfunction transformDirection(direction, transform, invert) {\n // Pick a base, ensure that transform result will not be (0, 0).\n var hBase = transform[4] === 0 || transform[5] === 0 || transform[0] === 0 ? 1 : Math.abs(2 * transform[4] / transform[0]);\n var vBase = transform[4] === 0 || transform[5] === 0 || transform[2] === 0 ? 1 : Math.abs(2 * transform[4] / transform[2]);\n var vertex = [direction === 'left' ? -hBase : direction === 'right' ? hBase : 0, direction === 'top' ? -vBase : direction === 'bottom' ? vBase : 0];\n vertex = applyTransform(vertex, transform, invert);\n return Math.abs(vertex[0]) > Math.abs(vertex[1]) ? vertex[0] > 0 ? 'right' : 'left' : vertex[1] > 0 ? 'bottom' : 'top';\n}\n/**\n * Apply group transition animation from g1 to g2.\n * If no animatableModel, no animation.\n */\n\n\nfunction groupTransition(g1, g2, animatableModel, cb) {\n if (!g1 || !g2) {\n return;\n }\n\n function getElMap(g) {\n var elMap = {};\n g.traverse(function (el) {\n if (!el.isGroup && el.anid) {\n elMap[el.anid] = el;\n }\n });\n return elMap;\n }\n\n function getAnimatableProps(el) {\n var obj = {\n position: vector.clone(el.position),\n rotation: el.rotation\n };\n\n if (el.shape) {\n obj.shape = zrUtil.extend({}, el.shape);\n }\n\n return obj;\n }\n\n var elMap1 = getElMap(g1);\n g2.traverse(function (el) {\n if (!el.isGroup && el.anid) {\n var oldEl = elMap1[el.anid];\n\n if (oldEl) {\n var newProp = getAnimatableProps(el);\n el.attr(getAnimatableProps(oldEl));\n updateProps(el, newProp, animatableModel, el.dataIndex);\n } // else {\n // if (el.previousProps) {\n // graphic.updateProps\n // }\n // }\n\n }\n });\n}\n/**\n * @param {Array.>} points Like: [[23, 44], [53, 66], ...]\n * @param {Object} rect {x, y, width, height}\n * @return {Array.>} A new clipped points.\n */\n\n\nfunction clipPointsByRect(points, rect) {\n // FIXME: this way migth be incorrect when grpahic clipped by a corner.\n // and when element have border.\n return zrUtil.map(points, function (point) {\n var x = point[0];\n x = mathMax(x, rect.x);\n x = mathMin(x, rect.x + rect.width);\n var y = point[1];\n y = mathMax(y, rect.y);\n y = mathMin(y, rect.y + rect.height);\n return [x, y];\n });\n}\n/**\n * @param {Object} targetRect {x, y, width, height}\n * @param {Object} rect {x, y, width, height}\n * @return {Object} A new clipped rect. If rect size are negative, return undefined.\n */\n\n\nfunction clipRectByRect(targetRect, rect) {\n var x = mathMax(targetRect.x, rect.x);\n var x2 = mathMin(targetRect.x + targetRect.width, rect.x + rect.width);\n var y = mathMax(targetRect.y, rect.y);\n var y2 = mathMin(targetRect.y + targetRect.height, rect.y + rect.height); // If the total rect is cliped, nothing, including the border,\n // should be painted. So return undefined.\n\n if (x2 >= x && y2 >= y) {\n return {\n x: x,\n y: y,\n width: x2 - x,\n height: y2 - y\n };\n }\n}\n/**\n * @param {string} iconStr Support 'image://' or 'path://' or direct svg path.\n * @param {Object} [opt] Properties of `module:zrender/Element`, except `style`.\n * @param {Object} [rect] {x, y, width, height}\n * @return {module:zrender/Element} Icon path or image element.\n */\n\n\nfunction createIcon(iconStr, opt, rect) {\n opt = zrUtil.extend({\n rectHover: true\n }, opt);\n var style = opt.style = {\n strokeNoScale: true\n };\n rect = rect || {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n };\n\n if (iconStr) {\n return iconStr.indexOf('image://') === 0 ? (style.image = iconStr.slice(8), zrUtil.defaults(style, rect), new ZImage(opt)) : makePath(iconStr.replace('path://', ''), opt, rect, 'center');\n }\n}\n/**\n * Return `true` if the given line (line `a`) and the given polygon\n * are intersect.\n * Note that we do not count colinear as intersect here because no\n * requirement for that. We could do that if required in future.\n *\n * @param {number} a1x\n * @param {number} a1y\n * @param {number} a2x\n * @param {number} a2y\n * @param {Array.>} points Points of the polygon.\n * @return {boolean}\n */\n\n\nfunction linePolygonIntersect(a1x, a1y, a2x, a2y, points) {\n for (var i = 0, p2 = points[points.length - 1]; i < points.length; i++) {\n var p = points[i];\n\n if (lineLineIntersect(a1x, a1y, a2x, a2y, p[0], p[1], p2[0], p2[1])) {\n return true;\n }\n\n p2 = p;\n }\n}\n/**\n * Return `true` if the given two lines (line `a` and line `b`)\n * are intersect.\n * Note that we do not count colinear as intersect here because no\n * requirement for that. We could do that if required in future.\n *\n * @param {number} a1x\n * @param {number} a1y\n * @param {number} a2x\n * @param {number} a2y\n * @param {number} b1x\n * @param {number} b1y\n * @param {number} b2x\n * @param {number} b2y\n * @return {boolean}\n */\n\n\nfunction lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) {\n // let `vec_m` to be `vec_a2 - vec_a1` and `vec_n` to be `vec_b2 - vec_b1`.\n var mx = a2x - a1x;\n var my = a2y - a1y;\n var nx = b2x - b1x;\n var ny = b2y - b1y; // `vec_m` and `vec_n` are parallel iff\n // exising `k` such that `vec_m = k · vec_n`, equivalent to `vec_m X vec_n = 0`.\n\n var nmCrossProduct = crossProduct2d(nx, ny, mx, my);\n\n if (nearZero(nmCrossProduct)) {\n return false;\n } // `vec_m` and `vec_n` are intersect iff\n // existing `p` and `q` in [0, 1] such that `vec_a1 + p * vec_m = vec_b1 + q * vec_n`,\n // such that `q = ((vec_a1 - vec_b1) X vec_m) / (vec_n X vec_m)`\n // and `p = ((vec_a1 - vec_b1) X vec_n) / (vec_n X vec_m)`.\n\n\n var b1a1x = a1x - b1x;\n var b1a1y = a1y - b1y;\n var q = crossProduct2d(b1a1x, b1a1y, mx, my) / nmCrossProduct;\n\n if (q < 0 || q > 1) {\n return false;\n }\n\n var p = crossProduct2d(b1a1x, b1a1y, nx, ny) / nmCrossProduct;\n\n if (p < 0 || p > 1) {\n return false;\n }\n\n return true;\n}\n/**\n * Cross product of 2-dimension vector.\n */\n\n\nfunction crossProduct2d(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nfunction nearZero(val) {\n return val <= 1e-6 && val >= -1e-6;\n} // Register built-in shapes. These shapes might be overwirtten\n// by users, although we do not recommend that.\n\n\nregisterShape('circle', Circle);\nregisterShape('sector', Sector);\nregisterShape('ring', Ring);\nregisterShape('polygon', Polygon);\nregisterShape('polyline', Polyline);\nregisterShape('rect', Rect);\nregisterShape('line', Line);\nregisterShape('bezierCurve', BezierCurve);\nregisterShape('arc', Arc);\nexports.Z2_EMPHASIS_LIFT = Z2_EMPHASIS_LIFT;\nexports.CACHED_LABEL_STYLE_PROPERTIES = CACHED_LABEL_STYLE_PROPERTIES;\nexports.extendShape = extendShape;\nexports.extendPath = extendPath;\nexports.registerShape = registerShape;\nexports.getShapeClass = getShapeClass;\nexports.makePath = makePath;\nexports.makeImage = makeImage;\nexports.mergePath = mergePath;\nexports.resizePath = resizePath;\nexports.subPixelOptimizeLine = subPixelOptimizeLine;\nexports.subPixelOptimizeRect = subPixelOptimizeRect;\nexports.subPixelOptimize = subPixelOptimize;\nexports.setElementHoverStyle = setElementHoverStyle;\nexports.setHoverStyle = setHoverStyle;\nexports.setAsHighDownDispatcher = setAsHighDownDispatcher;\nexports.isHighDownDispatcher = isHighDownDispatcher;\nexports.getHighlightDigit = getHighlightDigit;\nexports.setLabelStyle = setLabelStyle;\nexports.modifyLabelStyle = modifyLabelStyle;\nexports.setTextStyle = setTextStyle;\nexports.setText = setText;\nexports.getFont = getFont;\nexports.updateProps = updateProps;\nexports.initProps = initProps;\nexports.getTransform = getTransform;\nexports.applyTransform = applyTransform;\nexports.transformDirection = transformDirection;\nexports.groupTransition = groupTransition;\nexports.clipPointsByRect = clipPointsByRect;\nexports.clipRectByRect = clipRectByRect;\nexports.createIcon = createIcon;\nexports.linePolygonIntersect = linePolygonIntersect;\nexports.lineLineIntersect = lineLineIntersect;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 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*/\nvar each = zrUtil.each;\nvar isObject = zrUtil.isObject;\nvar POSSIBLE_STYLES = ['areaStyle', 'lineStyle', 'nodeStyle', 'linkStyle', 'chordStyle', 'label', 'labelLine'];\n\nfunction compatEC2ItemStyle(opt) {\n var itemStyleOpt = opt && opt.itemStyle;\n\n if (!itemStyleOpt) {\n return;\n }\n\n for (var i = 0, len = POSSIBLE_STYLES.length; i < len; i++) {\n var styleName = POSSIBLE_STYLES[i];\n var normalItemStyleOpt = itemStyleOpt.normal;\n var emphasisItemStyleOpt = itemStyleOpt.emphasis;\n\n if (normalItemStyleOpt && normalItemStyleOpt[styleName]) {\n opt[styleName] = opt[styleName] || {};\n\n if (!opt[styleName].normal) {\n opt[styleName].normal = normalItemStyleOpt[styleName];\n } else {\n zrUtil.merge(opt[styleName].normal, normalItemStyleOpt[styleName]);\n }\n\n normalItemStyleOpt[styleName] = null;\n }\n\n if (emphasisItemStyleOpt && emphasisItemStyleOpt[styleName]) {\n opt[styleName] = opt[styleName] || {};\n\n if (!opt[styleName].emphasis) {\n opt[styleName].emphasis = emphasisItemStyleOpt[styleName];\n } else {\n zrUtil.merge(opt[styleName].emphasis, emphasisItemStyleOpt[styleName]);\n }\n\n emphasisItemStyleOpt[styleName] = null;\n }\n }\n}\n\nfunction convertNormalEmphasis(opt, optType, useExtend) {\n if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) {\n var normalOpt = opt[optType].normal;\n var emphasisOpt = opt[optType].emphasis;\n\n if (normalOpt) {\n // Timeline controlStyle has other properties besides normal and emphasis\n if (useExtend) {\n opt[optType].normal = opt[optType].emphasis = null;\n zrUtil.defaults(opt[optType], normalOpt);\n } else {\n opt[optType] = normalOpt;\n }\n }\n\n if (emphasisOpt) {\n opt.emphasis = opt.emphasis || {};\n opt.emphasis[optType] = emphasisOpt;\n }\n }\n}\n\nfunction removeEC3NormalStatus(opt) {\n convertNormalEmphasis(opt, 'itemStyle');\n convertNormalEmphasis(opt, 'lineStyle');\n convertNormalEmphasis(opt, 'areaStyle');\n convertNormalEmphasis(opt, 'label');\n convertNormalEmphasis(opt, 'labelLine'); // treemap\n\n convertNormalEmphasis(opt, 'upperLabel'); // graph\n\n convertNormalEmphasis(opt, 'edgeLabel');\n}\n\nfunction compatTextStyle(opt, propName) {\n // Check whether is not object (string\\null\\undefined ...)\n var labelOptSingle = isObject(opt) && opt[propName];\n var textStyle = isObject(labelOptSingle) && labelOptSingle.textStyle;\n\n if (textStyle) {\n for (var i = 0, len = modelUtil.TEXT_STYLE_OPTIONS.length; i < len; i++) {\n var propName = modelUtil.TEXT_STYLE_OPTIONS[i];\n\n if (textStyle.hasOwnProperty(propName)) {\n labelOptSingle[propName] = textStyle[propName];\n }\n }\n }\n}\n\nfunction compatEC3CommonStyles(opt) {\n if (opt) {\n removeEC3NormalStatus(opt);\n compatTextStyle(opt, 'label');\n opt.emphasis && compatTextStyle(opt.emphasis, 'label');\n }\n}\n\nfunction processSeries(seriesOpt) {\n if (!isObject(seriesOpt)) {\n return;\n }\n\n compatEC2ItemStyle(seriesOpt);\n removeEC3NormalStatus(seriesOpt);\n compatTextStyle(seriesOpt, 'label'); // treemap\n\n compatTextStyle(seriesOpt, 'upperLabel'); // graph\n\n compatTextStyle(seriesOpt, 'edgeLabel');\n\n if (seriesOpt.emphasis) {\n compatTextStyle(seriesOpt.emphasis, 'label'); // treemap\n\n compatTextStyle(seriesOpt.emphasis, 'upperLabel'); // graph\n\n compatTextStyle(seriesOpt.emphasis, 'edgeLabel');\n }\n\n var markPoint = seriesOpt.markPoint;\n\n if (markPoint) {\n compatEC2ItemStyle(markPoint);\n compatEC3CommonStyles(markPoint);\n }\n\n var markLine = seriesOpt.markLine;\n\n if (markLine) {\n compatEC2ItemStyle(markLine);\n compatEC3CommonStyles(markLine);\n }\n\n var markArea = seriesOpt.markArea;\n\n if (markArea) {\n compatEC3CommonStyles(markArea);\n }\n\n var data = seriesOpt.data; // Break with ec3: if `setOption` again, there may be no `type` in option,\n // then the backward compat based on option type will not be performed.\n\n if (seriesOpt.type === 'graph') {\n data = data || seriesOpt.nodes;\n var edgeData = seriesOpt.links || seriesOpt.edges;\n\n if (edgeData && !zrUtil.isTypedArray(edgeData)) {\n for (var i = 0; i < edgeData.length; i++) {\n compatEC3CommonStyles(edgeData[i]);\n }\n }\n\n zrUtil.each(seriesOpt.categories, function (opt) {\n removeEC3NormalStatus(opt);\n });\n }\n\n if (data && !zrUtil.isTypedArray(data)) {\n for (var i = 0; i < data.length; i++) {\n compatEC3CommonStyles(data[i]);\n }\n } // mark point data\n\n\n var markPoint = seriesOpt.markPoint;\n\n if (markPoint && markPoint.data) {\n var mpData = markPoint.data;\n\n for (var i = 0; i < mpData.length; i++) {\n compatEC3CommonStyles(mpData[i]);\n }\n } // mark line data\n\n\n var markLine = seriesOpt.markLine;\n\n if (markLine && markLine.data) {\n var mlData = markLine.data;\n\n for (var i = 0; i < mlData.length; i++) {\n if (zrUtil.isArray(mlData[i])) {\n compatEC3CommonStyles(mlData[i][0]);\n compatEC3CommonStyles(mlData[i][1]);\n } else {\n compatEC3CommonStyles(mlData[i]);\n }\n }\n } // Series\n\n\n if (seriesOpt.type === 'gauge') {\n compatTextStyle(seriesOpt, 'axisLabel');\n compatTextStyle(seriesOpt, 'title');\n compatTextStyle(seriesOpt, 'detail');\n } else if (seriesOpt.type === 'treemap') {\n convertNormalEmphasis(seriesOpt.breadcrumb, 'itemStyle');\n zrUtil.each(seriesOpt.levels, function (opt) {\n removeEC3NormalStatus(opt);\n });\n } else if (seriesOpt.type === 'tree') {\n removeEC3NormalStatus(seriesOpt.leaves);\n } // sunburst starts from ec4, so it does not need to compat levels.\n\n}\n\nfunction toArr(o) {\n return zrUtil.isArray(o) ? o : o ? [o] : [];\n}\n\nfunction toObj(o) {\n return (zrUtil.isArray(o) ? o[0] : o) || {};\n}\n\nfunction _default(option, isTheme) {\n each(toArr(option.series), function (seriesOpt) {\n isObject(seriesOpt) && processSeries(seriesOpt);\n });\n var axes = ['xAxis', 'yAxis', 'radiusAxis', 'angleAxis', 'singleAxis', 'parallelAxis', 'radar'];\n isTheme && axes.push('valueAxis', 'categoryAxis', 'logAxis', 'timeAxis');\n each(axes, function (axisName) {\n each(toArr(option[axisName]), function (axisOpt) {\n if (axisOpt) {\n compatTextStyle(axisOpt, 'axisLabel');\n compatTextStyle(axisOpt.axisPointer, 'label');\n }\n });\n });\n each(toArr(option.parallel), function (parallelOpt) {\n var parallelAxisDefault = parallelOpt && parallelOpt.parallelAxisDefault;\n compatTextStyle(parallelAxisDefault, 'axisLabel');\n compatTextStyle(parallelAxisDefault && parallelAxisDefault.axisPointer, 'label');\n });\n each(toArr(option.calendar), function (calendarOpt) {\n convertNormalEmphasis(calendarOpt, 'itemStyle');\n compatTextStyle(calendarOpt, 'dayLabel');\n compatTextStyle(calendarOpt, 'monthLabel');\n compatTextStyle(calendarOpt, 'yearLabel');\n }); // radar.name.textStyle\n\n each(toArr(option.radar), function (radarOpt) {\n compatTextStyle(radarOpt, 'name');\n });\n each(toArr(option.geo), function (geoOpt) {\n if (isObject(geoOpt)) {\n compatEC3CommonStyles(geoOpt);\n each(toArr(geoOpt.regions), function (regionObj) {\n compatEC3CommonStyles(regionObj);\n });\n }\n });\n each(toArr(option.timeline), function (timelineOpt) {\n compatEC3CommonStyles(timelineOpt);\n convertNormalEmphasis(timelineOpt, 'label');\n convertNormalEmphasis(timelineOpt, 'itemStyle');\n convertNormalEmphasis(timelineOpt, 'controlStyle', true);\n var data = timelineOpt.data;\n zrUtil.isArray(data) && zrUtil.each(data, function (item) {\n if (zrUtil.isObject(item)) {\n convertNormalEmphasis(item, 'label');\n convertNormalEmphasis(item, 'itemStyle');\n }\n });\n });\n each(toArr(option.toolbox), function (toolboxOpt) {\n convertNormalEmphasis(toolboxOpt, 'iconStyle');\n each(toolboxOpt.feature, function (featureOpt) {\n convertNormalEmphasis(featureOpt, 'iconStyle');\n });\n });\n compatTextStyle(toObj(option.axisPointer), 'label');\n compatTextStyle(toObj(option.tooltip).axisPointer, 'label');\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// TODO Parse shadow style\n// TODO Only shallow path support\nfunction _default(properties) {\n // Normalize\n for (var i = 0; i < properties.length; i++) {\n if (!properties[i][1]) {\n properties[i][1] = properties[i][0];\n }\n }\n\n return function (model, excludes, includes) {\n var style = {};\n\n for (var i = 0; i < properties.length; i++) {\n var propName = properties[i][1];\n\n if (excludes && zrUtil.indexOf(excludes, propName) >= 0 || includes && zrUtil.indexOf(includes, propName) < 0) {\n continue;\n }\n\n var val = model.getShallow(propName);\n\n if (val != null) {\n style[properties[i][0]] = val;\n }\n }\n\n return style;\n };\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _number = require(\"../../util/number\");\n\nvar parsePercent = _number.parsePercent;\nvar linearMap = _number.linearMap;\n\nvar layout = require(\"../../util/layout\");\n\nvar labelLayout = require(\"./labelLayout\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar PI2 = Math.PI * 2;\nvar RADIAN = Math.PI / 180;\n\nfunction getViewRect(seriesModel, api) {\n return layout.getLayoutRect(seriesModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n}\n\nfunction _default(seriesType, ecModel, api, payload) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var data = seriesModel.getData();\n var valueDim = data.mapDimension('value');\n var viewRect = getViewRect(seriesModel, api);\n var center = seriesModel.get('center');\n var radius = seriesModel.get('radius');\n\n if (!zrUtil.isArray(radius)) {\n radius = [0, radius];\n }\n\n if (!zrUtil.isArray(center)) {\n center = [center, center];\n }\n\n var width = parsePercent(viewRect.width, api.getWidth());\n var height = parsePercent(viewRect.height, api.getHeight());\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], width) + viewRect.x;\n var cy = parsePercent(center[1], height) + viewRect.y;\n var r0 = parsePercent(radius[0], size / 2);\n var r = parsePercent(radius[1], size / 2);\n var startAngle = -seriesModel.get('startAngle') * RADIAN;\n var minAngle = seriesModel.get('minAngle') * RADIAN;\n var validDataCount = 0;\n data.each(valueDim, function (value) {\n !isNaN(value) && validDataCount++;\n });\n var sum = data.getSum(valueDim); // Sum may be 0\n\n var unitRadian = Math.PI / (sum || validDataCount) * 2;\n var clockwise = seriesModel.get('clockwise');\n var roseType = seriesModel.get('roseType');\n var stillShowZeroSum = seriesModel.get('stillShowZeroSum'); // [0...max]\n\n var extent = data.getDataExtent(valueDim);\n extent[0] = 0; // In the case some sector angle is smaller than minAngle\n\n var restAngle = PI2;\n var valueSumLargerThanMinAngle = 0;\n var currentAngle = startAngle;\n var dir = clockwise ? 1 : -1;\n data.each(valueDim, function (value, idx) {\n var angle;\n\n if (isNaN(value)) {\n data.setItemLayout(idx, {\n angle: NaN,\n startAngle: NaN,\n endAngle: NaN,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? NaN : r,\n viewRect: viewRect\n });\n return;\n } // FIXME 兼容 2.0 但是 roseType 是 area 的时候才是这样?\n\n\n if (roseType !== 'area') {\n angle = sum === 0 && stillShowZeroSum ? unitRadian : value * unitRadian;\n } else {\n angle = PI2 / validDataCount;\n }\n\n if (angle < minAngle) {\n angle = minAngle;\n restAngle -= minAngle;\n } else {\n valueSumLargerThanMinAngle += value;\n }\n\n var endAngle = currentAngle + dir * angle;\n data.setItemLayout(idx, {\n angle: angle,\n startAngle: currentAngle,\n endAngle: endAngle,\n clockwise: clockwise,\n cx: cx,\n cy: cy,\n r0: r0,\n r: roseType ? linearMap(value, extent, [r0, r]) : r,\n viewRect: viewRect\n });\n currentAngle = endAngle;\n }); // Some sector is constrained by minAngle\n // Rest sectors needs recalculate angle\n\n if (restAngle < PI2 && validDataCount) {\n // Average the angle if rest angle is not enough after all angles is\n // Constrained by minAngle\n if (restAngle <= 1e-3) {\n var angle = PI2 / validDataCount;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout = data.getItemLayout(idx);\n layout.angle = angle;\n layout.startAngle = startAngle + dir * idx * angle;\n layout.endAngle = startAngle + dir * (idx + 1) * angle;\n }\n });\n } else {\n unitRadian = restAngle / valueSumLargerThanMinAngle;\n currentAngle = startAngle;\n data.each(valueDim, function (value, idx) {\n if (!isNaN(value)) {\n var layout = data.getItemLayout(idx);\n var angle = layout.angle === minAngle ? minAngle : value * unitRadian;\n layout.startAngle = currentAngle;\n layout.endAngle = currentAngle + dir * angle;\n currentAngle += dir * angle;\n }\n });\n }\n }\n\n labelLayout(seriesModel, r, viewRect.width, viewRect.height, viewRect.x, viewRect.y);\n });\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * Language: (Simplified) Chinese.\n */\nvar _default = {\n legend: {\n selector: {\n all: '全选',\n inverse: '反选'\n }\n },\n toolbox: {\n brush: {\n title: {\n rect: '矩形选择',\n polygon: '圈选',\n lineX: '横向选择',\n lineY: '纵向选择',\n keep: '保持选择',\n clear: '清除选择'\n }\n },\n dataView: {\n title: '数据视图',\n lang: ['数据视图', '关闭', '刷新']\n },\n dataZoom: {\n title: {\n zoom: '区域缩放',\n back: '区域缩放还原'\n }\n },\n magicType: {\n title: {\n line: '切换为折线图',\n bar: '切换为柱状图',\n stack: '切换为堆叠',\n tiled: '切换为平铺'\n }\n },\n restore: {\n title: '还原'\n },\n saveAsImage: {\n title: '保存为图片',\n lang: ['右键另存为图片']\n }\n },\n series: {\n typeNames: {\n pie: '饼图',\n bar: '柱状图',\n line: '折线图',\n scatter: '散点图',\n effectScatter: '涟漪散点图',\n radar: '雷达图',\n tree: '树图',\n treemap: '矩形树图',\n boxplot: '箱型图',\n candlestick: 'K线图',\n k: 'K线图',\n heatmap: '热力图',\n map: '地图',\n parallel: '平行坐标图',\n lines: '线图',\n graph: '关系图',\n sankey: '桑基图',\n funnel: '漏斗图',\n gauge: '仪表盘图',\n pictorialBar: '象形柱图',\n themeRiver: '主题河流图',\n sunburst: '旭日图'\n }\n },\n aria: {\n general: {\n withTitle: '这是一个关于“{title}”的图表。',\n withoutTitle: '这是一个图表,'\n },\n series: {\n single: {\n prefix: '',\n withName: '图表类型是{seriesType},表示{seriesName}。',\n withoutName: '图表类型是{seriesType}。'\n },\n multiple: {\n prefix: '它由{seriesCount}个图表系列组成。',\n withName: '第{seriesId}个系列是一个表示{seriesName}的{seriesType},',\n withoutName: '第{seriesId}个系列是一个{seriesType},',\n separator: {\n middle: ';',\n end: '。'\n }\n }\n },\n data: {\n allData: '其数据是——',\n partialData: '其中,前{displayCnt}项是——',\n withName: '{name}的数据是{value}',\n withoutName: '{value}',\n separator: {\n middle: ',',\n end: ''\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 _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar isTypedArray = _util.isTypedArray;\nvar extend = _util.extend;\nvar assert = _util.assert;\nvar each = _util.each;\nvar isObject = _util.isObject;\n\nvar _model = require(\"../../util/model\");\n\nvar getDataItemValue = _model.getDataItemValue;\nvar isDataItemOption = _model.isDataItemOption;\n\nvar _number = require(\"../../util/number\");\n\nvar parseDate = _number.parseDate;\n\nvar Source = require(\"../Source\");\n\nvar _sourceType = require(\"./sourceType\");\n\nvar SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY;\nvar SOURCE_FORMAT_ARRAY_ROWS = _sourceType.SOURCE_FORMAT_ARRAY_ROWS;\nvar SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL;\nvar SOURCE_FORMAT_OBJECT_ROWS = _sourceType.SOURCE_FORMAT_OBJECT_ROWS;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\n// ??? refactor? check the outer usage of data provider.\n// merge with defaultDimValueGetter?\n\n/**\n * If normal array used, mutable chunk size is supported.\n * If typed array used, chunk size must be fixed.\n */\nfunction DefaultDataProvider(source, dimSize) {\n if (!Source.isInstance(source)) {\n source = Source.seriesDataToSource(source);\n }\n\n this._source = source;\n var data = this._data = source.data;\n var sourceFormat = source.sourceFormat; // Typed array. TODO IE10+?\n\n if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {\n this._offset = 0;\n this._dimSize = dimSize;\n this._data = data;\n }\n\n var methods = providerMethods[sourceFormat === SOURCE_FORMAT_ARRAY_ROWS ? sourceFormat + '_' + source.seriesLayoutBy : sourceFormat];\n extend(this, methods);\n}\n\nvar providerProto = DefaultDataProvider.prototype; // If data is pure without style configuration\n\nproviderProto.pure = false; // If data is persistent and will not be released after use.\n\nproviderProto.persistent = true; // ???! FIXME legacy data provider do not has method getSource\n\nproviderProto.getSource = function () {\n return this._source;\n};\n\nvar providerMethods = {\n 'arrayRows_column': {\n pure: true,\n count: function () {\n return Math.max(0, this._data.length - this._source.startIndex);\n },\n getItem: function (idx) {\n return this._data[idx + this._source.startIndex];\n },\n appendData: appendDataSimply\n },\n 'arrayRows_row': {\n pure: true,\n count: function () {\n var row = this._data[0];\n return row ? Math.max(0, row.length - this._source.startIndex) : 0;\n },\n getItem: function (idx) {\n idx += this._source.startIndex;\n var item = [];\n var data = this._data;\n\n for (var i = 0; i < data.length; i++) {\n var row = data[i];\n item.push(row ? row[idx] : null);\n }\n\n return item;\n },\n appendData: function () {\n throw new Error('Do not support appendData when set seriesLayoutBy: \"row\".');\n }\n },\n 'objectRows': {\n pure: true,\n count: countSimply,\n getItem: getItemSimply,\n appendData: appendDataSimply\n },\n 'keyedColumns': {\n pure: true,\n count: function () {\n var dimName = this._source.dimensionsDefine[0].name;\n var col = this._data[dimName];\n return col ? col.length : 0;\n },\n getItem: function (idx) {\n var item = [];\n var dims = this._source.dimensionsDefine;\n\n for (var i = 0; i < dims.length; i++) {\n var col = this._data[dims[i].name];\n item.push(col ? col[idx] : null);\n }\n\n return item;\n },\n appendData: function (newData) {\n var data = this._data;\n each(newData, function (newCol, key) {\n var oldCol = data[key] || (data[key] = []);\n\n for (var i = 0; i < (newCol || []).length; i++) {\n oldCol.push(newCol[i]);\n }\n });\n }\n },\n 'original': {\n count: countSimply,\n getItem: getItemSimply,\n appendData: appendDataSimply\n },\n 'typedArray': {\n persistent: false,\n pure: true,\n count: function () {\n return this._data ? this._data.length / this._dimSize : 0;\n },\n getItem: function (idx, out) {\n idx = idx - this._offset;\n out = out || [];\n var offset = this._dimSize * idx;\n\n for (var i = 0; i < this._dimSize; i++) {\n out[i] = this._data[offset + i];\n }\n\n return out;\n },\n appendData: function (newData) {\n this._data = newData;\n },\n // Clean self if data is already used.\n clean: function () {\n // PENDING\n this._offset += this.count();\n this._data = null;\n }\n }\n};\n\nfunction countSimply() {\n return this._data.length;\n}\n\nfunction getItemSimply(idx) {\n return this._data[idx];\n}\n\nfunction appendDataSimply(newData) {\n for (var i = 0; i < newData.length; i++) {\n this._data.push(newData[i]);\n }\n}\n\nvar rawValueGetters = {\n arrayRows: getRawValueSimply,\n objectRows: function (dataItem, dataIndex, dimIndex, dimName) {\n return dimIndex != null ? dataItem[dimName] : dataItem;\n },\n keyedColumns: getRawValueSimply,\n original: function (dataItem, dataIndex, dimIndex, dimName) {\n // FIXME\n // In some case (markpoint in geo (geo-map.html)), dataItem\n // is {coord: [...]}\n var value = getDataItemValue(dataItem);\n return dimIndex == null || !(value instanceof Array) ? value : value[dimIndex];\n },\n typedArray: getRawValueSimply\n};\n\nfunction getRawValueSimply(dataItem, dataIndex, dimIndex, dimName) {\n return dimIndex != null ? dataItem[dimIndex] : dataItem;\n}\n\nvar defaultDimValueGetters = {\n arrayRows: getDimValueSimply,\n objectRows: function (dataItem, dimName, dataIndex, dimIndex) {\n return converDataValue(dataItem[dimName], this._dimensionInfos[dimName]);\n },\n keyedColumns: getDimValueSimply,\n original: function (dataItem, dimName, dataIndex, dimIndex) {\n // Performance sensitive, do not use modelUtil.getDataItemValue.\n // If dataItem is an plain object with no value field, the var `value`\n // will be assigned with the object, but it will be tread correctly\n // in the `convertDataValue`.\n var value = dataItem && (dataItem.value == null ? dataItem : dataItem.value); // If any dataItem is like { value: 10 }\n\n if (!this._rawData.pure && isDataItemOption(dataItem)) {\n this.hasItemOption = true;\n }\n\n return converDataValue(value instanceof Array ? value[dimIndex] // If value is a single number or something else not array.\n : value, this._dimensionInfos[dimName]);\n },\n typedArray: function (dataItem, dimName, dataIndex, dimIndex) {\n return dataItem[dimIndex];\n }\n};\n\nfunction getDimValueSimply(dataItem, dimName, dataIndex, dimIndex) {\n return converDataValue(dataItem[dimIndex], this._dimensionInfos[dimName]);\n}\n/**\n * This helper method convert value in data.\n * @param {string|number|Date} value\n * @param {Object|string} [dimInfo] If string (like 'x'), dimType defaults 'number'.\n * If \"dimInfo.ordinalParseAndSave\", ordinal value can be parsed.\n */\n\n\nfunction converDataValue(value, dimInfo) {\n // Performance sensitive.\n var dimType = dimInfo && dimInfo.type;\n\n if (dimType === 'ordinal') {\n // If given value is a category string\n var ordinalMeta = dimInfo && dimInfo.ordinalMeta;\n return ordinalMeta ? ordinalMeta.parseAndCollect(value) : value;\n }\n\n if (dimType === 'time' // spead up when using timestamp\n && typeof value !== 'number' && value != null && value !== '-') {\n value = +parseDate(value);\n } // dimType defaults 'number'.\n // If dimType is not ordinal and value is null or undefined or NaN or '-',\n // parse to NaN.\n\n\n return value == null || value === '' ? NaN // If string (like '-'), using '+' parse to NaN\n // If object, also parse to NaN\n : +value;\n} // ??? FIXME can these logic be more neat: getRawValue, getRawDataItem,\n// Consider persistent.\n// Caution: why use raw value to display on label or tooltip?\n// A reason is to avoid format. For example time value we do not know\n// how to format is expected. More over, if stack is used, calculated\n// value may be 0.91000000001, which have brings trouble to display.\n// TODO: consider how to treat null/undefined/NaN when display?\n\n/**\n * @param {module:echarts/data/List} data\n * @param {number} dataIndex\n * @param {string|number} [dim] dimName or dimIndex\n * @return {Array.|string|number} can be null/undefined.\n */\n\n\nfunction retrieveRawValue(data, dataIndex, dim) {\n if (!data) {\n return;\n } // Consider data may be not persistent.\n\n\n var dataItem = data.getRawDataItem(dataIndex);\n\n if (dataItem == null) {\n return;\n }\n\n var sourceFormat = data.getProvider().getSource().sourceFormat;\n var dimName;\n var dimIndex;\n var dimInfo = data.getDimensionInfo(dim);\n\n if (dimInfo) {\n dimName = dimInfo.name;\n dimIndex = dimInfo.index;\n }\n\n return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName);\n}\n/**\n * Compatible with some cases (in pie, map) like:\n * data: [{name: 'xx', value: 5, selected: true}, ...]\n * where only sourceFormat is 'original' and 'objectRows' supported.\n *\n * ??? TODO\n * Supported detail options in data item when using 'arrayRows'.\n *\n * @param {module:echarts/data/List} data\n * @param {number} dataIndex\n * @param {string} attr like 'selected'\n */\n\n\nfunction retrieveRawAttr(data, dataIndex, attr) {\n if (!data) {\n return;\n }\n\n var sourceFormat = data.getProvider().getSource().sourceFormat;\n\n if (sourceFormat !== SOURCE_FORMAT_ORIGINAL && sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS) {\n return;\n }\n\n var dataItem = data.getRawDataItem(dataIndex);\n\n if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject(dataItem)) {\n dataItem = null;\n }\n\n if (dataItem) {\n return dataItem[attr];\n }\n}\n\nexports.DefaultDataProvider = DefaultDataProvider;\nexports.defaultDimValueGetters = defaultDimValueGetters;\nexports.retrieveRawValue = retrieveRawValue;\nexports.retrieveRawAttr = retrieveRawAttr;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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\nvar _util = require(\"zrender/lib/core/util\");\n\nvar each = _util.each;\nvar createHashMap = _util.createHashMap;\nvar assert = _util.assert;\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 OTHER_DIMENSIONS = createHashMap(['tooltip', 'label', 'itemName', 'itemId', 'seriesName']);\n\nfunction summarizeDimensions(data) {\n var summary = {};\n var encode = summary.encode = {};\n var notExtraCoordDimMap = createHashMap();\n var defaultedLabel = [];\n var defaultedTooltip = []; // See the comment of `List.js#userOutput`.\n\n var userOutput = summary.userOutput = {\n dimensionNames: data.dimensions.slice(),\n encode: {}\n };\n each(data.dimensions, function (dimName) {\n var dimItem = data.getDimensionInfo(dimName);\n var coordDim = dimItem.coordDim;\n\n if (coordDim) {\n var coordDimIndex = dimItem.coordDimIndex;\n getOrCreateEncodeArr(encode, coordDim)[coordDimIndex] = dimName;\n\n if (!dimItem.isExtraCoord) {\n notExtraCoordDimMap.set(coordDim, 1); // Use the last coord dim (and label friendly) as default label,\n // because when dataset is used, it is hard to guess which dimension\n // can be value dimension. If both show x, y on label is not look good,\n // and conventionally y axis is focused more.\n\n if (mayLabelDimType(dimItem.type)) {\n defaultedLabel[0] = dimName;\n } // User output encode do not contain generated coords.\n // And it only has index. User can use index to retrieve value from the raw item array.\n\n\n getOrCreateEncodeArr(userOutput.encode, coordDim)[coordDimIndex] = dimItem.index;\n }\n\n if (dimItem.defaultTooltip) {\n defaultedTooltip.push(dimName);\n }\n }\n\n OTHER_DIMENSIONS.each(function (v, otherDim) {\n var encodeArr = getOrCreateEncodeArr(encode, otherDim);\n var dimIndex = dimItem.otherDims[otherDim];\n\n if (dimIndex != null && dimIndex !== false) {\n encodeArr[dimIndex] = dimItem.name;\n }\n });\n });\n var dataDimsOnCoord = [];\n var encodeFirstDimNotExtra = {};\n notExtraCoordDimMap.each(function (v, coordDim) {\n var dimArr = encode[coordDim]; // ??? FIXME extra coord should not be set in dataDimsOnCoord.\n // But should fix the case that radar axes: simplify the logic\n // of `completeDimension`, remove `extraPrefix`.\n\n encodeFirstDimNotExtra[coordDim] = dimArr[0]; // Not necessary to remove duplicate, because a data\n // dim canot on more than one coordDim.\n\n dataDimsOnCoord = dataDimsOnCoord.concat(dimArr);\n });\n summary.dataDimsOnCoord = dataDimsOnCoord;\n summary.encodeFirstDimNotExtra = encodeFirstDimNotExtra;\n var encodeLabel = encode.label; // FIXME `encode.label` is not recommanded, because formatter can not be set\n // in this way. Use label.formatter instead. May be remove this approach someday.\n\n if (encodeLabel && encodeLabel.length) {\n defaultedLabel = encodeLabel.slice();\n }\n\n var encodeTooltip = encode.tooltip;\n\n if (encodeTooltip && encodeTooltip.length) {\n defaultedTooltip = encodeTooltip.slice();\n } else if (!defaultedTooltip.length) {\n defaultedTooltip = defaultedLabel.slice();\n }\n\n encode.defaultedLabel = defaultedLabel;\n encode.defaultedTooltip = defaultedTooltip;\n return summary;\n}\n\nfunction getOrCreateEncodeArr(encode, dim) {\n if (!encode.hasOwnProperty(dim)) {\n encode[dim] = [];\n }\n\n return encode[dim];\n}\n\nfunction getDimensionTypeByAxis(axisType) {\n return axisType === 'category' ? 'ordinal' : axisType === 'time' ? 'time' : 'float';\n}\n\nfunction mayLabelDimType(dimType) {\n // In most cases, ordinal and time do not suitable for label.\n // Ordinal info can be displayed on axis. Time is too long.\n return !(dimType === 'ordinal' || dimType === 'time');\n} // function findTheLastDimMayLabel(data) {\n// // Get last value dim\n// var dimensions = data.dimensions.slice();\n// var valueType;\n// var valueDim;\n// while (dimensions.length && (\n// valueDim = dimensions.pop(),\n// valueType = data.getDimensionInfo(valueDim).type,\n// valueType === 'ordinal' || valueType === 'time'\n// )) {} // jshint ignore:line\n// return valueDim;\n// }\n\n\nexports.OTHER_DIMENSIONS = OTHER_DIMENSIONS;\nexports.summarizeDimensions = summarizeDimensions;\nexports.getDimensionTypeByAxis = getDimensionTypeByAxis;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 barPolar = require(\"../layout/barPolar\");\n\nrequire(\"../coord/polar/polarCreator\");\n\nrequire(\"./angleAxis\");\n\nrequire(\"./radiusAxis\");\n\nrequire(\"./axisPointer\");\n\nrequire(\"./axisPointer/PolarAxisPointer\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// For reducing size of echarts.min, barLayoutPolar is required by polar.\necharts.registerLayout(zrUtil.curry(barPolar, 'bar')); // Polar view\n\necharts.extendComponentView({\n type: 'polar'\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar List = require(\"../../data/List\");\n\nvar createDimensions = require(\"../../data/helper/createDimensions\");\n\nvar _sourceType = require(\"../../data/helper/sourceType\");\n\nvar SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL;\n\nvar _dimensionHelper = require(\"../../data/helper/dimensionHelper\");\n\nvar getDimensionTypeByAxis = _dimensionHelper.getDimensionTypeByAxis;\n\nvar _model = require(\"../../util/model\");\n\nvar getDataItemValue = _model.getDataItemValue;\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\n\nvar _referHelper = require(\"../../model/referHelper\");\n\nvar getCoordSysInfoBySeries = _referHelper.getCoordSysInfoBySeries;\n\nvar Source = require(\"../../data/Source\");\n\nvar _dataStackHelper = require(\"../../data/helper/dataStackHelper\");\n\nvar enableDataStack = _dataStackHelper.enableDataStack;\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*/\n\n/**\n * @param {module:echarts/data/Source|Array} source Or raw data.\n * @param {module:echarts/model/Series} seriesModel\n * @param {Object} [opt]\n * @param {string} [opt.generateCoord]\n * @param {boolean} [opt.useEncodeDefaulter]\n */\nfunction createListFromArray(source, seriesModel, opt) {\n opt = opt || {};\n\n if (!Source.isInstance(source)) {\n source = Source.seriesDataToSource(source);\n }\n\n var coordSysName = seriesModel.get('coordinateSystem');\n var registeredCoordSys = CoordinateSystem.get(coordSysName);\n var coordSysInfo = getCoordSysInfoBySeries(seriesModel);\n var coordSysDimDefs;\n\n if (coordSysInfo) {\n coordSysDimDefs = zrUtil.map(coordSysInfo.coordSysDims, function (dim) {\n var dimInfo = {\n name: dim\n };\n var axisModel = coordSysInfo.axisMap.get(dim);\n\n if (axisModel) {\n var axisType = axisModel.get('type');\n dimInfo.type = getDimensionTypeByAxis(axisType); // dimInfo.stackable = isStackable(axisType);\n }\n\n return dimInfo;\n });\n }\n\n if (!coordSysDimDefs) {\n // Get dimensions from registered coordinate system\n coordSysDimDefs = registeredCoordSys && (registeredCoordSys.getDimensionsInfo ? registeredCoordSys.getDimensionsInfo() : registeredCoordSys.dimensions.slice()) || ['x', 'y'];\n }\n\n var dimInfoList = createDimensions(source, {\n coordDimensions: coordSysDimDefs,\n generateCoord: opt.generateCoord,\n encodeDefaulter: opt.useEncodeDefaulter ? zrUtil.curry(makeSeriesEncodeForAxisCoordSys, coordSysDimDefs, seriesModel) : null\n });\n var firstCategoryDimIndex;\n var hasNameEncode;\n coordSysInfo && zrUtil.each(dimInfoList, function (dimInfo, dimIndex) {\n var coordDim = dimInfo.coordDim;\n var categoryAxisModel = coordSysInfo.categoryAxisMap.get(coordDim);\n\n if (categoryAxisModel) {\n if (firstCategoryDimIndex == null) {\n firstCategoryDimIndex = dimIndex;\n }\n\n dimInfo.ordinalMeta = categoryAxisModel.getOrdinalMeta();\n }\n\n if (dimInfo.otherDims.itemName != null) {\n hasNameEncode = true;\n }\n });\n\n if (!hasNameEncode && firstCategoryDimIndex != null) {\n dimInfoList[firstCategoryDimIndex].otherDims.itemName = 0;\n }\n\n var stackCalculationInfo = enableDataStack(seriesModel, dimInfoList);\n var list = new List(dimInfoList, seriesModel);\n list.setCalculationInfo(stackCalculationInfo);\n var dimValueGetter = firstCategoryDimIndex != null && isNeedCompleteOrdinalData(source) ? function (itemOpt, dimName, dataIndex, dimIndex) {\n // Use dataIndex as ordinal value in categoryAxis\n return dimIndex === firstCategoryDimIndex ? dataIndex : this.defaultDimValueGetter(itemOpt, dimName, dataIndex, dimIndex);\n } : null;\n list.hasItemOption = false;\n list.initData(source, null, dimValueGetter);\n return list;\n}\n\nfunction isNeedCompleteOrdinalData(source) {\n if (source.sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n var sampleItem = firstDataNotNull(source.data || []);\n return sampleItem != null && !zrUtil.isArray(getDataItemValue(sampleItem));\n }\n}\n\nfunction firstDataNotNull(data) {\n var i = 0;\n\n while (i < data.length && data[i] == null) {\n i++;\n }\n\n return data[i];\n}\n\nvar _default = createListFromArray;\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 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* A third-party license is embeded for some of the code in this file:\n* The method \"quantile\" was copied from \"d3.js\".\n* (See more details in the comment of the method 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 RADIAN_EPSILON = 1e-4;\n\nfunction _trim(str) {\n return str.replace(/^\\s+|\\s+$/g, '');\n}\n/**\n * Linear mapping a value from domain to range\n * @memberOf module:echarts/util/number\n * @param {(number|Array.)} val\n * @param {Array.} domain Domain extent domain[0] can be bigger than domain[1]\n * @param {Array.} range Range extent range[0] can be bigger than range[1]\n * @param {boolean} clamp\n * @return {(number|Array.}\n */\n\n\nfunction linearMap(val, domain, range, clamp) {\n var subDomain = domain[1] - domain[0];\n var subRange = range[1] - range[0];\n\n if (subDomain === 0) {\n return subRange === 0 ? range[0] : (range[0] + range[1]) / 2;\n } // Avoid accuracy problem in edge, such as\n // 146.39 - 62.83 === 83.55999999999999.\n // See echarts/test/ut/spec/util/number.js#linearMap#accuracyError\n // It is a little verbose for efficiency considering this method\n // is a hotspot.\n\n\n if (clamp) {\n if (subDomain > 0) {\n if (val <= domain[0]) {\n return range[0];\n } else if (val >= domain[1]) {\n return range[1];\n }\n } else {\n if (val >= domain[0]) {\n return range[0];\n } else if (val <= domain[1]) {\n return range[1];\n }\n }\n } else {\n if (val === domain[0]) {\n return range[0];\n }\n\n if (val === domain[1]) {\n return range[1];\n }\n }\n\n return (val - domain[0]) / subDomain * subRange + range[0];\n}\n/**\n * Convert a percent string to absolute number.\n * Returns NaN if percent is not a valid string or number\n * @memberOf module:echarts/util/number\n * @param {string|number} percent\n * @param {number} all\n * @return {number}\n */\n\n\nfunction parsePercent(percent, all) {\n switch (percent) {\n case 'center':\n case 'middle':\n percent = '50%';\n break;\n\n case 'left':\n case 'top':\n percent = '0%';\n break;\n\n case 'right':\n case 'bottom':\n percent = '100%';\n break;\n }\n\n if (typeof percent === 'string') {\n if (_trim(percent).match(/%$/)) {\n return parseFloat(percent) / 100 * all;\n }\n\n return parseFloat(percent);\n }\n\n return percent == null ? NaN : +percent;\n}\n/**\n * (1) Fix rounding error of float numbers.\n * (2) Support return string to avoid scientific notation like '3.5e-7'.\n *\n * @param {number} x\n * @param {number} [precision]\n * @param {boolean} [returnStr]\n * @return {number|string}\n */\n\n\nfunction round(x, precision, returnStr) {\n if (precision == null) {\n precision = 10;\n } // Avoid range error\n\n\n precision = Math.min(Math.max(0, precision), 20);\n x = (+x).toFixed(precision);\n return returnStr ? x : +x;\n}\n/**\n * asc sort arr.\n * The input arr will be modified.\n *\n * @param {Array} arr\n * @return {Array} The input arr.\n */\n\n\nfunction asc(arr) {\n arr.sort(function (a, b) {\n return a - b;\n });\n return arr;\n}\n/**\n * Get precision\n * @param {number} val\n */\n\n\nfunction getPrecision(val) {\n val = +val;\n\n if (isNaN(val)) {\n return 0;\n } // It is much faster than methods converting number to string as follows\n // var tmp = val.toString();\n // return tmp.length - 1 - tmp.indexOf('.');\n // especially when precision is low\n\n\n var e = 1;\n var count = 0;\n\n while (Math.round(val * e) / e !== val) {\n e *= 10;\n count++;\n }\n\n return count;\n}\n/**\n * @param {string|number} val\n * @return {number}\n */\n\n\nfunction getPrecisionSafe(val) {\n var str = val.toString(); // Consider scientific notation: '3.4e-12' '3.4e+12'\n\n var eIndex = str.indexOf('e');\n\n if (eIndex > 0) {\n var precision = +str.slice(eIndex + 1);\n return precision < 0 ? -precision : 0;\n } else {\n var dotIndex = str.indexOf('.');\n return dotIndex < 0 ? 0 : str.length - 1 - dotIndex;\n }\n}\n/**\n * Minimal dicernible data precisioin according to a single pixel.\n *\n * @param {Array.} dataExtent\n * @param {Array.} pixelExtent\n * @return {number} precision\n */\n\n\nfunction getPixelPrecision(dataExtent, pixelExtent) {\n var log = Math.log;\n var LN10 = Math.LN10;\n var dataQuantity = Math.floor(log(dataExtent[1] - dataExtent[0]) / LN10);\n var sizeQuantity = Math.round(log(Math.abs(pixelExtent[1] - pixelExtent[0])) / LN10); // toFixed() digits argument must be between 0 and 20.\n\n var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20);\n return !isFinite(precision) ? 20 : precision;\n}\n/**\n * Get a data of given precision, assuring the sum of percentages\n * in valueList is 1.\n * The largest remainer method is used.\n * https://en.wikipedia.org/wiki/Largest_remainder_method\n *\n * @param {Array.} valueList a list of all data\n * @param {number} idx index of the data to be processed in valueList\n * @param {number} precision integer number showing digits of precision\n * @return {number} percent ranging from 0 to 100\n */\n\n\nfunction getPercentWithPrecision(valueList, idx, precision) {\n if (!valueList[idx]) {\n return 0;\n }\n\n var sum = zrUtil.reduce(valueList, function (acc, val) {\n return acc + (isNaN(val) ? 0 : val);\n }, 0);\n\n if (sum === 0) {\n return 0;\n }\n\n var digits = Math.pow(10, precision);\n var votesPerQuota = zrUtil.map(valueList, function (val) {\n return (isNaN(val) ? 0 : val) / sum * digits * 100;\n });\n var targetSeats = digits * 100;\n var seats = zrUtil.map(votesPerQuota, function (votes) {\n // Assign automatic seats.\n return Math.floor(votes);\n });\n var currentSum = zrUtil.reduce(seats, function (acc, val) {\n return acc + val;\n }, 0);\n var remainder = zrUtil.map(votesPerQuota, function (votes, idx) {\n return votes - seats[idx];\n }); // Has remainding votes.\n\n while (currentSum < targetSeats) {\n // Find next largest remainder.\n var max = Number.NEGATIVE_INFINITY;\n var maxId = null;\n\n for (var i = 0, len = remainder.length; i < len; ++i) {\n if (remainder[i] > max) {\n max = remainder[i];\n maxId = i;\n }\n } // Add a vote to max remainder.\n\n\n ++seats[maxId];\n remainder[maxId] = 0;\n ++currentSum;\n }\n\n return seats[idx] / digits;\n} // Number.MAX_SAFE_INTEGER, ie do not support.\n\n\nvar MAX_SAFE_INTEGER = 9007199254740991;\n/**\n * To 0 - 2 * PI, considering negative radian.\n * @param {number} radian\n * @return {number}\n */\n\nfunction remRadian(radian) {\n var pi2 = Math.PI * 2;\n return (radian % pi2 + pi2) % pi2;\n}\n/**\n * @param {type} radian\n * @return {boolean}\n */\n\n\nfunction isRadianAroundZero(val) {\n return val > -RADIAN_EPSILON && val < RADIAN_EPSILON;\n}\n/* eslint-disable */\n\n\nvar TIME_REG = /^(?:(\\d{4})(?:[-\\/](\\d{1,2})(?:[-\\/](\\d{1,2})(?:[T ](\\d{1,2})(?::(\\d\\d)(?::(\\d\\d)(?:[.,](\\d+))?)?)?(Z|[\\+\\-]\\d\\d:?\\d\\d)?)?)?)?)?$/; // jshint ignore:line\n\n/* eslint-enable */\n\n/**\n * @param {string|Date|number} value These values can be accepted:\n * + An instance of Date, represent a time in its own time zone.\n * + Or string in a subset of ISO 8601, only including:\n * + only year, month, date: '2012-03', '2012-03-01', '2012-03-01 05', '2012-03-01 05:06',\n * + separated with T or space: '2012-03-01T12:22:33.123', '2012-03-01 12:22:33.123',\n * + time zone: '2012-03-01T12:22:33Z', '2012-03-01T12:22:33+8000', '2012-03-01T12:22:33-05:00',\n * all of which will be treated as local time if time zone is not specified\n * (see ).\n * + Or other string format, including (all of which will be treated as loacal time):\n * '2012', '2012-3-1', '2012/3/1', '2012/03/01',\n * '2009/6/12 2:00', '2009/6/12 2:05:08', '2009/6/12 2:05:08.123'\n * + a timestamp, which represent a time in UTC.\n * @return {Date} date\n */\n\nfunction parseDate(value) {\n if (value instanceof Date) {\n return value;\n } else if (typeof value === 'string') {\n // Different browsers parse date in different way, so we parse it manually.\n // Some other issues:\n // new Date('1970-01-01') is UTC,\n // new Date('1970/01/01') and new Date('1970-1-01') is local.\n // See issue #3623\n var match = TIME_REG.exec(value);\n\n if (!match) {\n // return Invalid Date.\n return new Date(NaN);\n } // Use local time when no timezone offset specifed.\n\n\n if (!match[8]) {\n // match[n] can only be string or undefined.\n // But take care of '12' + 1 => '121'.\n return new Date(+match[1], +(match[2] || 1) - 1, +match[3] || 1, +match[4] || 0, +(match[5] || 0), +match[6] || 0, +match[7] || 0);\n } // Timezoneoffset of Javascript Date has considered DST (Daylight Saving Time,\n // https://tc39.github.io/ecma262/#sec-daylight-saving-time-adjustment).\n // For example, system timezone is set as \"Time Zone: America/Toronto\",\n // then these code will get different result:\n // `new Date(1478411999999).getTimezoneOffset(); // get 240`\n // `new Date(1478412000000).getTimezoneOffset(); // get 300`\n // So we should not use `new Date`, but use `Date.UTC`.\n else {\n var hour = +match[4] || 0;\n\n if (match[8].toUpperCase() !== 'Z') {\n hour -= match[8].slice(0, 3);\n }\n\n return new Date(Date.UTC(+match[1], +(match[2] || 1) - 1, +match[3] || 1, hour, +(match[5] || 0), +match[6] || 0, +match[7] || 0));\n }\n } else if (value == null) {\n return new Date(NaN);\n }\n\n return new Date(Math.round(value));\n}\n/**\n * Quantity of a number. e.g. 0.1, 1, 10, 100\n *\n * @param {number} val\n * @return {number}\n */\n\n\nfunction quantity(val) {\n return Math.pow(10, quantityExponent(val));\n}\n/**\n * Exponent of the quantity of a number\n * e.g., 1234 equals to 1.234*10^3, so quantityExponent(1234) is 3\n *\n * @param {number} val non-negative value\n * @return {number}\n */\n\n\nfunction quantityExponent(val) {\n if (val === 0) {\n return 0;\n }\n\n var exp = Math.floor(Math.log(val) / Math.LN10);\n /**\n * exp is expected to be the rounded-down result of the base-10 log of val.\n * But due to the precision loss with Math.log(val), we need to restore it\n * using 10^exp to make sure we can get val back from exp. #11249\n */\n\n if (val / Math.pow(10, exp) >= 10) {\n exp++;\n }\n\n return exp;\n}\n/**\n * find a “nice” number approximately equal to x. Round the number if round = true,\n * take ceiling if round = false. The primary observation is that the “nicest”\n * numbers in decimal are 1, 2, and 5, and all power-of-ten multiples of these numbers.\n *\n * See \"Nice Numbers for Graph Labels\" of Graphic Gems.\n *\n * @param {number} val Non-negative value.\n * @param {boolean} round\n * @return {number}\n */\n\n\nfunction nice(val, round) {\n var exponent = quantityExponent(val);\n var exp10 = Math.pow(10, exponent);\n var f = val / exp10; // 1 <= f < 10\n\n var nf;\n\n if (round) {\n if (f < 1.5) {\n nf = 1;\n } else if (f < 2.5) {\n nf = 2;\n } else if (f < 4) {\n nf = 3;\n } else if (f < 7) {\n nf = 5;\n } else {\n nf = 10;\n }\n } else {\n if (f < 1) {\n nf = 1;\n } else if (f < 2) {\n nf = 2;\n } else if (f < 3) {\n nf = 3;\n } else if (f < 5) {\n nf = 5;\n } else {\n nf = 10;\n }\n }\n\n val = nf * exp10; // Fix 3 * 0.1 === 0.30000000000000004 issue (see IEEE 754).\n // 20 is the uppper bound of toFixed.\n\n return exponent >= -20 ? +val.toFixed(exponent < 0 ? -exponent : 0) : val;\n}\n/**\n * This code was copied from \"d3.js\"\n * .\n * See the license statement at the head of this file.\n * @param {Array.} ascArr\n */\n\n\nfunction quantile(ascArr, p) {\n var H = (ascArr.length - 1) * p + 1;\n var h = Math.floor(H);\n var v = +ascArr[h - 1];\n var e = H - h;\n return e ? v + e * (ascArr[h] - v) : v;\n}\n/**\n * Order intervals asc, and split them when overlap.\n * expect(numberUtil.reformIntervals([\n * {interval: [18, 62], close: [1, 1]},\n * {interval: [-Infinity, -70], close: [0, 0]},\n * {interval: [-70, -26], close: [1, 1]},\n * {interval: [-26, 18], close: [1, 1]},\n * {interval: [62, 150], close: [1, 1]},\n * {interval: [106, 150], close: [1, 1]},\n * {interval: [150, Infinity], close: [0, 0]}\n * ])).toEqual([\n * {interval: [-Infinity, -70], close: [0, 0]},\n * {interval: [-70, -26], close: [1, 1]},\n * {interval: [-26, 18], close: [0, 1]},\n * {interval: [18, 62], close: [0, 1]},\n * {interval: [62, 150], close: [0, 1]},\n * {interval: [150, Infinity], close: [0, 0]}\n * ]);\n * @param {Array.} list, where `close` mean open or close\n * of the interval, and Infinity can be used.\n * @return {Array.} The origin list, which has been reformed.\n */\n\n\nfunction reformIntervals(list) {\n list.sort(function (a, b) {\n return littleThan(a, b, 0) ? -1 : 1;\n });\n var curr = -Infinity;\n var currClose = 1;\n\n for (var i = 0; i < list.length;) {\n var interval = list[i].interval;\n var close = list[i].close;\n\n for (var lg = 0; lg < 2; lg++) {\n if (interval[lg] <= curr) {\n interval[lg] = curr;\n close[lg] = !lg ? 1 - currClose : 1;\n }\n\n curr = interval[lg];\n currClose = close[lg];\n }\n\n if (interval[0] === interval[1] && close[0] * close[1] !== 1) {\n list.splice(i, 1);\n } else {\n i++;\n }\n }\n\n return list;\n\n function littleThan(a, b, lg) {\n return a.interval[lg] < b.interval[lg] || a.interval[lg] === b.interval[lg] && (a.close[lg] - b.close[lg] === (!lg ? 1 : -1) || !lg && littleThan(a, b, 1));\n }\n}\n/**\n * parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n * ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n * subtraction forces infinities to NaN\n *\n * @param {*} v\n * @return {boolean}\n */\n\n\nfunction isNumeric(v) {\n return v - parseFloat(v) >= 0;\n}\n\nexports.linearMap = linearMap;\nexports.parsePercent = parsePercent;\nexports.round = round;\nexports.asc = asc;\nexports.getPrecision = getPrecision;\nexports.getPrecisionSafe = getPrecisionSafe;\nexports.getPixelPrecision = getPixelPrecision;\nexports.getPercentWithPrecision = getPercentWithPrecision;\nexports.MAX_SAFE_INTEGER = MAX_SAFE_INTEGER;\nexports.remRadian = remRadian;\nexports.isRadianAroundZero = isRadianAroundZero;\nexports.parseDate = parseDate;\nexports.quantity = quantity;\nexports.quantityExponent = quantityExponent;\nexports.nice = nice;\nexports.quantile = quantile;\nexports.reformIntervals = reformIntervals;\nexports.isNumeric = isNumeric;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _dataProvider = require(\"../../data/helper/dataProvider\");\n\nvar retrieveRawValue = _dataProvider.retrieveRawValue;\n\nvar _format = require(\"../../util/format\");\n\nvar getTooltipMarker = _format.getTooltipMarker;\nvar formatTpl = _format.formatTpl;\n\nvar _model = require(\"../../util/model\");\n\nvar getTooltipRenderMode = _model.getTooltipRenderMode;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 DIMENSION_LABEL_REG = /\\{@(.+?)\\}/g; // PENDING A little ugly\n\nvar _default = {\n /**\n * Get params for formatter\n * @param {number} dataIndex\n * @param {string} [dataType]\n * @return {Object}\n */\n getDataParams: function (dataIndex, dataType) {\n var data = this.getData(dataType);\n var rawValue = this.getRawValue(dataIndex, dataType);\n var rawDataIndex = data.getRawIndex(dataIndex);\n var name = data.getName(dataIndex);\n var itemOpt = data.getRawDataItem(dataIndex);\n var color = data.getItemVisual(dataIndex, 'color');\n var borderColor = data.getItemVisual(dataIndex, 'borderColor');\n var tooltipModel = this.ecModel.getComponent('tooltip');\n var renderModeOption = tooltipModel && tooltipModel.get('renderMode');\n var renderMode = getTooltipRenderMode(renderModeOption);\n var mainType = this.mainType;\n var isSeries = mainType === 'series';\n var userOutput = data.userOutput;\n return {\n componentType: mainType,\n componentSubType: this.subType,\n componentIndex: this.componentIndex,\n seriesType: isSeries ? this.subType : null,\n seriesIndex: this.seriesIndex,\n seriesId: isSeries ? this.id : null,\n seriesName: isSeries ? this.name : null,\n name: name,\n dataIndex: rawDataIndex,\n data: itemOpt,\n dataType: dataType,\n value: rawValue,\n color: color,\n borderColor: borderColor,\n dimensionNames: userOutput ? userOutput.dimensionNames : null,\n encode: userOutput ? userOutput.encode : null,\n marker: getTooltipMarker({\n color: color,\n renderMode: renderMode\n }),\n // Param name list for mapping `a`, `b`, `c`, `d`, `e`\n $vars: ['seriesName', 'name', 'value']\n };\n },\n\n /**\n * Format label\n * @param {number} dataIndex\n * @param {string} [status='normal'] 'normal' or 'emphasis'\n * @param {string} [dataType]\n * @param {number} [dimIndex] Only used in some chart that\n * use formatter in different dimensions, like radar.\n * @param {string} [labelProp='label']\n * @return {string} If not formatter, return null/undefined\n */\n getFormattedLabel: function (dataIndex, status, dataType, dimIndex, labelProp) {\n status = status || 'normal';\n var data = this.getData(dataType);\n var itemModel = data.getItemModel(dataIndex);\n var params = this.getDataParams(dataIndex, dataType);\n\n if (dimIndex != null && params.value instanceof Array) {\n params.value = params.value[dimIndex];\n }\n\n var formatter = itemModel.get(status === 'normal' ? [labelProp || 'label', 'formatter'] : [status, labelProp || 'label', 'formatter']);\n\n if (typeof formatter === 'function') {\n params.status = status;\n params.dimensionIndex = dimIndex;\n return formatter(params);\n } else if (typeof formatter === 'string') {\n var str = formatTpl(formatter, params); // Support 'aaa{@[3]}bbb{@product}ccc'.\n // Do not support '}' in dim name util have to.\n\n return str.replace(DIMENSION_LABEL_REG, function (origin, dim) {\n var len = dim.length;\n\n if (dim.charAt(0) === '[' && dim.charAt(len - 1) === ']') {\n dim = +dim.slice(1, len - 1); // Also: '[]' => 0\n }\n\n return retrieveRawValue(data, dataIndex, dim);\n });\n }\n },\n\n /**\n * Get raw value in option\n * @param {number} idx\n * @param {string} [dataType]\n * @return {Array|number|string}\n */\n getRawValue: function (idx, dataType) {\n return retrieveRawValue(this.getData(dataType), idx);\n },\n\n /**\n * Should be implemented.\n * @param {number} dataIndex\n * @param {boolean} [multipleSeries=false]\n * @param {number} [dataType]\n * @return {string} tooltip string\n */\n formatTooltip: function () {// Empty 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 makeStyleMapper = require(\"./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 getLineStyle = makeStyleMapper([['lineWidth', 'width'], ['stroke', 'color'], ['opacity'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor']]);\nvar _default = {\n getLineStyle: function (excludes) {\n var style = getLineStyle(this, excludes); // Always set lineDash whether dashed, otherwise we can not\n // erase the previous style when assigning to el.style.\n\n style.lineDash = this.getLineDash(style.lineWidth);\n return style;\n },\n getLineDash: function (lineWidth) {\n if (lineWidth == null) {\n lineWidth = 1;\n }\n\n var lineType = this.get('type');\n var dotSize = Math.max(lineWidth, 2);\n var dashSize = lineWidth * 4;\n return lineType === 'solid' || lineType == null ? // Use `false` but not `null` for the solid line here, because `null` might be\n // ignored when assigning to `el.style`. e.g., when setting `lineStyle.type` as\n // `'dashed'` and `emphasis.lineStyle.type` as `'solid'` in graph series, the\n // `lineDash` gotten form the latter one is not able to erase that from the former\n // one if using `null` here according to the emhpsis strategy in `util/graphic.js`.\n false : lineType === 'dashed' ? [dashSize, dashSize] : [dotSize, dotSize];\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\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 zrender = require(\"zrender/lib/zrender\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar colorTool = require(\"zrender/lib/tool/color\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar timsort = require(\"zrender/lib/core/timsort\");\n\nvar Eventful = require(\"zrender/lib/mixin/Eventful\");\n\nvar GlobalModel = require(\"./model/Global\");\n\nvar ExtensionAPI = require(\"./ExtensionAPI\");\n\nvar CoordinateSystemManager = require(\"./CoordinateSystem\");\n\nvar OptionManager = require(\"./model/OptionManager\");\n\nvar backwardCompat = require(\"./preprocessor/backwardCompat\");\n\nvar dataStack = require(\"./processor/dataStack\");\n\nvar ComponentModel = require(\"./model/Component\");\n\nvar SeriesModel = require(\"./model/Series\");\n\nvar ComponentView = require(\"./view/Component\");\n\nvar ChartView = require(\"./view/Chart\");\n\nvar graphic = require(\"./util/graphic\");\n\nvar modelUtil = require(\"./util/model\");\n\nvar _throttle = require(\"./util/throttle\");\n\nvar throttle = _throttle.throttle;\n\nvar seriesColor = require(\"./visual/seriesColor\");\n\nvar aria = require(\"./visual/aria\");\n\nvar loadingDefault = require(\"./loading/default\");\n\nvar Scheduler = require(\"./stream/Scheduler\");\n\nvar lightTheme = require(\"./theme/light\");\n\nvar darkTheme = require(\"./theme/dark\");\n\nrequire(\"./component/dataset\");\n\nvar mapDataStorage = require(\"./coord/geo/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*/\nvar assert = zrUtil.assert;\nvar each = zrUtil.each;\nvar isFunction = zrUtil.isFunction;\nvar isObject = zrUtil.isObject;\nvar parseClassType = ComponentModel.parseClassType;\nvar version = '4.9.0';\nvar dependencies = {\n zrender: '4.3.2'\n};\nvar TEST_FRAME_REMAIN_TIME = 1;\nvar PRIORITY_PROCESSOR_FILTER = 1000;\nvar PRIORITY_PROCESSOR_SERIES_FILTER = 800;\nvar PRIORITY_PROCESSOR_DATASTACK = 900;\nvar PRIORITY_PROCESSOR_STATISTIC = 5000;\nvar PRIORITY_VISUAL_LAYOUT = 1000;\nvar PRIORITY_VISUAL_PROGRESSIVE_LAYOUT = 1100;\nvar PRIORITY_VISUAL_GLOBAL = 2000;\nvar PRIORITY_VISUAL_CHART = 3000;\nvar PRIORITY_VISUAL_POST_CHART_LAYOUT = 3500;\nvar PRIORITY_VISUAL_COMPONENT = 4000; // FIXME\n// necessary?\n\nvar PRIORITY_VISUAL_BRUSH = 5000;\nvar PRIORITY = {\n PROCESSOR: {\n FILTER: PRIORITY_PROCESSOR_FILTER,\n SERIES_FILTER: PRIORITY_PROCESSOR_SERIES_FILTER,\n STATISTIC: PRIORITY_PROCESSOR_STATISTIC\n },\n VISUAL: {\n LAYOUT: PRIORITY_VISUAL_LAYOUT,\n PROGRESSIVE_LAYOUT: PRIORITY_VISUAL_PROGRESSIVE_LAYOUT,\n GLOBAL: PRIORITY_VISUAL_GLOBAL,\n CHART: PRIORITY_VISUAL_CHART,\n POST_CHART_LAYOUT: PRIORITY_VISUAL_POST_CHART_LAYOUT,\n COMPONENT: PRIORITY_VISUAL_COMPONENT,\n BRUSH: PRIORITY_VISUAL_BRUSH\n }\n}; // Main process have three entries: `setOption`, `dispatchAction` and `resize`,\n// where they must not be invoked nestedly, except the only case: invoke\n// dispatchAction with updateMethod \"none\" in main process.\n// This flag is used to carry out this rule.\n// All events will be triggered out side main process (i.e. when !this[IN_MAIN_PROCESS]).\n\nvar IN_MAIN_PROCESS = '__flagInMainProcess';\nvar OPTION_UPDATED = '__optionUpdated';\nvar ACTION_REG = /^[a-zA-Z0-9_]+$/;\n\nfunction createRegisterEventWithLowercaseName(method, ignoreDisposed) {\n return function (eventName, handler, context) {\n if (!ignoreDisposed && this._disposed) {\n disposedWarning(this.id);\n return;\n } // Event name is all lowercase\n\n\n eventName = eventName && eventName.toLowerCase();\n Eventful.prototype[method].call(this, eventName, handler, context);\n };\n}\n/**\n * @module echarts~MessageCenter\n */\n\n\nfunction MessageCenter() {\n Eventful.call(this);\n}\n\nMessageCenter.prototype.on = createRegisterEventWithLowercaseName('on', true);\nMessageCenter.prototype.off = createRegisterEventWithLowercaseName('off', true);\nMessageCenter.prototype.one = createRegisterEventWithLowercaseName('one', true);\nzrUtil.mixin(MessageCenter, Eventful);\n/**\n * @module echarts~ECharts\n */\n\nfunction ECharts(dom, theme, opts) {\n opts = opts || {}; // Get theme by name\n\n if (typeof theme === 'string') {\n theme = themeStorage[theme];\n }\n /**\n * @type {string}\n */\n\n\n this.id;\n /**\n * Group id\n * @type {string}\n */\n\n this.group;\n /**\n * @type {HTMLElement}\n * @private\n */\n\n this._dom = dom;\n var defaultRenderer = 'canvas';\n\n /**\n * @type {module:zrender/ZRender}\n * @private\n */\n var zr = this._zr = zrender.init(dom, {\n renderer: opts.renderer || defaultRenderer,\n devicePixelRatio: opts.devicePixelRatio,\n width: opts.width,\n height: opts.height\n });\n /**\n * Expect 60 fps.\n * @type {Function}\n * @private\n */\n\n this._throttledZrFlush = throttle(zrUtil.bind(zr.flush, zr), 17);\n var theme = zrUtil.clone(theme);\n theme && backwardCompat(theme, true);\n /**\n * @type {Object}\n * @private\n */\n\n this._theme = theme;\n /**\n * @type {Array.}\n * @private\n */\n\n this._chartsViews = [];\n /**\n * @type {Object.}\n * @private\n */\n\n this._chartsMap = {};\n /**\n * @type {Array.}\n * @private\n */\n\n this._componentsViews = [];\n /**\n * @type {Object.}\n * @private\n */\n\n this._componentsMap = {};\n /**\n * @type {module:echarts/CoordinateSystem}\n * @private\n */\n\n this._coordSysMgr = new CoordinateSystemManager();\n /**\n * @type {module:echarts/ExtensionAPI}\n * @private\n */\n\n var api = this._api = createExtensionAPI(this); // Sort on demand\n\n function prioritySortFunc(a, b) {\n return a.__prio - b.__prio;\n }\n\n timsort(visualFuncs, prioritySortFunc);\n timsort(dataProcessorFuncs, prioritySortFunc);\n /**\n * @type {module:echarts/stream/Scheduler}\n */\n\n this._scheduler = new Scheduler(this, api, dataProcessorFuncs, visualFuncs);\n Eventful.call(this, this._ecEventProcessor = new EventProcessor());\n /**\n * @type {module:echarts~MessageCenter}\n * @private\n */\n\n this._messageCenter = new MessageCenter(); // Init mouse events\n\n this._initEvents(); // In case some people write `window.onresize = chart.resize`\n\n\n this.resize = zrUtil.bind(this.resize, this); // Can't dispatch action during rendering procedure\n\n this._pendingActions = [];\n zr.animation.on('frame', this._onframe, this);\n bindRenderedEvent(zr, this); // ECharts instance can be used as value.\n\n zrUtil.setAsPrimitive(this);\n}\n\nvar echartsProto = ECharts.prototype;\n\nechartsProto._onframe = function () {\n if (this._disposed) {\n return;\n }\n\n var scheduler = this._scheduler; // Lazy update\n\n if (this[OPTION_UPDATED]) {\n var silent = this[OPTION_UPDATED].silent;\n this[IN_MAIN_PROCESS] = true;\n prepare(this);\n updateMethods.update.call(this);\n this[IN_MAIN_PROCESS] = false;\n this[OPTION_UPDATED] = false;\n flushPendingActions.call(this, silent);\n triggerUpdatedEvent.call(this, silent);\n } // Avoid do both lazy update and progress in one frame.\n else if (scheduler.unfinished) {\n // Stream progress.\n var remainTime = TEST_FRAME_REMAIN_TIME;\n var ecModel = this._model;\n var api = this._api;\n scheduler.unfinished = false;\n\n do {\n var startTime = +new Date();\n scheduler.performSeriesTasks(ecModel); // Currently dataProcessorFuncs do not check threshold.\n\n scheduler.performDataProcessorTasks(ecModel);\n updateStreamModes(this, ecModel); // Do not update coordinate system here. Because that coord system update in\n // each frame is not a good user experience. So we follow the rule that\n // the extent of the coordinate system is determin in the first frame (the\n // frame is executed immedietely after task reset.\n // this._coordSysMgr.update(ecModel, api);\n // console.log('--- ec frame visual ---', remainTime);\n\n scheduler.performVisualTasks(ecModel);\n renderSeries(this, this._model, api, 'remain');\n remainTime -= +new Date() - startTime;\n } while (remainTime > 0 && scheduler.unfinished); // Call flush explicitly for trigger finished event.\n\n\n if (!scheduler.unfinished) {\n this._zr.flush();\n } // Else, zr flushing be ensue within the same frame,\n // because zr flushing is after onframe event.\n\n }\n};\n/**\n * @return {HTMLElement}\n */\n\n\nechartsProto.getDom = function () {\n return this._dom;\n};\n/**\n * @return {module:zrender~ZRender}\n */\n\n\nechartsProto.getZr = function () {\n return this._zr;\n};\n/**\n * Usage:\n * chart.setOption(option, notMerge, lazyUpdate);\n * chart.setOption(option, {\n * notMerge: ...,\n * lazyUpdate: ...,\n * silent: ...\n * });\n *\n * @param {Object} option\n * @param {Object|boolean} [opts] opts or notMerge.\n * @param {boolean} [opts.notMerge=false]\n * @param {boolean} [opts.lazyUpdate=false] Useful when setOption frequently.\n */\n\n\nechartsProto.setOption = function (option, notMerge, lazyUpdate) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n var silent;\n\n if (isObject(notMerge)) {\n lazyUpdate = notMerge.lazyUpdate;\n silent = notMerge.silent;\n notMerge = notMerge.notMerge;\n }\n\n this[IN_MAIN_PROCESS] = true;\n\n if (!this._model || notMerge) {\n var optionManager = new OptionManager(this._api);\n var theme = this._theme;\n var ecModel = this._model = new GlobalModel();\n ecModel.scheduler = this._scheduler;\n ecModel.init(null, null, theme, optionManager);\n }\n\n this._model.setOption(option, optionPreprocessorFuncs);\n\n if (lazyUpdate) {\n this[OPTION_UPDATED] = {\n silent: silent\n };\n this[IN_MAIN_PROCESS] = false;\n } else {\n prepare(this);\n updateMethods.update.call(this); // Ensure zr refresh sychronously, and then pixel in canvas can be\n // fetched after `setOption`.\n\n this._zr.flush();\n\n this[OPTION_UPDATED] = false;\n this[IN_MAIN_PROCESS] = false;\n flushPendingActions.call(this, silent);\n triggerUpdatedEvent.call(this, silent);\n }\n};\n/**\n * @DEPRECATED\n */\n\n\nechartsProto.setTheme = function () {\n console.error('ECharts#setTheme() is DEPRECATED in ECharts 3.0');\n};\n/**\n * @return {module:echarts/model/Global}\n */\n\n\nechartsProto.getModel = function () {\n return this._model;\n};\n/**\n * @return {Object}\n */\n\n\nechartsProto.getOption = function () {\n return this._model && this._model.getOption();\n};\n/**\n * @return {number}\n */\n\n\nechartsProto.getWidth = function () {\n return this._zr.getWidth();\n};\n/**\n * @return {number}\n */\n\n\nechartsProto.getHeight = function () {\n return this._zr.getHeight();\n};\n/**\n * @return {number}\n */\n\n\nechartsProto.getDevicePixelRatio = function () {\n return this._zr.painter.dpr || window.devicePixelRatio || 1;\n};\n/**\n * Get canvas which has all thing rendered\n * @param {Object} opts\n * @param {string} [opts.backgroundColor]\n * @return {string}\n */\n\n\nechartsProto.getRenderedCanvas = function (opts) {\n if (!env.canvasSupported) {\n return;\n }\n\n opts = opts || {};\n opts.pixelRatio = opts.pixelRatio || 1;\n opts.backgroundColor = opts.backgroundColor || this._model.get('backgroundColor');\n var zr = this._zr; // var list = zr.storage.getDisplayList();\n // Stop animations\n // Never works before in init animation, so remove it.\n // zrUtil.each(list, function (el) {\n // el.stopAnimation(true);\n // });\n\n return zr.painter.getRenderedCanvas(opts);\n};\n/**\n * Get svg data url\n * @return {string}\n */\n\n\nechartsProto.getSvgDataURL = function () {\n if (!env.svgSupported) {\n return;\n }\n\n var zr = this._zr;\n var list = zr.storage.getDisplayList(); // Stop animations\n\n zrUtil.each(list, function (el) {\n el.stopAnimation(true);\n });\n return zr.painter.toDataURL();\n};\n/**\n * @return {string}\n * @param {Object} opts\n * @param {string} [opts.type='png']\n * @param {string} [opts.pixelRatio=1]\n * @param {string} [opts.backgroundColor]\n * @param {string} [opts.excludeComponents]\n */\n\n\nechartsProto.getDataURL = function (opts) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n opts = opts || {};\n var excludeComponents = opts.excludeComponents;\n var ecModel = this._model;\n var excludesComponentViews = [];\n var self = this;\n each(excludeComponents, function (componentType) {\n ecModel.eachComponent({\n mainType: componentType\n }, function (component) {\n var view = self._componentsMap[component.__viewId];\n\n if (!view.group.ignore) {\n excludesComponentViews.push(view);\n view.group.ignore = true;\n }\n });\n });\n var url = this._zr.painter.getType() === 'svg' ? this.getSvgDataURL() : this.getRenderedCanvas(opts).toDataURL('image/' + (opts && opts.type || 'png'));\n each(excludesComponentViews, function (view) {\n view.group.ignore = false;\n });\n return url;\n};\n/**\n * @return {string}\n * @param {Object} opts\n * @param {string} [opts.type='png']\n * @param {string} [opts.pixelRatio=1]\n * @param {string} [opts.backgroundColor]\n */\n\n\nechartsProto.getConnectedDataURL = function (opts) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n if (!env.canvasSupported) {\n return;\n }\n\n var isSvg = opts.type === 'svg';\n var groupId = this.group;\n var mathMin = Math.min;\n var mathMax = Math.max;\n var MAX_NUMBER = Infinity;\n\n if (connectedGroups[groupId]) {\n var left = MAX_NUMBER;\n var top = MAX_NUMBER;\n var right = -MAX_NUMBER;\n var bottom = -MAX_NUMBER;\n var canvasList = [];\n var dpr = opts && opts.pixelRatio || 1;\n zrUtil.each(instances, function (chart, id) {\n if (chart.group === groupId) {\n var canvas = isSvg ? chart.getZr().painter.getSvgDom().innerHTML : chart.getRenderedCanvas(zrUtil.clone(opts));\n var boundingRect = chart.getDom().getBoundingClientRect();\n left = mathMin(boundingRect.left, left);\n top = mathMin(boundingRect.top, top);\n right = mathMax(boundingRect.right, right);\n bottom = mathMax(boundingRect.bottom, bottom);\n canvasList.push({\n dom: canvas,\n left: boundingRect.left,\n top: boundingRect.top\n });\n }\n });\n left *= dpr;\n top *= dpr;\n right *= dpr;\n bottom *= dpr;\n var width = right - left;\n var height = bottom - top;\n var targetCanvas = zrUtil.createCanvas();\n var zr = zrender.init(targetCanvas, {\n renderer: isSvg ? 'svg' : 'canvas'\n });\n zr.resize({\n width: width,\n height: height\n });\n\n if (isSvg) {\n var content = '';\n each(canvasList, function (item) {\n var x = item.left - left;\n var y = item.top - top;\n content += '' + item.dom + '';\n });\n zr.painter.getSvgRoot().innerHTML = content;\n\n if (opts.connectedBackgroundColor) {\n zr.painter.setBackgroundColor(opts.connectedBackgroundColor);\n }\n\n zr.refreshImmediately();\n return zr.painter.toDataURL();\n } else {\n // Background between the charts\n if (opts.connectedBackgroundColor) {\n zr.add(new graphic.Rect({\n shape: {\n x: 0,\n y: 0,\n width: width,\n height: height\n },\n style: {\n fill: opts.connectedBackgroundColor\n }\n }));\n }\n\n each(canvasList, function (item) {\n var img = new graphic.Image({\n style: {\n x: item.left * dpr - left,\n y: item.top * dpr - top,\n image: item.dom\n }\n });\n zr.add(img);\n });\n zr.refreshImmediately();\n return targetCanvas.toDataURL('image/' + (opts && opts.type || 'png'));\n }\n } else {\n return this.getDataURL(opts);\n }\n};\n/**\n * Convert from logical coordinate system to pixel coordinate system.\n * See CoordinateSystem#convertToPixel.\n * @param {string|Object} finder\n * If string, e.g., 'geo', means {geoIndex: 0}.\n * If Object, could contain some of these properties below:\n * {\n * seriesIndex / seriesId / seriesName,\n * geoIndex / geoId, geoName,\n * bmapIndex / bmapId / bmapName,\n * xAxisIndex / xAxisId / xAxisName,\n * yAxisIndex / yAxisId / yAxisName,\n * gridIndex / gridId / gridName,\n * ... (can be extended)\n * }\n * @param {Array|number} value\n * @return {Array|number} result\n */\n\n\nechartsProto.convertToPixel = zrUtil.curry(doConvertPixel, 'convertToPixel');\n/**\n * Convert from pixel coordinate system to logical coordinate system.\n * See CoordinateSystem#convertFromPixel.\n * @param {string|Object} finder\n * If string, e.g., 'geo', means {geoIndex: 0}.\n * If Object, could contain some of these properties below:\n * {\n * seriesIndex / seriesId / seriesName,\n * geoIndex / geoId / geoName,\n * bmapIndex / bmapId / bmapName,\n * xAxisIndex / xAxisId / xAxisName,\n * yAxisIndex / yAxisId / yAxisName\n * gridIndex / gridId / gridName,\n * ... (can be extended)\n * }\n * @param {Array|number} value\n * @return {Array|number} result\n */\n\nechartsProto.convertFromPixel = zrUtil.curry(doConvertPixel, 'convertFromPixel');\n\nfunction doConvertPixel(methodName, finder, value) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n var ecModel = this._model;\n\n var coordSysList = this._coordSysMgr.getCoordinateSystems();\n\n var result;\n finder = modelUtil.parseFinder(ecModel, finder);\n\n for (var i = 0; i < coordSysList.length; i++) {\n var coordSys = coordSysList[i];\n\n if (coordSys[methodName] && (result = coordSys[methodName](ecModel, finder, value)) != null) {\n return result;\n }\n }\n}\n/**\n * Is the specified coordinate systems or components contain the given pixel point.\n * @param {string|Object} finder\n * If string, e.g., 'geo', means {geoIndex: 0}.\n * If Object, could contain some of these properties below:\n * {\n * seriesIndex / seriesId / seriesName,\n * geoIndex / geoId / geoName,\n * bmapIndex / bmapId / bmapName,\n * xAxisIndex / xAxisId / xAxisName,\n * yAxisIndex / yAxisId / yAxisName,\n * gridIndex / gridId / gridName,\n * ... (can be extended)\n * }\n * @param {Array|number} value\n * @return {boolean} result\n */\n\n\nechartsProto.containPixel = function (finder, value) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n var ecModel = this._model;\n var result;\n finder = modelUtil.parseFinder(ecModel, finder);\n zrUtil.each(finder, function (models, key) {\n key.indexOf('Models') >= 0 && zrUtil.each(models, function (model) {\n var coordSys = model.coordinateSystem;\n\n if (coordSys && coordSys.containPoint) {\n result |= !!coordSys.containPoint(value);\n } else if (key === 'seriesModels') {\n var view = this._chartsMap[model.__viewId];\n\n if (view && view.containPoint) {\n result |= view.containPoint(value, model);\n } else {}\n } else {}\n }, this);\n }, this);\n return !!result;\n};\n/**\n * Get visual from series or data.\n * @param {string|Object} finder\n * If string, e.g., 'series', means {seriesIndex: 0}.\n * If Object, could contain some of these properties below:\n * {\n * seriesIndex / seriesId / seriesName,\n * dataIndex / dataIndexInside\n * }\n * If dataIndex is not specified, series visual will be fetched,\n * but not data item visual.\n * If all of seriesIndex, seriesId, seriesName are not specified,\n * visual will be fetched from first series.\n * @param {string} visualType 'color', 'symbol', 'symbolSize'\n */\n\n\nechartsProto.getVisual = function (finder, visualType) {\n var ecModel = this._model;\n finder = modelUtil.parseFinder(ecModel, finder, {\n defaultMainType: 'series'\n });\n var seriesModel = finder.seriesModel;\n var data = seriesModel.getData();\n var dataIndexInside = finder.hasOwnProperty('dataIndexInside') ? finder.dataIndexInside : finder.hasOwnProperty('dataIndex') ? data.indexOfRawIndex(finder.dataIndex) : null;\n return dataIndexInside != null ? data.getItemVisual(dataIndexInside, visualType) : data.getVisual(visualType);\n};\n/**\n * Get view of corresponding component model\n * @param {module:echarts/model/Component} componentModel\n * @return {module:echarts/view/Component}\n */\n\n\nechartsProto.getViewOfComponentModel = function (componentModel) {\n return this._componentsMap[componentModel.__viewId];\n};\n/**\n * Get view of corresponding series model\n * @param {module:echarts/model/Series} seriesModel\n * @return {module:echarts/view/Chart}\n */\n\n\nechartsProto.getViewOfSeriesModel = function (seriesModel) {\n return this._chartsMap[seriesModel.__viewId];\n};\n\nvar updateMethods = {\n prepareAndUpdate: function (payload) {\n prepare(this);\n updateMethods.update.call(this, payload);\n },\n\n /**\n * @param {Object} payload\n * @private\n */\n update: function (payload) {\n // console.profile && console.profile('update');\n var ecModel = this._model;\n var api = this._api;\n var zr = this._zr;\n var coordSysMgr = this._coordSysMgr;\n var scheduler = this._scheduler; // update before setOption\n\n if (!ecModel) {\n return;\n }\n\n scheduler.restoreData(ecModel, payload);\n scheduler.performSeriesTasks(ecModel); // TODO\n // Save total ecModel here for undo/redo (after restoring data and before processing data).\n // Undo (restoration of total ecModel) can be carried out in 'action' or outside API call.\n // Create new coordinate system each update\n // In LineView may save the old coordinate system and use it to get the orignal point\n\n coordSysMgr.create(ecModel, api);\n scheduler.performDataProcessorTasks(ecModel, payload); // Current stream render is not supported in data process. So we can update\n // stream modes after data processing, where the filtered data is used to\n // deteming whether use progressive rendering.\n\n updateStreamModes(this, ecModel); // We update stream modes before coordinate system updated, then the modes info\n // can be fetched when coord sys updating (consider the barGrid extent fix). But\n // the drawback is the full coord info can not be fetched. Fortunately this full\n // coord is not requied in stream mode updater currently.\n\n coordSysMgr.update(ecModel, api);\n clearColorPalette(ecModel);\n scheduler.performVisualTasks(ecModel, payload);\n render(this, ecModel, api, payload); // Set background\n\n var backgroundColor = ecModel.get('backgroundColor') || 'transparent'; // In IE8\n\n if (!env.canvasSupported) {\n var colorArr = colorTool.parse(backgroundColor);\n backgroundColor = colorTool.stringify(colorArr, 'rgb');\n\n if (colorArr[3] === 0) {\n backgroundColor = 'transparent';\n }\n } else {\n zr.setBackgroundColor(backgroundColor);\n }\n\n performPostUpdateFuncs(ecModel, api); // console.profile && console.profileEnd('update');\n },\n\n /**\n * @param {Object} payload\n * @private\n */\n updateTransform: function (payload) {\n var ecModel = this._model;\n var ecIns = this;\n var api = this._api; // update before setOption\n\n if (!ecModel) {\n return;\n } // ChartView.markUpdateMethod(payload, 'updateTransform');\n\n\n var componentDirtyList = [];\n ecModel.eachComponent(function (componentType, componentModel) {\n var componentView = ecIns.getViewOfComponentModel(componentModel);\n\n if (componentView && componentView.__alive) {\n if (componentView.updateTransform) {\n var result = componentView.updateTransform(componentModel, ecModel, api, payload);\n result && result.update && componentDirtyList.push(componentView);\n } else {\n componentDirtyList.push(componentView);\n }\n }\n });\n var seriesDirtyMap = zrUtil.createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n var chartView = ecIns._chartsMap[seriesModel.__viewId];\n\n if (chartView.updateTransform) {\n var result = chartView.updateTransform(seriesModel, ecModel, api, payload);\n result && result.update && seriesDirtyMap.set(seriesModel.uid, 1);\n } else {\n seriesDirtyMap.set(seriesModel.uid, 1);\n }\n });\n clearColorPalette(ecModel); // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.\n // this._scheduler.performVisualTasks(ecModel, payload, 'layout', true);\n\n this._scheduler.performVisualTasks(ecModel, payload, {\n setDirty: true,\n dirtyMap: seriesDirtyMap\n }); // Currently, not call render of components. Geo render cost a lot.\n // renderComponents(ecIns, ecModel, api, payload, componentDirtyList);\n\n\n renderSeries(ecIns, ecModel, api, payload, seriesDirtyMap);\n performPostUpdateFuncs(ecModel, this._api);\n },\n\n /**\n * @param {Object} payload\n * @private\n */\n updateView: function (payload) {\n var ecModel = this._model; // update before setOption\n\n if (!ecModel) {\n return;\n }\n\n ChartView.markUpdateMethod(payload, 'updateView');\n clearColorPalette(ecModel); // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.\n\n this._scheduler.performVisualTasks(ecModel, payload, {\n setDirty: true\n });\n\n render(this, this._model, this._api, payload);\n performPostUpdateFuncs(ecModel, this._api);\n },\n\n /**\n * @param {Object} payload\n * @private\n */\n updateVisual: function (payload) {\n updateMethods.update.call(this, payload); // var ecModel = this._model;\n // // update before setOption\n // if (!ecModel) {\n // return;\n // }\n // ChartView.markUpdateMethod(payload, 'updateVisual');\n // clearColorPalette(ecModel);\n // // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.\n // this._scheduler.performVisualTasks(ecModel, payload, {visualType: 'visual', setDirty: true});\n // render(this, this._model, this._api, payload);\n // performPostUpdateFuncs(ecModel, this._api);\n },\n\n /**\n * @param {Object} payload\n * @private\n */\n updateLayout: function (payload) {\n updateMethods.update.call(this, payload); // var ecModel = this._model;\n // // update before setOption\n // if (!ecModel) {\n // return;\n // }\n // ChartView.markUpdateMethod(payload, 'updateLayout');\n // // Keep pipe to the exist pipeline because it depends on the render task of the full pipeline.\n // // this._scheduler.performVisualTasks(ecModel, payload, 'layout', true);\n // this._scheduler.performVisualTasks(ecModel, payload, {setDirty: true});\n // render(this, this._model, this._api, payload);\n // performPostUpdateFuncs(ecModel, this._api);\n }\n};\n\nfunction prepare(ecIns) {\n var ecModel = ecIns._model;\n var scheduler = ecIns._scheduler;\n scheduler.restorePipelines(ecModel);\n scheduler.prepareStageTasks();\n prepareView(ecIns, 'component', ecModel, scheduler);\n prepareView(ecIns, 'chart', ecModel, scheduler);\n scheduler.plan();\n}\n/**\n * @private\n */\n\n\nfunction updateDirectly(ecIns, method, payload, mainType, subType) {\n var ecModel = ecIns._model; // broadcast\n\n if (!mainType) {\n // FIXME\n // Chart will not be update directly here, except set dirty.\n // But there is no such scenario now.\n each(ecIns._componentsViews.concat(ecIns._chartsViews), callView);\n return;\n }\n\n var query = {};\n query[mainType + 'Id'] = payload[mainType + 'Id'];\n query[mainType + 'Index'] = payload[mainType + 'Index'];\n query[mainType + 'Name'] = payload[mainType + 'Name'];\n var condition = {\n mainType: mainType,\n query: query\n };\n subType && (condition.subType = subType); // subType may be '' by parseClassType;\n\n var excludeSeriesId = payload.excludeSeriesId;\n\n if (excludeSeriesId != null) {\n excludeSeriesId = zrUtil.createHashMap(modelUtil.normalizeToArray(excludeSeriesId));\n } // If dispatchAction before setOption, do nothing.\n\n\n ecModel && ecModel.eachComponent(condition, function (model) {\n if (!excludeSeriesId || excludeSeriesId.get(model.id) == null) {\n callView(ecIns[mainType === 'series' ? '_chartsMap' : '_componentsMap'][model.__viewId]);\n }\n }, ecIns);\n\n function callView(view) {\n view && view.__alive && view[method] && view[method](view.__model, ecModel, ecIns._api, payload);\n }\n}\n/**\n * Resize the chart\n * @param {Object} opts\n * @param {number} [opts.width] Can be 'auto' (the same as null/undefined)\n * @param {number} [opts.height] Can be 'auto' (the same as null/undefined)\n * @param {boolean} [opts.silent=false]\n */\n\n\nechartsProto.resize = function (opts) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n this._zr.resize(opts);\n\n var ecModel = this._model; // Resize loading effect\n\n this._loadingFX && this._loadingFX.resize();\n\n if (!ecModel) {\n return;\n }\n\n var optionChanged = ecModel.resetOption('media');\n var silent = opts && opts.silent;\n this[IN_MAIN_PROCESS] = true;\n optionChanged && prepare(this);\n updateMethods.update.call(this);\n this[IN_MAIN_PROCESS] = false;\n flushPendingActions.call(this, silent);\n triggerUpdatedEvent.call(this, silent);\n};\n\nfunction updateStreamModes(ecIns, ecModel) {\n var chartsMap = ecIns._chartsMap;\n var scheduler = ecIns._scheduler;\n ecModel.eachSeries(function (seriesModel) {\n scheduler.updateStreamModes(seriesModel, chartsMap[seriesModel.__viewId]);\n });\n}\n/**\n * Show loading effect\n * @param {string} [name='default']\n * @param {Object} [cfg]\n */\n\n\nechartsProto.showLoading = function (name, cfg) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n if (isObject(name)) {\n cfg = name;\n name = '';\n }\n\n name = name || 'default';\n this.hideLoading();\n\n if (!loadingEffects[name]) {\n return;\n }\n\n var el = loadingEffects[name](this._api, cfg);\n var zr = this._zr;\n this._loadingFX = el;\n zr.add(el);\n};\n/**\n * Hide loading effect\n */\n\n\nechartsProto.hideLoading = function () {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n this._loadingFX && this._zr.remove(this._loadingFX);\n this._loadingFX = null;\n};\n/**\n * @param {Object} eventObj\n * @return {Object}\n */\n\n\nechartsProto.makeActionFromEvent = function (eventObj) {\n var payload = zrUtil.extend({}, eventObj);\n payload.type = eventActionMap[eventObj.type];\n return payload;\n};\n/**\n * @pubilc\n * @param {Object} payload\n * @param {string} [payload.type] Action type\n * @param {Object|boolean} [opt] If pass boolean, means opt.silent\n * @param {boolean} [opt.silent=false] Whether trigger events.\n * @param {boolean} [opt.flush=undefined]\n * true: Flush immediately, and then pixel in canvas can be fetched\n * immediately. Caution: it might affect performance.\n * false: Not flush.\n * undefined: Auto decide whether perform flush.\n */\n\n\nechartsProto.dispatchAction = function (payload, opt) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n if (!isObject(opt)) {\n opt = {\n silent: !!opt\n };\n }\n\n if (!actions[payload.type]) {\n return;\n } // Avoid dispatch action before setOption. Especially in `connect`.\n\n\n if (!this._model) {\n return;\n } // May dispatchAction in rendering procedure\n\n\n if (this[IN_MAIN_PROCESS]) {\n this._pendingActions.push(payload);\n\n return;\n }\n\n doDispatchAction.call(this, payload, opt.silent);\n\n if (opt.flush) {\n this._zr.flush(true);\n } else if (opt.flush !== false && env.browser.weChat) {\n // In WeChat embeded browser, `requestAnimationFrame` and `setInterval`\n // hang when sliding page (on touch event), which cause that zr does not\n // refresh util user interaction finished, which is not expected.\n // But `dispatchAction` may be called too frequently when pan on touch\n // screen, which impacts performance if do not throttle them.\n this._throttledZrFlush();\n }\n\n flushPendingActions.call(this, opt.silent);\n triggerUpdatedEvent.call(this, opt.silent);\n};\n\nfunction doDispatchAction(payload, silent) {\n var payloadType = payload.type;\n var escapeConnect = payload.escapeConnect;\n var actionWrap = actions[payloadType];\n var actionInfo = actionWrap.actionInfo;\n var cptType = (actionInfo.update || 'update').split(':');\n var updateMethod = cptType.pop();\n cptType = cptType[0] != null && parseClassType(cptType[0]);\n this[IN_MAIN_PROCESS] = true;\n var payloads = [payload];\n var batched = false; // Batch action\n\n if (payload.batch) {\n batched = true;\n payloads = zrUtil.map(payload.batch, function (item) {\n item = zrUtil.defaults(zrUtil.extend({}, item), payload);\n item.batch = null;\n return item;\n });\n }\n\n var eventObjBatch = [];\n var eventObj;\n var isHighDown = payloadType === 'highlight' || payloadType === 'downplay';\n each(payloads, function (batchItem) {\n // Action can specify the event by return it.\n eventObj = actionWrap.action(batchItem, this._model, this._api); // Emit event outside\n\n eventObj = eventObj || zrUtil.extend({}, batchItem); // Convert type to eventType\n\n eventObj.type = actionInfo.event || eventObj.type;\n eventObjBatch.push(eventObj); // light update does not perform data process, layout and visual.\n\n if (isHighDown) {\n // method, payload, mainType, subType\n updateDirectly(this, updateMethod, batchItem, 'series');\n } else if (cptType) {\n updateDirectly(this, updateMethod, batchItem, cptType.main, cptType.sub);\n }\n }, this);\n\n if (updateMethod !== 'none' && !isHighDown && !cptType) {\n // Still dirty\n if (this[OPTION_UPDATED]) {\n // FIXME Pass payload ?\n prepare(this);\n updateMethods.update.call(this, payload);\n this[OPTION_UPDATED] = false;\n } else {\n updateMethods[updateMethod].call(this, payload);\n }\n } // Follow the rule of action batch\n\n\n if (batched) {\n eventObj = {\n type: actionInfo.event || payloadType,\n escapeConnect: escapeConnect,\n batch: eventObjBatch\n };\n } else {\n eventObj = eventObjBatch[0];\n }\n\n this[IN_MAIN_PROCESS] = false;\n !silent && this._messageCenter.trigger(eventObj.type, eventObj);\n}\n\nfunction flushPendingActions(silent) {\n var pendingActions = this._pendingActions;\n\n while (pendingActions.length) {\n var payload = pendingActions.shift();\n doDispatchAction.call(this, payload, silent);\n }\n}\n\nfunction triggerUpdatedEvent(silent) {\n !silent && this.trigger('updated');\n}\n/**\n * Event `rendered` is triggered when zr\n * rendered. It is useful for realtime\n * snapshot (reflect animation).\n *\n * Event `finished` is triggered when:\n * (1) zrender rendering finished.\n * (2) initial animation finished.\n * (3) progressive rendering finished.\n * (4) no pending action.\n * (5) no delayed setOption needs to be processed.\n */\n\n\nfunction bindRenderedEvent(zr, ecIns) {\n zr.on('rendered', function () {\n ecIns.trigger('rendered'); // The `finished` event should not be triggered repeatly,\n // so it should only be triggered when rendering indeed happend\n // in zrender. (Consider the case that dipatchAction is keep\n // triggering when mouse move).\n\n if ( // Although zr is dirty if initial animation is not finished\n // and this checking is called on frame, we also check\n // animation finished for robustness.\n zr.animation.isFinished() && !ecIns[OPTION_UPDATED] && !ecIns._scheduler.unfinished && !ecIns._pendingActions.length) {\n ecIns.trigger('finished');\n }\n });\n}\n/**\n * @param {Object} params\n * @param {number} params.seriesIndex\n * @param {Array|TypedArray} params.data\n */\n\n\nechartsProto.appendData = function (params) {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n var seriesIndex = params.seriesIndex;\n var ecModel = this.getModel();\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n seriesModel.appendData(params); // Note: `appendData` does not support that update extent of coordinate\n // system, util some scenario require that. In the expected usage of\n // `appendData`, the initial extent of coordinate system should better\n // be fixed by axis `min`/`max` setting or initial data, otherwise if\n // the extent changed while `appendData`, the location of the painted\n // graphic elements have to be changed, which make the usage of\n // `appendData` meaningless.\n\n this._scheduler.unfinished = true;\n};\n/**\n * Register event\n * @method\n */\n\n\nechartsProto.on = createRegisterEventWithLowercaseName('on', false);\nechartsProto.off = createRegisterEventWithLowercaseName('off', false);\nechartsProto.one = createRegisterEventWithLowercaseName('one', false);\n/**\n * Prepare view instances of charts and components\n * @param {module:echarts/model/Global} ecModel\n * @private\n */\n\nfunction prepareView(ecIns, type, ecModel, scheduler) {\n var isComponent = type === 'component';\n var viewList = isComponent ? ecIns._componentsViews : ecIns._chartsViews;\n var viewMap = isComponent ? ecIns._componentsMap : ecIns._chartsMap;\n var zr = ecIns._zr;\n var api = ecIns._api;\n\n for (var i = 0; i < viewList.length; i++) {\n viewList[i].__alive = false;\n }\n\n isComponent ? ecModel.eachComponent(function (componentType, model) {\n componentType !== 'series' && doPrepare(model);\n }) : ecModel.eachSeries(doPrepare);\n\n function doPrepare(model) {\n // Consider: id same and type changed.\n var viewId = '_ec_' + model.id + '_' + model.type;\n var view = viewMap[viewId];\n\n if (!view) {\n var classType = parseClassType(model.type);\n var Clazz = isComponent ? ComponentView.getClass(classType.main, classType.sub) : ChartView.getClass(classType.sub);\n view = new Clazz();\n view.init(ecModel, api);\n viewMap[viewId] = view;\n viewList.push(view);\n zr.add(view.group);\n }\n\n model.__viewId = view.__id = viewId;\n view.__alive = true;\n view.__model = model;\n view.group.__ecComponentInfo = {\n mainType: model.mainType,\n index: model.componentIndex\n };\n !isComponent && scheduler.prepareView(view, model, ecModel, api);\n }\n\n for (var i = 0; i < viewList.length;) {\n var view = viewList[i];\n\n if (!view.__alive) {\n !isComponent && view.renderTask.dispose();\n zr.remove(view.group);\n view.dispose(ecModel, api);\n viewList.splice(i, 1);\n delete viewMap[view.__id];\n view.__id = view.group.__ecComponentInfo = null;\n } else {\n i++;\n }\n }\n} // /**\n// * Encode visual infomation from data after data processing\n// *\n// * @param {module:echarts/model/Global} ecModel\n// * @param {object} layout\n// * @param {boolean} [layoutFilter] `true`: only layout,\n// * `false`: only not layout,\n// * `null`/`undefined`: all.\n// * @param {string} taskBaseTag\n// * @private\n// */\n// function startVisualEncoding(ecIns, ecModel, api, payload, layoutFilter) {\n// each(visualFuncs, function (visual, index) {\n// var isLayout = visual.isLayout;\n// if (layoutFilter == null\n// || (layoutFilter === false && !isLayout)\n// || (layoutFilter === true && isLayout)\n// ) {\n// visual.func(ecModel, api, payload);\n// }\n// });\n// }\n\n\nfunction clearColorPalette(ecModel) {\n ecModel.clearColorPalette();\n ecModel.eachSeries(function (seriesModel) {\n seriesModel.clearColorPalette();\n });\n}\n\nfunction render(ecIns, ecModel, api, payload) {\n renderComponents(ecIns, ecModel, api, payload);\n each(ecIns._chartsViews, function (chart) {\n chart.__alive = false;\n });\n renderSeries(ecIns, ecModel, api, payload); // Remove groups of unrendered charts\n\n each(ecIns._chartsViews, function (chart) {\n if (!chart.__alive) {\n chart.remove(ecModel, api);\n }\n });\n}\n\nfunction renderComponents(ecIns, ecModel, api, payload, dirtyList) {\n each(dirtyList || ecIns._componentsViews, function (componentView) {\n var componentModel = componentView.__model;\n componentView.render(componentModel, ecModel, api, payload);\n updateZ(componentModel, componentView);\n });\n}\n/**\n * Render each chart and component\n * @private\n */\n\n\nfunction renderSeries(ecIns, ecModel, api, payload, dirtyMap) {\n // Render all charts\n var scheduler = ecIns._scheduler;\n var unfinished;\n ecModel.eachSeries(function (seriesModel) {\n var chartView = ecIns._chartsMap[seriesModel.__viewId];\n chartView.__alive = true;\n var renderTask = chartView.renderTask;\n scheduler.updatePayload(renderTask, payload);\n\n if (dirtyMap && dirtyMap.get(seriesModel.uid)) {\n renderTask.dirty();\n }\n\n unfinished |= renderTask.perform(scheduler.getPerformArgs(renderTask));\n chartView.group.silent = !!seriesModel.get('silent');\n updateZ(seriesModel, chartView);\n updateBlend(seriesModel, chartView);\n });\n scheduler.unfinished |= unfinished; // If use hover layer\n\n updateHoverLayerStatus(ecIns, ecModel); // Add aria\n\n aria(ecIns._zr.dom, ecModel);\n}\n\nfunction performPostUpdateFuncs(ecModel, api) {\n each(postUpdateFuncs, function (func) {\n func(ecModel, api);\n });\n}\n\nvar MOUSE_EVENT_NAMES = ['click', 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'mouseup', 'globalout', 'contextmenu'];\n/**\n * @private\n */\n\nechartsProto._initEvents = function () {\n each(MOUSE_EVENT_NAMES, function (eveName) {\n var handler = function (e) {\n var ecModel = this.getModel();\n var el = e.target;\n var params;\n var isGlobalOut = eveName === 'globalout'; // no e.target when 'globalout'.\n\n if (isGlobalOut) {\n params = {};\n } else if (el && el.dataIndex != null) {\n var dataModel = el.dataModel || ecModel.getSeriesByIndex(el.seriesIndex);\n params = dataModel && dataModel.getDataParams(el.dataIndex, el.dataType, el) || {};\n } // If element has custom eventData of components\n else if (el && el.eventData) {\n params = zrUtil.extend({}, el.eventData);\n } // Contract: if params prepared in mouse event,\n // these properties must be specified:\n // {\n // componentType: string (component main type)\n // componentIndex: number\n // }\n // Otherwise event query can not work.\n\n\n if (params) {\n var componentType = params.componentType;\n var componentIndex = params.componentIndex; // Special handling for historic reason: when trigger by\n // markLine/markPoint/markArea, the componentType is\n // 'markLine'/'markPoint'/'markArea', but we should better\n // enable them to be queried by seriesIndex, since their\n // option is set in each series.\n\n if (componentType === 'markLine' || componentType === 'markPoint' || componentType === 'markArea') {\n componentType = 'series';\n componentIndex = params.seriesIndex;\n }\n\n var model = componentType && componentIndex != null && ecModel.getComponent(componentType, componentIndex);\n var view = model && this[model.mainType === 'series' ? '_chartsMap' : '_componentsMap'][model.__viewId];\n params.event = e;\n params.type = eveName;\n this._ecEventProcessor.eventInfo = {\n targetEl: el,\n packedEvent: params,\n model: model,\n view: view\n };\n this.trigger(eveName, params);\n }\n }; // Consider that some component (like tooltip, brush, ...)\n // register zr event handler, but user event handler might\n // do anything, such as call `setOption` or `dispatchAction`,\n // which probably update any of the content and probably\n // cause problem if it is called previous other inner handlers.\n\n\n handler.zrEventfulCallAtLast = true;\n\n this._zr.on(eveName, handler, this);\n }, this);\n each(eventActionMap, function (actionType, eventType) {\n this._messageCenter.on(eventType, function (event) {\n this.trigger(eventType, event);\n }, this);\n }, this);\n};\n/**\n * @return {boolean}\n */\n\n\nechartsProto.isDisposed = function () {\n return this._disposed;\n};\n/**\n * Clear\n */\n\n\nechartsProto.clear = function () {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n this.setOption({\n series: []\n }, true);\n};\n/**\n * Dispose instance\n */\n\n\nechartsProto.dispose = function () {\n if (this._disposed) {\n disposedWarning(this.id);\n return;\n }\n\n this._disposed = true;\n modelUtil.setAttribute(this.getDom(), DOM_ATTRIBUTE_KEY, '');\n var api = this._api;\n var ecModel = this._model;\n each(this._componentsViews, function (component) {\n component.dispose(ecModel, api);\n });\n each(this._chartsViews, function (chart) {\n chart.dispose(ecModel, api);\n }); // Dispose after all views disposed\n\n this._zr.dispose();\n\n delete instances[this.id];\n};\n\nzrUtil.mixin(ECharts, Eventful);\n\nfunction disposedWarning(id) {}\n\nfunction updateHoverLayerStatus(ecIns, ecModel) {\n var zr = ecIns._zr;\n var storage = zr.storage;\n var elCount = 0;\n storage.traverse(function (el) {\n elCount++;\n });\n\n if (elCount > ecModel.get('hoverLayerThreshold') && !env.node) {\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.preventUsingHoverLayer) {\n return;\n }\n\n var chartView = ecIns._chartsMap[seriesModel.__viewId];\n\n if (chartView.__alive) {\n chartView.group.traverse(function (el) {\n // Don't switch back.\n el.useHoverLayer = true;\n });\n }\n });\n }\n}\n/**\n * Update chart progressive and blend.\n * @param {module:echarts/model/Series|module:echarts/model/Component} model\n * @param {module:echarts/view/Component|module:echarts/view/Chart} view\n */\n\n\nfunction updateBlend(seriesModel, chartView) {\n var blendMode = seriesModel.get('blendMode') || null;\n chartView.group.traverse(function (el) {\n // FIXME marker and other components\n if (!el.isGroup) {\n // Only set if blendMode is changed. In case element is incremental and don't wan't to rerender.\n if (el.style.blend !== blendMode) {\n el.setStyle('blend', blendMode);\n }\n }\n\n if (el.eachPendingDisplayable) {\n el.eachPendingDisplayable(function (displayable) {\n displayable.setStyle('blend', blendMode);\n });\n }\n });\n}\n/**\n * @param {module:echarts/model/Series|module:echarts/model/Component} model\n * @param {module:echarts/view/Component|module:echarts/view/Chart} view\n */\n\n\nfunction updateZ(model, view) {\n var z = model.get('z');\n var zlevel = model.get('zlevel'); // Set z and zlevel\n\n view.group.traverse(function (el) {\n if (el.type !== 'group') {\n z != null && (el.z = z);\n zlevel != null && (el.zlevel = zlevel);\n }\n });\n}\n\nfunction createExtensionAPI(ecInstance) {\n var coordSysMgr = ecInstance._coordSysMgr;\n return zrUtil.extend(new ExtensionAPI(ecInstance), {\n // Inject methods\n getCoordinateSystems: zrUtil.bind(coordSysMgr.getCoordinateSystems, coordSysMgr),\n getComponentByElement: function (el) {\n while (el) {\n var modelInfo = el.__ecComponentInfo;\n\n if (modelInfo != null) {\n return ecInstance._model.getComponent(modelInfo.mainType, modelInfo.index);\n }\n\n el = el.parent;\n }\n }\n });\n}\n/**\n * @class\n * Usage of query:\n * `chart.on('click', query, handler);`\n * The `query` can be:\n * + The component type query string, only `mainType` or `mainType.subType`,\n * like: 'xAxis', 'series', 'xAxis.category' or 'series.line'.\n * + The component query object, like:\n * `{seriesIndex: 2}`, `{seriesName: 'xx'}`, `{seriesId: 'some'}`,\n * `{xAxisIndex: 2}`, `{xAxisName: 'xx'}`, `{xAxisId: 'some'}`.\n * + The data query object, like:\n * `{dataIndex: 123}`, `{dataType: 'link'}`, `{name: 'some'}`.\n * + The other query object (cmponent customized query), like:\n * `{element: 'some'}` (only available in custom series).\n *\n * Caveat: If a prop in the `query` object is `null/undefined`, it is the\n * same as there is no such prop in the `query` object.\n */\n\n\nfunction EventProcessor() {\n // These info required: targetEl, packedEvent, model, view\n this.eventInfo;\n}\n\nEventProcessor.prototype = {\n constructor: EventProcessor,\n normalizeQuery: function (query) {\n var cptQuery = {};\n var dataQuery = {};\n var otherQuery = {}; // `query` is `mainType` or `mainType.subType` of component.\n\n if (zrUtil.isString(query)) {\n var condCptType = parseClassType(query); // `.main` and `.sub` may be ''.\n\n cptQuery.mainType = condCptType.main || null;\n cptQuery.subType = condCptType.sub || null;\n } // `query` is an object, convert to {mainType, index, name, id}.\n else {\n // `xxxIndex`, `xxxName`, `xxxId`, `name`, `dataIndex`, `dataType` is reserved,\n // can not be used in `compomentModel.filterForExposedEvent`.\n var suffixes = ['Index', 'Name', 'Id'];\n var dataKeys = {\n name: 1,\n dataIndex: 1,\n dataType: 1\n };\n zrUtil.each(query, function (val, key) {\n var reserved = false;\n\n for (var i = 0; i < suffixes.length; i++) {\n var propSuffix = suffixes[i];\n var suffixPos = key.lastIndexOf(propSuffix);\n\n if (suffixPos > 0 && suffixPos === key.length - propSuffix.length) {\n var mainType = key.slice(0, suffixPos); // Consider `dataIndex`.\n\n if (mainType !== 'data') {\n cptQuery.mainType = mainType;\n cptQuery[propSuffix.toLowerCase()] = val;\n reserved = true;\n }\n }\n }\n\n if (dataKeys.hasOwnProperty(key)) {\n dataQuery[key] = val;\n reserved = true;\n }\n\n if (!reserved) {\n otherQuery[key] = val;\n }\n });\n }\n\n return {\n cptQuery: cptQuery,\n dataQuery: dataQuery,\n otherQuery: otherQuery\n };\n },\n filter: function (eventType, query, args) {\n // They should be assigned before each trigger call.\n var eventInfo = this.eventInfo;\n\n if (!eventInfo) {\n return true;\n }\n\n var targetEl = eventInfo.targetEl;\n var packedEvent = eventInfo.packedEvent;\n var model = eventInfo.model;\n var view = eventInfo.view; // For event like 'globalout'.\n\n if (!model || !view) {\n return true;\n }\n\n var cptQuery = query.cptQuery;\n var dataQuery = query.dataQuery;\n return check(cptQuery, model, 'mainType') && check(cptQuery, model, 'subType') && check(cptQuery, model, 'index', 'componentIndex') && check(cptQuery, model, 'name') && check(cptQuery, model, 'id') && check(dataQuery, packedEvent, 'name') && check(dataQuery, packedEvent, 'dataIndex') && check(dataQuery, packedEvent, 'dataType') && (!view.filterForExposedEvent || view.filterForExposedEvent(eventType, query.otherQuery, targetEl, packedEvent));\n\n function check(query, host, prop, propOnHost) {\n return query[prop] == null || host[propOnHost || prop] === query[prop];\n }\n },\n afterTrigger: function () {\n // Make sure the eventInfo wont be used in next trigger.\n this.eventInfo = null;\n }\n};\n/**\n * @type {Object} key: actionType.\n * @inner\n */\n\nvar actions = {};\n/**\n * Map eventType to actionType\n * @type {Object}\n */\n\nvar eventActionMap = {};\n/**\n * Data processor functions of each stage\n * @type {Array.>}\n * @inner\n */\n\nvar dataProcessorFuncs = [];\n/**\n * @type {Array.}\n * @inner\n */\n\nvar optionPreprocessorFuncs = [];\n/**\n * @type {Array.}\n * @inner\n */\n\nvar postUpdateFuncs = [];\n/**\n * Visual encoding functions of each stage\n * @type {Array.>}\n */\n\nvar visualFuncs = [];\n/**\n * Theme storage\n * @type {Object.}\n */\n\nvar themeStorage = {};\n/**\n * Loading effects\n */\n\nvar loadingEffects = {};\nvar instances = {};\nvar connectedGroups = {};\nvar idBase = new Date() - 0;\nvar groupIdBase = new Date() - 0;\nvar DOM_ATTRIBUTE_KEY = '_echarts_instance_';\n\nfunction enableConnect(chart) {\n var STATUS_PENDING = 0;\n var STATUS_UPDATING = 1;\n var STATUS_UPDATED = 2;\n var STATUS_KEY = '__connectUpdateStatus';\n\n function updateConnectedChartsStatus(charts, status) {\n for (var i = 0; i < charts.length; i++) {\n var otherChart = charts[i];\n otherChart[STATUS_KEY] = status;\n }\n }\n\n each(eventActionMap, function (actionType, eventType) {\n chart._messageCenter.on(eventType, function (event) {\n if (connectedGroups[chart.group] && chart[STATUS_KEY] !== STATUS_PENDING) {\n if (event && event.escapeConnect) {\n return;\n }\n\n var action = chart.makeActionFromEvent(event);\n var otherCharts = [];\n each(instances, function (otherChart) {\n if (otherChart !== chart && otherChart.group === chart.group) {\n otherCharts.push(otherChart);\n }\n });\n updateConnectedChartsStatus(otherCharts, STATUS_PENDING);\n each(otherCharts, function (otherChart) {\n if (otherChart[STATUS_KEY] !== STATUS_UPDATING) {\n otherChart.dispatchAction(action);\n }\n });\n updateConnectedChartsStatus(otherCharts, STATUS_UPDATED);\n }\n });\n });\n}\n/**\n * @param {HTMLElement} dom\n * @param {Object} [theme]\n * @param {Object} opts\n * @param {number} [opts.devicePixelRatio] Use window.devicePixelRatio by default\n * @param {string} [opts.renderer] Can choose 'canvas' or 'svg' to render the chart.\n * @param {number} [opts.width] Use clientWidth of the input `dom` by default.\n * Can be 'auto' (the same as null/undefined)\n * @param {number} [opts.height] Use clientHeight of the input `dom` by default.\n * Can be 'auto' (the same as null/undefined)\n */\n\n\nfunction init(dom, theme, opts) {\n var existInstance = getInstanceByDom(dom);\n\n if (existInstance) {\n return existInstance;\n }\n\n var chart = new ECharts(dom, theme, opts);\n chart.id = 'ec_' + idBase++;\n instances[chart.id] = chart;\n modelUtil.setAttribute(dom, DOM_ATTRIBUTE_KEY, chart.id);\n enableConnect(chart);\n return chart;\n}\n/**\n * @return {string|Array.} groupId\n */\n\n\nfunction connect(groupId) {\n // Is array of charts\n if (zrUtil.isArray(groupId)) {\n var charts = groupId;\n groupId = null; // If any chart has group\n\n each(charts, function (chart) {\n if (chart.group != null) {\n groupId = chart.group;\n }\n });\n groupId = groupId || 'g_' + groupIdBase++;\n each(charts, function (chart) {\n chart.group = groupId;\n });\n }\n\n connectedGroups[groupId] = true;\n return groupId;\n}\n/**\n * @DEPRECATED\n * @return {string} groupId\n */\n\n\nfunction disConnect(groupId) {\n connectedGroups[groupId] = false;\n}\n/**\n * @return {string} groupId\n */\n\n\nvar disconnect = disConnect;\n/**\n * Dispose a chart instance\n * @param {module:echarts~ECharts|HTMLDomElement|string} chart\n */\n\nfunction dispose(chart) {\n if (typeof chart === 'string') {\n chart = instances[chart];\n } else if (!(chart instanceof ECharts)) {\n // Try to treat as dom\n chart = getInstanceByDom(chart);\n }\n\n if (chart instanceof ECharts && !chart.isDisposed()) {\n chart.dispose();\n }\n}\n/**\n * @param {HTMLElement} dom\n * @return {echarts~ECharts}\n */\n\n\nfunction getInstanceByDom(dom) {\n return instances[modelUtil.getAttribute(dom, DOM_ATTRIBUTE_KEY)];\n}\n/**\n * @param {string} key\n * @return {echarts~ECharts}\n */\n\n\nfunction getInstanceById(key) {\n return instances[key];\n}\n/**\n * Register theme\n */\n\n\nfunction registerTheme(name, theme) {\n themeStorage[name] = theme;\n}\n/**\n * Register option preprocessor\n * @param {Function} preprocessorFunc\n */\n\n\nfunction registerPreprocessor(preprocessorFunc) {\n optionPreprocessorFuncs.push(preprocessorFunc);\n}\n/**\n * @param {number} [priority=1000]\n * @param {Object|Function} processor\n */\n\n\nfunction registerProcessor(priority, processor) {\n normalizeRegister(dataProcessorFuncs, priority, processor, PRIORITY_PROCESSOR_FILTER);\n}\n/**\n * Register postUpdater\n * @param {Function} postUpdateFunc\n */\n\n\nfunction registerPostUpdate(postUpdateFunc) {\n postUpdateFuncs.push(postUpdateFunc);\n}\n/**\n * Usage:\n * registerAction('someAction', 'someEvent', function () { ... });\n * registerAction('someAction', function () { ... });\n * registerAction(\n * {type: 'someAction', event: 'someEvent', update: 'updateView'},\n * function () { ... }\n * );\n *\n * @param {(string|Object)} actionInfo\n * @param {string} actionInfo.type\n * @param {string} [actionInfo.event]\n * @param {string} [actionInfo.update]\n * @param {string} [eventName]\n * @param {Function} action\n */\n\n\nfunction registerAction(actionInfo, eventName, action) {\n if (typeof eventName === 'function') {\n action = eventName;\n eventName = '';\n }\n\n var actionType = isObject(actionInfo) ? actionInfo.type : [actionInfo, actionInfo = {\n event: eventName\n }][0]; // Event name is all lowercase\n\n actionInfo.event = (actionInfo.event || actionType).toLowerCase();\n eventName = actionInfo.event; // Validate action type and event name.\n\n assert(ACTION_REG.test(actionType) && ACTION_REG.test(eventName));\n\n if (!actions[actionType]) {\n actions[actionType] = {\n action: action,\n actionInfo: actionInfo\n };\n }\n\n eventActionMap[eventName] = actionType;\n}\n/**\n * @param {string} type\n * @param {*} CoordinateSystem\n */\n\n\nfunction registerCoordinateSystem(type, CoordinateSystem) {\n CoordinateSystemManager.register(type, CoordinateSystem);\n}\n/**\n * Get dimensions of specified coordinate system.\n * @param {string} type\n * @return {Array.}\n */\n\n\nfunction getCoordinateSystemDimensions(type) {\n var coordSysCreator = CoordinateSystemManager.get(type);\n\n if (coordSysCreator) {\n return coordSysCreator.getDimensionsInfo ? coordSysCreator.getDimensionsInfo() : coordSysCreator.dimensions.slice();\n }\n}\n/**\n * Layout is a special stage of visual encoding\n * Most visual encoding like color are common for different chart\n * But each chart has it's own layout algorithm\n *\n * @param {number} [priority=1000]\n * @param {Function} layoutTask\n */\n\n\nfunction registerLayout(priority, layoutTask) {\n normalizeRegister(visualFuncs, priority, layoutTask, PRIORITY_VISUAL_LAYOUT, 'layout');\n}\n/**\n * @param {number} [priority=3000]\n * @param {module:echarts/stream/Task} visualTask\n */\n\n\nfunction registerVisual(priority, visualTask) {\n normalizeRegister(visualFuncs, priority, visualTask, PRIORITY_VISUAL_CHART, 'visual');\n}\n/**\n * @param {Object|Function} fn: {seriesType, createOnAllSeries, performRawSeries, reset}\n */\n\n\nfunction normalizeRegister(targetList, priority, fn, defaultPriority, visualType) {\n if (isFunction(priority) || isObject(priority)) {\n fn = priority;\n priority = defaultPriority;\n }\n\n var stageHandler = Scheduler.wrapStageHandler(fn, visualType);\n stageHandler.__prio = priority;\n stageHandler.__raw = fn;\n targetList.push(stageHandler);\n return stageHandler;\n}\n/**\n * @param {string} name\n */\n\n\nfunction registerLoading(name, loadingFx) {\n loadingEffects[name] = loadingFx;\n}\n/**\n * @param {Object} opts\n * @param {string} [superClass]\n */\n\n\nfunction extendComponentModel(opts\n/*, superClass*/\n) {\n // var Clazz = ComponentModel;\n // if (superClass) {\n // var classType = parseClassType(superClass);\n // Clazz = ComponentModel.getClass(classType.main, classType.sub, true);\n // }\n return ComponentModel.extend(opts);\n}\n/**\n * @param {Object} opts\n * @param {string} [superClass]\n */\n\n\nfunction extendComponentView(opts\n/*, superClass*/\n) {\n // var Clazz = ComponentView;\n // if (superClass) {\n // var classType = parseClassType(superClass);\n // Clazz = ComponentView.getClass(classType.main, classType.sub, true);\n // }\n return ComponentView.extend(opts);\n}\n/**\n * @param {Object} opts\n * @param {string} [superClass]\n */\n\n\nfunction extendSeriesModel(opts\n/*, superClass*/\n) {\n // var Clazz = SeriesModel;\n // if (superClass) {\n // superClass = 'series.' + superClass.replace('series.', '');\n // var classType = parseClassType(superClass);\n // Clazz = ComponentModel.getClass(classType.main, classType.sub, true);\n // }\n return SeriesModel.extend(opts);\n}\n/**\n * @param {Object} opts\n * @param {string} [superClass]\n */\n\n\nfunction extendChartView(opts\n/*, superClass*/\n) {\n // var Clazz = ChartView;\n // if (superClass) {\n // superClass = superClass.replace('series.', '');\n // var classType = parseClassType(superClass);\n // Clazz = ChartView.getClass(classType.main, true);\n // }\n return ChartView.extend(opts);\n}\n/**\n * ZRender need a canvas context to do measureText.\n * But in node environment canvas may be created by node-canvas.\n * So we need to specify how to create a canvas instead of using document.createElement('canvas')\n *\n * Be careful of using it in the browser.\n *\n * @param {Function} creator\n * @example\n * var Canvas = require('canvas');\n * var echarts = require('echarts');\n * echarts.setCanvasCreator(function () {\n * // Small size is enough.\n * return new Canvas(32, 32);\n * });\n */\n\n\nfunction setCanvasCreator(creator) {\n zrUtil.$override('createCanvas', creator);\n}\n/**\n * @param {string} mapName\n * @param {Array.|Object|string} geoJson\n * @param {Object} [specialAreas]\n *\n * @example GeoJSON\n * $.get('USA.json', function (geoJson) {\n * echarts.registerMap('USA', geoJson);\n * // Or\n * echarts.registerMap('USA', {\n * geoJson: geoJson,\n * specialAreas: {}\n * })\n * });\n *\n * $.get('airport.svg', function (svg) {\n * echarts.registerMap('airport', {\n * svg: svg\n * }\n * });\n *\n * echarts.registerMap('eu', [\n * {svg: eu-topographic.svg},\n * {geoJSON: eu.json}\n * ])\n */\n\n\nfunction registerMap(mapName, geoJson, specialAreas) {\n mapDataStorage.registerMap(mapName, geoJson, specialAreas);\n}\n/**\n * @param {string} mapName\n * @return {Object}\n */\n\n\nfunction getMap(mapName) {\n // For backward compatibility, only return the first one.\n var records = mapDataStorage.retrieveMap(mapName);\n return records && records[0] && {\n geoJson: records[0].geoJSON,\n specialAreas: records[0].specialAreas\n };\n}\n\nregisterVisual(PRIORITY_VISUAL_GLOBAL, seriesColor);\nregisterPreprocessor(backwardCompat);\nregisterProcessor(PRIORITY_PROCESSOR_DATASTACK, dataStack);\nregisterLoading('default', loadingDefault); // Default actions\n\nregisterAction({\n type: 'highlight',\n event: 'highlight',\n update: 'highlight'\n}, zrUtil.noop);\nregisterAction({\n type: 'downplay',\n event: 'downplay',\n update: 'downplay'\n}, zrUtil.noop); // Default theme\n\nregisterTheme('light', lightTheme);\nregisterTheme('dark', darkTheme); // For backward compatibility, where the namespace `dataTool` will\n// be mounted on `echarts` is the extension `dataTool` is imported.\n\nvar dataTool = {};\nexports.version = version;\nexports.dependencies = dependencies;\nexports.PRIORITY = PRIORITY;\nexports.init = init;\nexports.connect = connect;\nexports.disConnect = disConnect;\nexports.disconnect = disconnect;\nexports.dispose = dispose;\nexports.getInstanceByDom = getInstanceByDom;\nexports.getInstanceById = getInstanceById;\nexports.registerTheme = registerTheme;\nexports.registerPreprocessor = registerPreprocessor;\nexports.registerProcessor = registerProcessor;\nexports.registerPostUpdate = registerPostUpdate;\nexports.registerAction = registerAction;\nexports.registerCoordinateSystem = registerCoordinateSystem;\nexports.getCoordinateSystemDimensions = getCoordinateSystemDimensions;\nexports.registerLayout = registerLayout;\nexports.registerVisual = registerVisual;\nexports.registerLoading = registerLoading;\nexports.extendComponentModel = extendComponentModel;\nexports.extendComponentView = extendComponentView;\nexports.extendSeriesModel = extendSeriesModel;\nexports.extendChartView = extendChartView;\nexports.setCanvasCreator = setCanvasCreator;\nexports.registerMap = registerMap;\nexports.getMap = getMap;\nexports.dataTool = dataTool;\nvar ___ec_export = require(\"./export\");\n(function () {\n for (var key in ___ec_export) {\n if (___ec_export.hasOwnProperty(key)) {\n exports[key] = ___ec_export[key];\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 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.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 echarts = require(\"../../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar TooltipContent = require(\"./TooltipContent\");\n\nvar TooltipRichContent = require(\"./TooltipRichContent\");\n\nvar formatUtil = require(\"../../util/format\");\n\nvar numberUtil = require(\"../../util/number\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar findPointFromSeries = require(\"../axisPointer/findPointFromSeries\");\n\nvar layoutUtil = require(\"../../util/layout\");\n\nvar Model = require(\"../../model/Model\");\n\nvar globalListener = require(\"../axisPointer/globalListener\");\n\nvar axisHelper = require(\"../../coord/axisHelper\");\n\nvar axisPointerViewHelper = require(\"../axisPointer/viewHelper\");\n\nvar _model = require(\"../../util/model\");\n\nvar getTooltipRenderMode = _model.getTooltipRenderMode;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 parsePercent = numberUtil.parsePercent;\nvar proxyRect = new graphic.Rect({\n shape: {\n x: -1,\n y: -1,\n width: 2,\n height: 2\n }\n});\n\nvar _default = echarts.extendComponentView({\n type: 'tooltip',\n init: function (ecModel, api) {\n if (env.node) {\n return;\n }\n\n var tooltipModel = ecModel.getComponent('tooltip');\n var renderMode = tooltipModel.get('renderMode');\n this._renderMode = getTooltipRenderMode(renderMode);\n var tooltipContent;\n\n if (this._renderMode === 'html') {\n tooltipContent = new TooltipContent(api.getDom(), api, {\n appendToBody: tooltipModel.get('appendToBody', true)\n });\n this._newLine = '
';\n } else {\n tooltipContent = new TooltipRichContent(api);\n this._newLine = '\\n';\n }\n\n this._tooltipContent = tooltipContent;\n },\n render: function (tooltipModel, ecModel, api) {\n if (env.node) {\n return;\n } // Reset\n\n\n this.group.removeAll();\n /**\n * @private\n * @type {module:echarts/component/tooltip/TooltipModel}\n */\n\n this._tooltipModel = tooltipModel;\n /**\n * @private\n * @type {module:echarts/model/Global}\n */\n\n this._ecModel = ecModel;\n /**\n * @private\n * @type {module:echarts/ExtensionAPI}\n */\n\n this._api = api;\n /**\n * Should be cleaned when render.\n * @private\n * @type {Array.>}\n */\n\n this._lastDataByCoordSys = null;\n /**\n * @private\n * @type {boolean}\n */\n\n this._alwaysShowContent = tooltipModel.get('alwaysShowContent');\n var tooltipContent = this._tooltipContent;\n tooltipContent.update(tooltipModel);\n tooltipContent.setEnterable(tooltipModel.get('enterable'));\n\n this._initGlobalListener();\n\n this._keepShow();\n },\n _initGlobalListener: function () {\n var tooltipModel = this._tooltipModel;\n var triggerOn = tooltipModel.get('triggerOn');\n globalListener.register('itemTooltip', this._api, bind(function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none') {\n if (triggerOn.indexOf(currTrigger) >= 0) {\n this._tryShow(e, dispatchAction);\n } else if (currTrigger === 'leave') {\n this._hide(dispatchAction);\n }\n }\n }, this));\n },\n _keepShow: function () {\n var tooltipModel = this._tooltipModel;\n var ecModel = this._ecModel;\n var api = this._api; // Try to keep the tooltip show when refreshing\n\n if (this._lastX != null && this._lastY != null // When user is willing to control tooltip totally using API,\n // self.manuallyShowTip({x, y}) might cause tooltip hide,\n // which is not expected.\n && tooltipModel.get('triggerOn') !== 'none') {\n var self = this;\n clearTimeout(this._refreshUpdateTimeout);\n this._refreshUpdateTimeout = setTimeout(function () {\n // Show tip next tick after other charts are rendered\n // In case highlight action has wrong result\n // FIXME\n !api.isDisposed() && self.manuallyShowTip(tooltipModel, ecModel, api, {\n x: self._lastX,\n y: self._lastY\n });\n });\n }\n },\n\n /**\n * Show tip manually by\n * dispatchAction({\n * type: 'showTip',\n * x: 10,\n * y: 10\n * });\n * Or\n * dispatchAction({\n * type: 'showTip',\n * seriesIndex: 0,\n * dataIndex or dataIndexInside or name\n * });\n *\n * TODO Batch\n */\n manuallyShowTip: function (tooltipModel, ecModel, api, payload) {\n if (payload.from === this.uid || env.node) {\n return;\n }\n\n var dispatchAction = makeDispatchAction(payload, api); // Reset ticket\n\n this._ticket = ''; // When triggered from axisPointer.\n\n var dataByCoordSys = payload.dataByCoordSys;\n\n if (payload.tooltip && payload.x != null && payload.y != null) {\n var el = proxyRect;\n el.position = [payload.x, payload.y];\n el.update();\n el.tooltip = payload.tooltip; // Manually show tooltip while view is not using zrender elements.\n\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n target: el\n }, dispatchAction);\n } else if (dataByCoordSys) {\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n dataByCoordSys: payload.dataByCoordSys,\n tooltipOption: payload.tooltipOption\n }, dispatchAction);\n } else if (payload.seriesIndex != null) {\n if (this._manuallyAxisShowTip(tooltipModel, ecModel, api, payload)) {\n return;\n }\n\n var pointInfo = findPointFromSeries(payload, ecModel);\n var cx = pointInfo.point[0];\n var cy = pointInfo.point[1];\n\n if (cx != null && cy != null) {\n this._tryShow({\n offsetX: cx,\n offsetY: cy,\n position: payload.position,\n target: pointInfo.el\n }, dispatchAction);\n }\n } else if (payload.x != null && payload.y != null) {\n // FIXME\n // should wrap dispatchAction like `axisPointer/globalListener` ?\n api.dispatchAction({\n type: 'updateAxisPointer',\n x: payload.x,\n y: payload.y\n });\n\n this._tryShow({\n offsetX: payload.x,\n offsetY: payload.y,\n position: payload.position,\n target: api.getZr().findHover(payload.x, payload.y).target\n }, dispatchAction);\n }\n },\n manuallyHideTip: function (tooltipModel, ecModel, api, payload) {\n var tooltipContent = this._tooltipContent;\n\n if (!this._alwaysShowContent && this._tooltipModel) {\n tooltipContent.hideLater(this._tooltipModel.get('hideDelay'));\n }\n\n this._lastX = this._lastY = null;\n\n if (payload.from !== this.uid) {\n this._hide(makeDispatchAction(payload, api));\n }\n },\n // Be compatible with previous design, that is, when tooltip.type is 'axis' and\n // dispatchAction 'showTip' with seriesIndex and dataIndex will trigger axis pointer\n // and tooltip.\n _manuallyAxisShowTip: function (tooltipModel, ecModel, api, payload) {\n var seriesIndex = payload.seriesIndex;\n var dataIndex = payload.dataIndex;\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo;\n\n if (seriesIndex == null || dataIndex == null || coordSysAxesInfo == null) {\n return;\n }\n\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex);\n\n if (!seriesModel) {\n return;\n }\n\n var data = seriesModel.getData();\n var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), seriesModel, (seriesModel.coordinateSystem || {}).model, tooltipModel]);\n\n if (tooltipModel.get('trigger') !== 'axis') {\n return;\n }\n\n api.dispatchAction({\n type: 'updateAxisPointer',\n seriesIndex: seriesIndex,\n dataIndex: dataIndex,\n position: payload.position\n });\n return true;\n },\n _tryShow: function (e, dispatchAction) {\n var el = e.target;\n var tooltipModel = this._tooltipModel;\n\n if (!tooltipModel) {\n return;\n } // Save mouse x, mouse y. So we can try to keep showing the tip if chart is refreshed\n\n\n this._lastX = e.offsetX;\n this._lastY = e.offsetY;\n var dataByCoordSys = e.dataByCoordSys;\n\n if (dataByCoordSys && dataByCoordSys.length) {\n this._showAxisTooltip(dataByCoordSys, e);\n } // Always show item tooltip if mouse is on the element with dataIndex\n else if (el && el.dataIndex != null) {\n this._lastDataByCoordSys = null;\n\n this._showSeriesItemTooltip(e, el, dispatchAction);\n } // Tooltip provided directly. Like legend.\n else if (el && el.tooltip) {\n this._lastDataByCoordSys = null;\n\n this._showComponentItemTooltip(e, el, dispatchAction);\n } else {\n this._lastDataByCoordSys = null;\n\n this._hide(dispatchAction);\n }\n },\n _showOrMove: function (tooltipModel, cb) {\n // showDelay is used in this case: tooltip.enterable is set\n // as true. User intent to move mouse into tooltip and click\n // something. `showDelay` makes it easier to enter the content\n // but tooltip do not move immediately.\n var delay = tooltipModel.get('showDelay');\n cb = zrUtil.bind(cb, this);\n clearTimeout(this._showTimout);\n delay > 0 ? this._showTimout = setTimeout(cb, delay) : cb();\n },\n _showAxisTooltip: function (dataByCoordSys, e) {\n var ecModel = this._ecModel;\n var globalTooltipModel = this._tooltipModel;\n var point = [e.offsetX, e.offsetY];\n var singleDefaultHTML = [];\n var singleParamsList = [];\n var singleTooltipModel = buildTooltipModel([e.tooltipOption, globalTooltipModel]);\n var renderMode = this._renderMode;\n var newLine = this._newLine;\n var markers = {};\n each(dataByCoordSys, function (itemCoordSys) {\n // var coordParamList = [];\n // var coordDefaultHTML = [];\n // var coordTooltipModel = buildTooltipModel([\n // e.tooltipOption,\n // itemCoordSys.tooltipOption,\n // ecModel.getComponent(itemCoordSys.coordSysMainType, itemCoordSys.coordSysIndex),\n // globalTooltipModel\n // ]);\n // var displayMode = coordTooltipModel.get('displayMode');\n // var paramsList = displayMode === 'single' ? singleParamsList : [];\n each(itemCoordSys.dataByAxis, function (item) {\n var axisModel = ecModel.getComponent(item.axisDim + 'Axis', item.axisIndex);\n var axisValue = item.value;\n var seriesDefaultHTML = [];\n\n if (!axisModel || axisValue == null) {\n return;\n }\n\n var valueLabel = axisPointerViewHelper.getValueLabel(axisValue, axisModel.axis, ecModel, item.seriesDataIndices, item.valueLabelOpt);\n zrUtil.each(item.seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var dataParams = series && series.getDataParams(dataIndex);\n dataParams.axisDim = item.axisDim;\n dataParams.axisIndex = item.axisIndex;\n dataParams.axisType = item.axisType;\n dataParams.axisId = item.axisId;\n dataParams.axisValue = axisHelper.getAxisRawValue(axisModel.axis, axisValue);\n dataParams.axisValueLabel = valueLabel;\n\n if (dataParams) {\n singleParamsList.push(dataParams);\n var seriesTooltip = series.formatTooltip(dataIndex, true, null, renderMode);\n var html;\n\n if (zrUtil.isObject(seriesTooltip)) {\n html = seriesTooltip.html;\n var newMarkers = seriesTooltip.markers;\n zrUtil.merge(markers, newMarkers);\n } else {\n html = seriesTooltip;\n }\n\n seriesDefaultHTML.push(html);\n }\n }); // Default tooltip content\n // FIXME\n // (1) should be the first data which has name?\n // (2) themeRiver, firstDataIndex is array, and first line is unnecessary.\n\n var firstLine = valueLabel;\n\n if (renderMode !== 'html') {\n singleDefaultHTML.push(seriesDefaultHTML.join(newLine));\n } else {\n singleDefaultHTML.push((firstLine ? formatUtil.encodeHTML(firstLine) + newLine : '') + seriesDefaultHTML.join(newLine));\n }\n });\n }, this); // In most case, the second axis is shown upper than the first one.\n\n singleDefaultHTML.reverse();\n singleDefaultHTML = singleDefaultHTML.join(this._newLine + this._newLine);\n var positionExpr = e.position;\n\n this._showOrMove(singleTooltipModel, function () {\n if (this._updateContentNotChangedOnAxis(dataByCoordSys)) {\n this._updatePosition(singleTooltipModel, positionExpr, point[0], point[1], this._tooltipContent, singleParamsList);\n } else {\n this._showTooltipContent(singleTooltipModel, singleDefaultHTML, singleParamsList, Math.random(), point[0], point[1], positionExpr, undefined, markers);\n }\n }); // Do not trigger events here, because this branch only be entered\n // from dispatchAction.\n\n },\n _showSeriesItemTooltip: function (e, el, dispatchAction) {\n var ecModel = this._ecModel; // Use dataModel in element if possible\n // Used when mouseover on a element like markPoint or edge\n // In which case, the data is not main data in series.\n\n var seriesIndex = el.seriesIndex;\n var seriesModel = ecModel.getSeriesByIndex(seriesIndex); // For example, graph link.\n\n var dataModel = el.dataModel || seriesModel;\n var dataIndex = el.dataIndex;\n var dataType = el.dataType;\n var data = dataModel.getData(dataType);\n var tooltipModel = buildTooltipModel([data.getItemModel(dataIndex), dataModel, seriesModel && (seriesModel.coordinateSystem || {}).model, this._tooltipModel]);\n var tooltipTrigger = tooltipModel.get('trigger');\n\n if (tooltipTrigger != null && tooltipTrigger !== 'item') {\n return;\n }\n\n var params = dataModel.getDataParams(dataIndex, dataType);\n var seriesTooltip = dataModel.formatTooltip(dataIndex, false, dataType, this._renderMode);\n var defaultHtml;\n var markers;\n\n if (zrUtil.isObject(seriesTooltip)) {\n defaultHtml = seriesTooltip.html;\n markers = seriesTooltip.markers;\n } else {\n defaultHtml = seriesTooltip;\n markers = null;\n }\n\n var asyncTicket = 'item_' + dataModel.name + '_' + dataIndex;\n\n this._showOrMove(tooltipModel, function () {\n this._showTooltipContent(tooltipModel, defaultHtml, params, asyncTicket, e.offsetX, e.offsetY, e.position, e.target, markers);\n }); // FIXME\n // duplicated showtip if manuallyShowTip is called from dispatchAction.\n\n\n dispatchAction({\n type: 'showTip',\n dataIndexInside: dataIndex,\n dataIndex: data.getRawIndex(dataIndex),\n seriesIndex: seriesIndex,\n from: this.uid\n });\n },\n _showComponentItemTooltip: function (e, el, dispatchAction) {\n var tooltipOpt = el.tooltip;\n\n if (typeof tooltipOpt === 'string') {\n var content = tooltipOpt;\n tooltipOpt = {\n content: content,\n // Fixed formatter\n formatter: content\n };\n }\n\n var subTooltipModel = new Model(tooltipOpt, this._tooltipModel, this._ecModel);\n var defaultHtml = subTooltipModel.get('content');\n var asyncTicket = Math.random(); // Do not check whether `trigger` is 'none' here, because `trigger`\n // only works on coordinate system. In fact, we have not found case\n // that requires setting `trigger` nothing on component yet.\n\n this._showOrMove(subTooltipModel, function () {\n this._showTooltipContent(subTooltipModel, defaultHtml, subTooltipModel.get('formatterParams') || {}, asyncTicket, e.offsetX, e.offsetY, e.position, el);\n }); // If not dispatch showTip, tip may be hide triggered by axis.\n\n\n dispatchAction({\n type: 'showTip',\n from: this.uid\n });\n },\n _showTooltipContent: function (tooltipModel, defaultHtml, params, asyncTicket, x, y, positionExpr, el, markers) {\n // Reset ticket\n this._ticket = '';\n\n if (!tooltipModel.get('showContent') || !tooltipModel.get('show')) {\n return;\n }\n\n var tooltipContent = this._tooltipContent;\n var formatter = tooltipModel.get('formatter');\n positionExpr = positionExpr || tooltipModel.get('position');\n var html = defaultHtml;\n\n if (formatter && typeof formatter === 'string') {\n html = formatUtil.formatTpl(formatter, params, true);\n } else if (typeof formatter === 'function') {\n var callback = bind(function (cbTicket, html) {\n if (cbTicket === this._ticket) {\n tooltipContent.setContent(html, markers, tooltipModel);\n\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n }\n }, this);\n this._ticket = asyncTicket;\n html = formatter(params, asyncTicket, callback);\n }\n\n tooltipContent.setContent(html, markers, tooltipModel);\n tooltipContent.show(tooltipModel);\n\n this._updatePosition(tooltipModel, positionExpr, x, y, tooltipContent, params, el);\n },\n\n /**\n * @param {string|Function|Array.|Object} positionExpr\n * @param {number} x Mouse x\n * @param {number} y Mouse y\n * @param {boolean} confine Whether confine tooltip content in view rect.\n * @param {Object|} params\n * @param {module:zrender/Element} el target element\n * @param {module:echarts/ExtensionAPI} api\n * @return {Array.}\n */\n _updatePosition: function (tooltipModel, positionExpr, x, y, content, params, el) {\n var viewWidth = this._api.getWidth();\n\n var viewHeight = this._api.getHeight();\n\n positionExpr = positionExpr || tooltipModel.get('position');\n var contentSize = content.getSize();\n var align = tooltipModel.get('align');\n var vAlign = tooltipModel.get('verticalAlign');\n var rect = el && el.getBoundingRect().clone();\n el && rect.applyTransform(el.transform);\n\n if (typeof positionExpr === 'function') {\n // Callback of position can be an array or a string specify the position\n positionExpr = positionExpr([x, y], params, content.el, rect, {\n viewSize: [viewWidth, viewHeight],\n contentSize: contentSize.slice()\n });\n }\n\n if (zrUtil.isArray(positionExpr)) {\n x = parsePercent(positionExpr[0], viewWidth);\n y = parsePercent(positionExpr[1], viewHeight);\n } else if (zrUtil.isObject(positionExpr)) {\n positionExpr.width = contentSize[0];\n positionExpr.height = contentSize[1];\n var layoutRect = layoutUtil.getLayoutRect(positionExpr, {\n width: viewWidth,\n height: viewHeight\n });\n x = layoutRect.x;\n y = layoutRect.y;\n align = null; // When positionExpr is left/top/right/bottom,\n // align and verticalAlign will not work.\n\n vAlign = null;\n } // Specify tooltip position by string 'top' 'bottom' 'left' 'right' around graphic element\n else if (typeof positionExpr === 'string' && el) {\n var pos = calcTooltipPosition(positionExpr, rect, contentSize);\n x = pos[0];\n y = pos[1];\n } else {\n var pos = refixTooltipPosition(x, y, content, viewWidth, viewHeight, align ? null : 20, vAlign ? null : 20);\n x = pos[0];\n y = pos[1];\n }\n\n align && (x -= isCenterAlign(align) ? contentSize[0] / 2 : align === 'right' ? contentSize[0] : 0);\n vAlign && (y -= isCenterAlign(vAlign) ? contentSize[1] / 2 : vAlign === 'bottom' ? contentSize[1] : 0);\n\n if (tooltipModel.get('confine')) {\n var pos = confineTooltipPosition(x, y, content, viewWidth, viewHeight);\n x = pos[0];\n y = pos[1];\n }\n\n content.moveTo(x, y);\n },\n // FIXME\n // Should we remove this but leave this to user?\n _updateContentNotChangedOnAxis: function (dataByCoordSys) {\n var lastCoordSys = this._lastDataByCoordSys;\n var contentNotChanged = !!lastCoordSys && lastCoordSys.length === dataByCoordSys.length;\n contentNotChanged && each(lastCoordSys, function (lastItemCoordSys, indexCoordSys) {\n var lastDataByAxis = lastItemCoordSys.dataByAxis || {};\n var thisItemCoordSys = dataByCoordSys[indexCoordSys] || {};\n var thisDataByAxis = thisItemCoordSys.dataByAxis || [];\n contentNotChanged &= lastDataByAxis.length === thisDataByAxis.length;\n contentNotChanged && each(lastDataByAxis, function (lastItem, indexAxis) {\n var thisItem = thisDataByAxis[indexAxis] || {};\n var lastIndices = lastItem.seriesDataIndices || [];\n var newIndices = thisItem.seriesDataIndices || [];\n contentNotChanged &= lastItem.value === thisItem.value && lastItem.axisType === thisItem.axisType && lastItem.axisId === thisItem.axisId && lastIndices.length === newIndices.length;\n contentNotChanged && each(lastIndices, function (lastIdxItem, j) {\n var newIdxItem = newIndices[j];\n contentNotChanged &= lastIdxItem.seriesIndex === newIdxItem.seriesIndex && lastIdxItem.dataIndex === newIdxItem.dataIndex;\n });\n });\n });\n this._lastDataByCoordSys = dataByCoordSys;\n return !!contentNotChanged;\n },\n _hide: function (dispatchAction) {\n // Do not directly hideLater here, because this behavior may be prevented\n // in dispatchAction when showTip is dispatched.\n // FIXME\n // duplicated hideTip if manuallyHideTip is called from dispatchAction.\n this._lastDataByCoordSys = null;\n dispatchAction({\n type: 'hideTip',\n from: this.uid\n });\n },\n dispose: function (ecModel, api) {\n if (env.node) {\n return;\n }\n\n this._tooltipContent.dispose();\n\n globalListener.unregister('itemTooltip', api);\n }\n});\n/**\n * @param {Array.} modelCascade\n * From top to bottom. (the last one should be globalTooltipModel);\n */\n\n\nfunction buildTooltipModel(modelCascade) {\n var resultModel = modelCascade.pop();\n\n while (modelCascade.length) {\n var tooltipOpt = modelCascade.pop();\n\n if (tooltipOpt) {\n if (Model.isInstance(tooltipOpt)) {\n tooltipOpt = tooltipOpt.get('tooltip', true);\n } // In each data item tooltip can be simply write:\n // {\n // value: 10,\n // tooltip: 'Something you need to know'\n // }\n\n\n if (typeof tooltipOpt === 'string') {\n tooltipOpt = {\n formatter: tooltipOpt\n };\n }\n\n resultModel = new Model(tooltipOpt, resultModel, resultModel.ecModel);\n }\n }\n\n return resultModel;\n}\n\nfunction makeDispatchAction(payload, api) {\n return payload.dispatchAction || zrUtil.bind(api.dispatchAction, api);\n}\n\nfunction refixTooltipPosition(x, y, content, viewWidth, viewHeight, gapH, gapV) {\n var size = content.getOuterSize();\n var width = size.width;\n var height = size.height;\n\n if (gapH != null) {\n if (x + width + gapH > viewWidth) {\n x -= width + gapH;\n } else {\n x += gapH;\n }\n }\n\n if (gapV != null) {\n if (y + height + gapV > viewHeight) {\n y -= height + gapV;\n } else {\n y += gapV;\n }\n }\n\n return [x, y];\n}\n\nfunction confineTooltipPosition(x, y, content, viewWidth, viewHeight) {\n var size = content.getOuterSize();\n var width = size.width;\n var height = size.height;\n x = Math.min(x + width, viewWidth) - width;\n y = Math.min(y + height, viewHeight) - height;\n x = Math.max(x, 0);\n y = Math.max(y, 0);\n return [x, y];\n}\n\nfunction calcTooltipPosition(position, rect, contentSize) {\n var domWidth = contentSize[0];\n var domHeight = contentSize[1];\n var gap = 5;\n var x = 0;\n var y = 0;\n var rectWidth = rect.width;\n var rectHeight = rect.height;\n\n switch (position) {\n case 'inside':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n\n case 'top':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y - domHeight - gap;\n break;\n\n case 'bottom':\n x = rect.x + rectWidth / 2 - domWidth / 2;\n y = rect.y + rectHeight + gap;\n break;\n\n case 'left':\n x = rect.x - domWidth - gap;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n break;\n\n case 'right':\n x = rect.x + rectWidth + gap;\n y = rect.y + rectHeight / 2 - domHeight / 2;\n }\n\n return [x, y];\n}\n\nfunction isCenterAlign(align) {\n return align === 'center' || align === 'middle';\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 env = require(\"zrender/lib/core/env\");\n\nvar _model = require(\"../util/model\");\n\nvar makeInner = _model.makeInner;\n\nvar _clazz = require(\"../util/clazz\");\n\nvar enableClassExtend = _clazz.enableClassExtend;\nvar enableClassCheck = _clazz.enableClassCheck;\n\nvar lineStyleMixin = require(\"./mixin/lineStyle\");\n\nvar areaStyleMixin = require(\"./mixin/areaStyle\");\n\nvar textStyleMixin = require(\"./mixin/textStyle\");\n\nvar itemStyleMixin = require(\"./mixin/itemStyle\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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/model/Model\n */\nvar mixin = zrUtil.mixin;\nvar inner = makeInner();\n/**\n * @alias module:echarts/model/Model\n * @constructor\n * @param {Object} [option]\n * @param {module:echarts/model/Model} [parentModel]\n * @param {module:echarts/model/Global} [ecModel]\n */\n\nfunction Model(option, parentModel, ecModel) {\n /**\n * @type {module:echarts/model/Model}\n * @readOnly\n */\n this.parentModel = parentModel;\n /**\n * @type {module:echarts/model/Global}\n * @readOnly\n */\n\n this.ecModel = ecModel;\n /**\n * @type {Object}\n * @protected\n */\n\n this.option = option; // Simple optimization\n // if (this.init) {\n // if (arguments.length <= 4) {\n // this.init(option, parentModel, ecModel, extraOpt);\n // }\n // else {\n // this.init.apply(this, arguments);\n // }\n // }\n}\n\nModel.prototype = {\n constructor: Model,\n\n /**\n * Model 的初始化函数\n * @param {Object} option\n */\n init: null,\n\n /**\n * 从新的 Option merge\n */\n mergeOption: function (option) {\n zrUtil.merge(this.option, option, true);\n },\n\n /**\n * @param {string|Array.} path\n * @param {boolean} [ignoreParent=false]\n * @return {*}\n */\n get: function (path, ignoreParent) {\n if (path == null) {\n return this.option;\n }\n\n return doGet(this.option, this.parsePath(path), !ignoreParent && getParent(this, path));\n },\n\n /**\n * @param {string} key\n * @param {boolean} [ignoreParent=false]\n * @return {*}\n */\n getShallow: function (key, ignoreParent) {\n var option = this.option;\n var val = option == null ? option : option[key];\n var parentModel = !ignoreParent && getParent(this, key);\n\n if (val == null && parentModel) {\n val = parentModel.getShallow(key);\n }\n\n return val;\n },\n\n /**\n * @param {string|Array.} [path]\n * @param {module:echarts/model/Model} [parentModel]\n * @return {module:echarts/model/Model}\n */\n getModel: function (path, parentModel) {\n var obj = path == null ? this.option : doGet(this.option, path = this.parsePath(path));\n var thisParentModel;\n parentModel = parentModel || (thisParentModel = getParent(this, path)) && thisParentModel.getModel(path);\n return new Model(obj, parentModel, this.ecModel);\n },\n\n /**\n * If model has option\n */\n isEmpty: function () {\n return this.option == null;\n },\n restoreData: function () {},\n // Pending\n clone: function () {\n var Ctor = this.constructor;\n return new Ctor(zrUtil.clone(this.option));\n },\n setReadOnly: function (properties) {// clazzUtil.setReadOnly(this, properties);\n },\n // If path is null/undefined, return null/undefined.\n parsePath: function (path) {\n if (typeof path === 'string') {\n path = path.split('.');\n }\n\n return path;\n },\n\n /**\n * @param {Function} getParentMethod\n * param {Array.|string} path\n * return {module:echarts/model/Model}\n */\n customizeGetParent: function (getParentMethod) {\n inner(this).getParent = getParentMethod;\n },\n isAnimationEnabled: function () {\n if (!env.node) {\n if (this.option.animation != null) {\n return !!this.option.animation;\n } else if (this.parentModel) {\n return this.parentModel.isAnimationEnabled();\n }\n }\n }\n};\n\nfunction doGet(obj, pathArr, parentModel) {\n for (var i = 0; i < pathArr.length; i++) {\n // Ignore empty\n if (!pathArr[i]) {\n continue;\n } // obj could be number/string/... (like 0)\n\n\n obj = obj && typeof obj === 'object' ? obj[pathArr[i]] : null;\n\n if (obj == null) {\n break;\n }\n }\n\n if (obj == null && parentModel) {\n obj = parentModel.get(pathArr);\n }\n\n return obj;\n} // `path` can be null/undefined\n\n\nfunction getParent(model, path) {\n var getParentMethod = inner(model).getParent;\n return getParentMethod ? getParentMethod.call(model, path) : model.parentModel;\n} // Enable Model.extend.\n\n\nenableClassExtend(Model);\nenableClassCheck(Model);\nmixin(Model, lineStyleMixin);\nmixin(Model, areaStyleMixin);\nmixin(Model, textStyleMixin);\nmixin(Model, itemStyleMixin);\nvar _default = Model;\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 Single = require(\"./Single\");\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 * Single coordinate system creator.\n */\n\n/**\n * Create single coordinate system and inject it into seriesModel.\n *\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n * @return {Array.}\n */\nfunction create(ecModel, api) {\n var singles = [];\n ecModel.eachComponent('singleAxis', function (axisModel, idx) {\n var single = new Single(axisModel, ecModel, api);\n single.name = 'single_' + idx;\n single.resize(axisModel, api);\n axisModel.coordinateSystem = single;\n singles.push(single);\n });\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'singleAxis') {\n var singleAxisModel = ecModel.queryComponents({\n mainType: 'singleAxis',\n index: seriesModel.get('singleAxisIndex'),\n id: seriesModel.get('singleAxisId')\n })[0];\n seriesModel.coordinateSystem = singleAxisModel && singleAxisModel.coordinateSystem;\n }\n });\n return singles;\n}\n\nCoordinateSystem.register('single', {\n create: create,\n dimensions: Single.prototype.dimensions\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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: 'markArea',\n defaultOption: {\n zlevel: 0,\n // PENDING\n z: 1,\n tooltip: {\n trigger: 'item'\n },\n // markArea should fixed on the coordinate system\n animation: false,\n label: {\n show: true,\n position: 'top'\n },\n itemStyle: {\n // color and borderColor default to use color from series\n // color: 'auto'\n // borderColor: 'auto'\n borderWidth: 0\n },\n emphasis: {\n label: {\n show: true,\n position: 'top'\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 helper = require(\"../helper/treeHelper\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @file Treemap action\n */\nvar noop = function () {};\n\nvar actionTypes = ['treemapZoomToNode', 'treemapRender', 'treemapMove'];\n\nfor (var i = 0; i < actionTypes.length; i++) {\n echarts.registerAction({\n type: actionTypes[i],\n update: 'updateView'\n }, noop);\n}\n\necharts.registerAction({\n type: 'treemapRootToNode',\n update: 'updateView'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n }, handleRootToNode);\n\n function handleRootToNode(model, index) {\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, model);\n\n if (targetInfo) {\n var originViewRoot = model.getViewRoot();\n\n if (originViewRoot) {\n payload.direction = helper.aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown';\n }\n\n model.resetViewRoot(targetInfo.node);\n }\n }\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\nvar helper = require(\"../helper/treeHelper\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * @file Sunburst action\n */\nvar ROOT_TO_NODE_ACTION = 'sunburstRootToNode';\necharts.registerAction({\n type: ROOT_TO_NODE_ACTION,\n update: 'updateView'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sunburst',\n query: payload\n }, handleRootToNode);\n\n function handleRootToNode(model, index) {\n var targetInfo = helper.retrieveTargetInfo(payload, [ROOT_TO_NODE_ACTION], model);\n\n if (targetInfo) {\n var originViewRoot = model.getViewRoot();\n\n if (originViewRoot) {\n payload.direction = helper.aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown';\n }\n\n model.resetViewRoot(targetInfo.node);\n }\n }\n});\nvar HIGHLIGHT_ACTION = 'sunburstHighlight';\necharts.registerAction({\n type: HIGHLIGHT_ACTION,\n update: 'updateView'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sunburst',\n query: payload\n }, handleHighlight);\n\n function handleHighlight(model, index) {\n var targetInfo = helper.retrieveTargetInfo(payload, [HIGHLIGHT_ACTION], model);\n\n if (targetInfo) {\n payload.highlight = targetInfo.node;\n }\n }\n});\nvar UNHIGHLIGHT_ACTION = 'sunburstUnhighlight';\necharts.registerAction({\n type: UNHIGHLIGHT_ACTION,\n update: 'updateView'\n}, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'sunburst',\n query: payload\n }, handleUnhighlight);\n\n function handleUnhighlight(model, index) {\n payload.unhighlight = true;\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 graphic = require(\"../../util/graphic\");\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 * @module echarts/chart/helper/Line\n */\n\n/**\n * @constructor\n * @extends {module:zrender/graphic/Group}\n * @alias {module:echarts/chart/helper/Polyline}\n */\nfunction Polyline(lineData, idx, seriesScope) {\n graphic.Group.call(this);\n\n this._createPolyline(lineData, idx, seriesScope);\n}\n\nvar polylineProto = Polyline.prototype;\n\npolylineProto._createPolyline = function (lineData, idx, seriesScope) {\n // var seriesModel = lineData.hostModel;\n var points = lineData.getItemLayout(idx);\n var line = new graphic.Polyline({\n shape: {\n points: points\n }\n });\n this.add(line);\n\n this._updateCommonStl(lineData, idx, seriesScope);\n};\n\npolylineProto.updateData = function (lineData, idx, seriesScope) {\n var seriesModel = lineData.hostModel;\n var line = this.childAt(0);\n var target = {\n shape: {\n points: lineData.getItemLayout(idx)\n }\n };\n graphic.updateProps(line, target, seriesModel, idx);\n\n this._updateCommonStl(lineData, idx, seriesScope);\n};\n\npolylineProto._updateCommonStl = function (lineData, idx, seriesScope) {\n var line = this.childAt(0);\n var itemModel = lineData.getItemModel(idx);\n var visualColor = lineData.getItemVisual(idx, 'color');\n var lineStyle = seriesScope && seriesScope.lineStyle;\n var hoverLineStyle = seriesScope && seriesScope.hoverLineStyle;\n\n if (!seriesScope || lineData.hasItemOption) {\n lineStyle = itemModel.getModel('lineStyle').getLineStyle();\n hoverLineStyle = itemModel.getModel('emphasis.lineStyle').getLineStyle();\n }\n\n line.useStyle(zrUtil.defaults({\n strokeNoScale: true,\n fill: 'none',\n stroke: visualColor\n }, lineStyle));\n line.hoverStyle = hoverLineStyle;\n graphic.setHoverStyle(this);\n};\n\npolylineProto.updateLayout = function (lineData, idx) {\n var polyline = this.childAt(0);\n polyline.setShape('points', lineData.getItemLayout(idx));\n};\n\nzrUtil.inherits(Polyline, graphic.Group);\nvar _default = Polyline;\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 legendSelectActionHandler(methodName, payload, ecModel) {\n var selectedMap = {};\n var isToggleSelect = methodName === 'toggleSelected';\n var isSelected; // Update all legend components\n\n ecModel.eachComponent('legend', function (legendModel) {\n if (isToggleSelect && isSelected != null) {\n // Force other legend has same selected status\n // Or the first is toggled to true and other are toggled to false\n // In the case one legend has some item unSelected in option. And if other legend\n // doesn't has the item, they will assume it is selected.\n legendModel[isSelected ? 'select' : 'unSelect'](payload.name);\n } else if (methodName === 'allSelect' || methodName === 'inverseSelect') {\n legendModel[methodName]();\n } else {\n legendModel[methodName](payload.name);\n isSelected = legendModel.isSelected(payload.name);\n }\n\n var legendData = legendModel.getData();\n zrUtil.each(legendData, function (model) {\n var name = model.get('name'); // Wrap element\n\n if (name === '\\n' || name === '') {\n return;\n }\n\n var isItemSelected = legendModel.isSelected(name);\n\n if (selectedMap.hasOwnProperty(name)) {\n // Unselected if any legend is unselected\n selectedMap[name] = selectedMap[name] && isItemSelected;\n } else {\n selectedMap[name] = isItemSelected;\n }\n });\n }); // Return the event explicitly\n\n return methodName === 'allSelect' || methodName === 'inverseSelect' ? {\n selected: selectedMap\n } : {\n name: payload.name,\n selected: selectedMap\n };\n}\n/**\n * @event legendToggleSelect\n * @type {Object}\n * @property {string} type 'legendToggleSelect'\n * @property {string} [from]\n * @property {string} name Series name or data item name\n */\n\n\necharts.registerAction('legendToggleSelect', 'legendselectchanged', zrUtil.curry(legendSelectActionHandler, 'toggleSelected'));\necharts.registerAction('legendAllSelect', 'legendselectall', zrUtil.curry(legendSelectActionHandler, 'allSelect'));\necharts.registerAction('legendInverseSelect', 'legendinverseselect', zrUtil.curry(legendSelectActionHandler, 'inverseSelect'));\n/**\n * @event legendSelect\n * @type {Object}\n * @property {string} type 'legendSelect'\n * @property {string} name Series name or data item name\n */\n\necharts.registerAction('legendSelect', 'legendselected', zrUtil.curry(legendSelectActionHandler, 'select'));\n/**\n * @event legendUnSelect\n * @type {Object}\n * @property {string} type 'legendUnSelect'\n * @property {string} name Series name or data item name\n */\n\necharts.registerAction('legendUnSelect', 'legendunselected', zrUtil.curry(legendSelectActionHandler, 'unSelect'));","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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(coordSys) {\n var rect = coordSys.getRect();\n var rangeInfo = coordSys.getRangeInfo();\n return {\n coordSys: {\n type: 'calendar',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n cellWidth: coordSys.getCellWidth(),\n cellHeight: coordSys.getCellHeight(),\n rangeInfo: {\n start: rangeInfo.start,\n end: rangeInfo.end,\n weeks: rangeInfo.weeks,\n dayCount: rangeInfo.allDay\n }\n },\n api: {\n coord: function (data, clamp) {\n return coordSys.dataToPoint(data, clamp);\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 SymbolDraw = require(\"../helper/SymbolDraw\");\n\nvar EffectSymbol = require(\"../helper/EffectSymbol\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\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*/\nvar _default = echarts.extendChartView({\n type: 'effectScatter',\n init: function () {\n this._symbolDraw = new SymbolDraw(EffectSymbol);\n },\n render: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var effectSymbolDraw = this._symbolDraw;\n effectSymbolDraw.updateData(data);\n this.group.add(effectSymbolDraw.group);\n },\n updateTransform: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n this.group.dirty();\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 _updateGroupTransform: function (seriesModel) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys && coordSys.getRoamTransform) {\n this.group.transform = matrix.clone(coordSys.getRoamTransform());\n this.group.decomposeTransform();\n }\n },\n remove: function (ecModel, api) {\n this._symbolDraw && this._symbolDraw.remove(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 _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar HeatmapLayer = require(\"./HeatmapLayer\");\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 getIsInPiecewiseRange(dataExtent, pieceList, selected) {\n var dataSpan = dataExtent[1] - dataExtent[0];\n pieceList = zrUtil.map(pieceList, function (piece) {\n return {\n interval: [(piece.interval[0] - dataExtent[0]) / dataSpan, (piece.interval[1] - dataExtent[0]) / dataSpan]\n };\n });\n var len = pieceList.length;\n var lastIndex = 0;\n return function (val) {\n // Try to find in the location of the last found\n for (var i = lastIndex; i < len; i++) {\n var interval = pieceList[i].interval;\n\n if (interval[0] <= val && val <= interval[1]) {\n lastIndex = i;\n break;\n }\n }\n\n if (i === len) {\n // Not found, back interation\n for (var i = lastIndex - 1; i >= 0; i--) {\n var interval = pieceList[i].interval;\n\n if (interval[0] <= val && val <= interval[1]) {\n lastIndex = i;\n break;\n }\n }\n }\n\n return i >= 0 && i < len && selected[i];\n };\n}\n\nfunction getIsInContinuousRange(dataExtent, range) {\n var dataSpan = dataExtent[1] - dataExtent[0];\n range = [(range[0] - dataExtent[0]) / dataSpan, (range[1] - dataExtent[0]) / dataSpan];\n return function (val) {\n return val >= range[0] && val <= range[1];\n };\n}\n\nfunction isGeoCoordSys(coordSys) {\n var dimensions = coordSys.dimensions; // Not use coorSys.type === 'geo' because coordSys maybe extended\n\n return dimensions[0] === 'lng' && dimensions[1] === 'lat';\n}\n\nvar _default = echarts.extendChartView({\n type: 'heatmap',\n render: function (seriesModel, ecModel, api) {\n var visualMapOfThisSeries;\n ecModel.eachComponent('visualMap', function (visualMap) {\n visualMap.eachTargetSeries(function (targetSeries) {\n if (targetSeries === seriesModel) {\n visualMapOfThisSeries = visualMap;\n }\n });\n });\n this.group.removeAll();\n this._incrementalDisplayable = null;\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys.type === 'cartesian2d' || coordSys.type === 'calendar') {\n this._renderOnCartesianAndCalendar(seriesModel, api, 0, seriesModel.getData().count());\n } else if (isGeoCoordSys(coordSys)) {\n this._renderOnGeo(coordSys, seriesModel, visualMapOfThisSeries, api);\n }\n },\n incrementalPrepareRender: function (seriesModel, ecModel, api) {\n this.group.removeAll();\n },\n incrementalRender: function (params, seriesModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n\n if (coordSys) {\n this._renderOnCartesianAndCalendar(seriesModel, api, params.start, params.end, true);\n }\n },\n _renderOnCartesianAndCalendar: function (seriesModel, api, start, end, incremental) {\n var coordSys = seriesModel.coordinateSystem;\n var width;\n var height;\n\n if (coordSys.type === 'cartesian2d') {\n var xAxis = coordSys.getAxis('x');\n var yAxis = coordSys.getAxis('y');\n width = xAxis.getBandWidth();\n height = yAxis.getBandWidth();\n }\n\n var group = this.group;\n var data = seriesModel.getData();\n var itemStyleQuery = 'itemStyle';\n var hoverItemStyleQuery = 'emphasis.itemStyle';\n var labelQuery = 'label';\n var hoverLabelQuery = 'emphasis.label';\n var style = seriesModel.getModel(itemStyleQuery).getItemStyle(['color']);\n var hoverStl = seriesModel.getModel(hoverItemStyleQuery).getItemStyle();\n var labelModel = seriesModel.getModel(labelQuery);\n var hoverLabelModel = seriesModel.getModel(hoverLabelQuery);\n var coordSysType = coordSys.type;\n var dataDims = coordSysType === 'cartesian2d' ? [data.mapDimension('x'), data.mapDimension('y'), data.mapDimension('value')] : [data.mapDimension('time'), data.mapDimension('value')];\n\n for (var idx = start; idx < end; idx++) {\n var rect;\n\n if (coordSysType === 'cartesian2d') {\n // Ignore empty data\n if (isNaN(data.get(dataDims[2], idx))) {\n continue;\n }\n\n var point = coordSys.dataToPoint([data.get(dataDims[0], idx), data.get(dataDims[1], idx)]);\n rect = new graphic.Rect({\n shape: {\n x: Math.floor(Math.round(point[0]) - width / 2),\n y: Math.floor(Math.round(point[1]) - height / 2),\n width: Math.ceil(width),\n height: Math.ceil(height)\n },\n style: {\n fill: data.getItemVisual(idx, 'color'),\n opacity: data.getItemVisual(idx, 'opacity')\n }\n });\n } else {\n // Ignore empty data\n if (isNaN(data.get(dataDims[1], idx))) {\n continue;\n }\n\n rect = new graphic.Rect({\n z2: 1,\n shape: coordSys.dataToRect([data.get(dataDims[0], idx)]).contentShape,\n style: {\n fill: data.getItemVisual(idx, 'color'),\n opacity: data.getItemVisual(idx, 'opacity')\n }\n });\n }\n\n var itemModel = data.getItemModel(idx); // Optimization for large datset\n\n if (data.hasItemOption) {\n style = itemModel.getModel(itemStyleQuery).getItemStyle(['color']);\n hoverStl = itemModel.getModel(hoverItemStyleQuery).getItemStyle();\n labelModel = itemModel.getModel(labelQuery);\n hoverLabelModel = itemModel.getModel(hoverLabelQuery);\n }\n\n var rawValue = seriesModel.getRawValue(idx);\n var defaultText = '-';\n\n if (rawValue && rawValue[2] != null) {\n defaultText = rawValue[2];\n }\n\n graphic.setLabelStyle(style, hoverStl, labelModel, hoverLabelModel, {\n labelFetcher: seriesModel,\n labelDataIndex: idx,\n defaultText: defaultText,\n isRectText: true\n });\n rect.setStyle(style);\n graphic.setHoverStyle(rect, data.hasItemOption ? hoverStl : zrUtil.extend({}, hoverStl));\n rect.incremental = incremental; // PENDING\n\n if (incremental) {\n // Rect must use hover layer if it's incremental.\n rect.useHoverLayer = true;\n }\n\n group.add(rect);\n data.setItemGraphicEl(idx, rect);\n }\n },\n _renderOnGeo: function (geo, seriesModel, visualMapModel, api) {\n var inRangeVisuals = visualMapModel.targetVisuals.inRange;\n var outOfRangeVisuals = visualMapModel.targetVisuals.outOfRange; // if (!visualMapping) {\n // throw new Error('Data range must have color visuals');\n // }\n\n var data = seriesModel.getData();\n var hmLayer = this._hmLayer || this._hmLayer || new HeatmapLayer();\n hmLayer.blurSize = seriesModel.get('blurSize');\n hmLayer.pointSize = seriesModel.get('pointSize');\n hmLayer.minOpacity = seriesModel.get('minOpacity');\n hmLayer.maxOpacity = seriesModel.get('maxOpacity');\n var rect = geo.getViewRect().clone();\n var roamTransform = geo.getRoamTransform();\n rect.applyTransform(roamTransform); // Clamp on viewport\n\n var x = Math.max(rect.x, 0);\n var y = Math.max(rect.y, 0);\n var x2 = Math.min(rect.width + rect.x, api.getWidth());\n var y2 = Math.min(rect.height + rect.y, api.getHeight());\n var width = x2 - x;\n var height = y2 - y;\n var dims = [data.mapDimension('lng'), data.mapDimension('lat'), data.mapDimension('value')];\n var points = data.mapArray(dims, function (lng, lat, value) {\n var pt = geo.dataToPoint([lng, lat]);\n pt[0] -= x;\n pt[1] -= y;\n pt.push(value);\n return pt;\n });\n var dataExtent = visualMapModel.getExtent();\n var isInRange = visualMapModel.type === 'visualMap.continuous' ? getIsInContinuousRange(dataExtent, visualMapModel.option.range) : getIsInPiecewiseRange(dataExtent, visualMapModel.getPieceList(), visualMapModel.option.selected);\n hmLayer.update(points, width, height, inRangeVisuals.color.getNormalizer(), {\n inRange: inRangeVisuals.color.getColorMapper(),\n outOfRange: outOfRangeVisuals.color.getColorMapper()\n }, isInRange);\n var img = new graphic.Image({\n style: {\n width: width,\n height: height,\n x: x,\n y: y,\n image: hmLayer.canvas\n },\n silent: true\n });\n this.group.add(img);\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 curveTool = require(\"zrender/lib/core/curve\");\n\nvar vec2 = require(\"zrender/lib/core/vector\");\n\nvar _graphHelper = require(\"./graphHelper\");\n\nvar getSymbolSize = _graphHelper.getSymbolSize;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 v1 = [];\nvar v2 = [];\nvar v3 = [];\nvar quadraticAt = curveTool.quadraticAt;\nvar v2DistSquare = vec2.distSquare;\nvar mathAbs = Math.abs;\n\nfunction intersectCurveCircle(curvePoints, center, radius) {\n var p0 = curvePoints[0];\n var p1 = curvePoints[1];\n var p2 = curvePoints[2];\n var d = Infinity;\n var t;\n var radiusSquare = radius * radius;\n var interval = 0.1;\n\n for (var _t = 0.1; _t <= 0.9; _t += 0.1) {\n v1[0] = quadraticAt(p0[0], p1[0], p2[0], _t);\n v1[1] = quadraticAt(p0[1], p1[1], p2[1], _t);\n var diff = mathAbs(v2DistSquare(v1, center) - radiusSquare);\n\n if (diff < d) {\n d = diff;\n t = _t;\n }\n } // Assume the segment is monotone,Find root through Bisection method\n // At most 32 iteration\n\n\n for (var i = 0; i < 32; i++) {\n // var prev = t - interval;\n var next = t + interval; // v1[0] = quadraticAt(p0[0], p1[0], p2[0], prev);\n // v1[1] = quadraticAt(p0[1], p1[1], p2[1], prev);\n\n v2[0] = quadraticAt(p0[0], p1[0], p2[0], t);\n v2[1] = quadraticAt(p0[1], p1[1], p2[1], t);\n v3[0] = quadraticAt(p0[0], p1[0], p2[0], next);\n v3[1] = quadraticAt(p0[1], p1[1], p2[1], next);\n var diff = v2DistSquare(v2, center) - radiusSquare;\n\n if (mathAbs(diff) < 1e-2) {\n break;\n } // var prevDiff = v2DistSquare(v1, center) - radiusSquare;\n\n\n var nextDiff = v2DistSquare(v3, center) - radiusSquare;\n interval /= 2;\n\n if (diff < 0) {\n if (nextDiff >= 0) {\n t = t + interval;\n } else {\n t = t - interval;\n }\n } else {\n if (nextDiff >= 0) {\n t = t - interval;\n } else {\n t = t + interval;\n }\n }\n }\n\n return t;\n} // Adjust edge to avoid\n\n\nfunction _default(graph, scale) {\n var tmp0 = [];\n var quadraticSubdivide = curveTool.quadraticSubdivide;\n var pts = [[], [], []];\n var pts2 = [[], []];\n var v = [];\n scale /= 2;\n graph.eachEdge(function (edge, idx) {\n var linePoints = edge.getLayout();\n var fromSymbol = edge.getVisual('fromSymbol');\n var toSymbol = edge.getVisual('toSymbol');\n\n if (!linePoints.__original) {\n linePoints.__original = [vec2.clone(linePoints[0]), vec2.clone(linePoints[1])];\n\n if (linePoints[2]) {\n linePoints.__original.push(vec2.clone(linePoints[2]));\n }\n }\n\n var originalPoints = linePoints.__original; // Quadratic curve\n\n if (linePoints[2] != null) {\n vec2.copy(pts[0], originalPoints[0]);\n vec2.copy(pts[1], originalPoints[2]);\n vec2.copy(pts[2], originalPoints[1]);\n\n if (fromSymbol && fromSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node1);\n var t = intersectCurveCircle(pts, originalPoints[0], symbolSize * scale); // Subdivide and get the second\n\n quadraticSubdivide(pts[0][0], pts[1][0], pts[2][0], t, tmp0);\n pts[0][0] = tmp0[3];\n pts[1][0] = tmp0[4];\n quadraticSubdivide(pts[0][1], pts[1][1], pts[2][1], t, tmp0);\n pts[0][1] = tmp0[3];\n pts[1][1] = tmp0[4];\n }\n\n if (toSymbol && toSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node2);\n var t = intersectCurveCircle(pts, originalPoints[1], symbolSize * scale); // Subdivide and get the first\n\n quadraticSubdivide(pts[0][0], pts[1][0], pts[2][0], t, tmp0);\n pts[1][0] = tmp0[1];\n pts[2][0] = tmp0[2];\n quadraticSubdivide(pts[0][1], pts[1][1], pts[2][1], t, tmp0);\n pts[1][1] = tmp0[1];\n pts[2][1] = tmp0[2];\n } // Copy back to layout\n\n\n vec2.copy(linePoints[0], pts[0]);\n vec2.copy(linePoints[1], pts[2]);\n vec2.copy(linePoints[2], pts[1]);\n } // Line\n else {\n vec2.copy(pts2[0], originalPoints[0]);\n vec2.copy(pts2[1], originalPoints[1]);\n vec2.sub(v, pts2[1], pts2[0]);\n vec2.normalize(v, v);\n\n if (fromSymbol && fromSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node1);\n vec2.scaleAndAdd(pts2[0], pts2[0], v, symbolSize * scale);\n }\n\n if (toSymbol && toSymbol !== 'none') {\n var symbolSize = getSymbolSize(edge.node2);\n vec2.scaleAndAdd(pts2[1], pts2[1], v, -symbolSize * scale);\n }\n\n vec2.copy(linePoints[0], pts2[0]);\n vec2.copy(linePoints[1], pts2[1]);\n }\n });\n}\n\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 AxisPointerModel = echarts.extendComponentModel({\n type: 'axisPointer',\n coordSysAxesInfo: null,\n defaultOption: {\n // 'auto' means that show when triggered by tooltip or handle.\n show: 'auto',\n // 'click' | 'mousemove' | 'none'\n triggerOn: null,\n // set default in AxisPonterView.js\n zlevel: 0,\n z: 50,\n type: 'line',\n // 'line' 'shadow' 'cross' 'none'.\n // axispointer triggered by tootip determine snap automatically,\n // see `modelHelper`.\n snap: false,\n triggerTooltip: true,\n value: null,\n status: null,\n // Init value depends on whether handle is used.\n // [group0, group1, ...]\n // Each group can be: {\n // mapper: function () {},\n // singleTooltip: 'multiple', // 'multiple' or 'single'\n // xAxisId: ...,\n // yAxisName: ...,\n // angleAxisIndex: ...\n // }\n // mapper: can be ignored.\n // input: {axisInfo, value}\n // output: {axisInfo, value}\n link: [],\n // Do not set 'auto' here, otherwise global animation: false\n // will not effect at this axispointer.\n animation: null,\n animationDurationUpdate: 200,\n lineStyle: {\n color: '#aaa',\n width: 1,\n type: 'solid'\n },\n shadowStyle: {\n color: 'rgba(150,150,150,0.3)'\n },\n label: {\n show: true,\n formatter: null,\n // string | Function\n precision: 'auto',\n // Or a number like 0, 1, 2 ...\n margin: 3,\n color: '#fff',\n padding: [5, 7, 5, 7],\n backgroundColor: 'auto',\n // default: axis line color\n borderColor: null,\n borderWidth: 0,\n shadowBlur: 3,\n shadowColor: '#aaa' // Considering applicability, common style should\n // better not have shadowOffset.\n // shadowOffsetX: 0,\n // shadowOffsetY: 2\n\n },\n handle: {\n show: false,\n\n /* eslint-disable */\n icon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z',\n // jshint ignore:line\n\n /* eslint-enable */\n size: 45,\n // handle margin is from symbol center to axis, which is stable when circular move.\n margin: 50,\n // color: '#1b8bbd'\n // color: '#2f4554'\n color: '#333',\n shadowBlur: 3,\n shadowColor: '#aaa',\n shadowOffsetX: 0,\n shadowOffsetY: 2,\n // For mobile performance\n throttle: 40\n }\n }\n});\nvar _default = AxisPointerModel;\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 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: 'cartesian2dAxis',\n\n /**\n * @type {module:echarts/coord/cartesian/Axis2D}\n */\n axis: null,\n\n /**\n * @override\n */\n init: function () {\n AxisModel.superApply(this, 'init', arguments);\n this.resetRange();\n },\n\n /**\n * @override\n */\n mergeOption: function () {\n AxisModel.superApply(this, 'mergeOption', arguments);\n this.resetRange();\n },\n\n /**\n * @override\n */\n restoreData: function () {\n AxisModel.superApply(this, 'restoreData', arguments);\n this.resetRange();\n },\n\n /**\n * @override\n * @return {module:echarts/model/Component}\n */\n getCoordSysModel: function () {\n return this.ecModel.queryComponents({\n mainType: 'grid',\n index: this.option.gridIndex,\n id: this.option.gridId\n })[0];\n }\n});\n\nfunction getAxisType(axisDim, option) {\n // Default axis with data is category axis\n return option.type || (option.data ? 'category' : 'value');\n}\n\nzrUtil.merge(AxisModel.prototype, axisModelCommonMixin);\nvar extraOption = {\n // gridIndex: 0,\n // gridId: '',\n // Offset is for multiple axis on the same position\n offset: 0\n};\naxisModelCreator('x', AxisModel, getAxisType, extraOption);\naxisModelCreator('y', AxisModel, getAxisType, extraOption);\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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar _roamHelper = require(\"./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*/\n\n/**\n * @payload\n * @property {string} [componentType=series]\n * @property {number} [dx]\n * @property {number} [dy]\n * @property {number} [zoom]\n * @property {number} [originX]\n * @property {number} [originY]\n */\necharts.registerAction({\n type: 'geoRoam',\n event: 'geoRoam',\n update: 'updateTransform'\n}, function (payload, ecModel) {\n var componentType = payload.componentType || 'series';\n ecModel.eachComponent({\n mainType: componentType,\n query: payload\n }, function (componentModel) {\n var geo = componentModel.coordinateSystem;\n\n if (geo.type !== 'geo') {\n return;\n }\n\n var res = updateCenterAndZoom(geo, payload, componentModel.get('scaleLimit'));\n componentModel.setCenter && componentModel.setCenter(res.center);\n componentModel.setZoom && componentModel.setZoom(res.zoom); // All map series with same `map` use the same geo coordinate system\n // So the center and zoom must be in sync. Include the series not selected by legend\n\n if (componentType === 'series') {\n zrUtil.each(componentModel.seriesGroup, function (seriesModel) {\n seriesModel.setCenter(res.center);\n seriesModel.setZoom(res.zoom);\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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar Eventful = require(\"zrender/lib/mixin/Eventful\");\n\nvar eventTool = require(\"zrender/lib/core/event\");\n\nvar interactionMutex = require(\"./interactionMutex\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * @alias module:echarts/component/helper/RoamController\n * @constructor\n * @mixin {module:zrender/mixin/Eventful}\n *\n * @param {module:zrender/zrender~ZRender} zr\n */\nfunction RoamController(zr) {\n /**\n * @type {Function}\n */\n this.pointerChecker;\n /**\n * @type {module:zrender}\n */\n\n this._zr = zr;\n /**\n * @type {Object}\n */\n\n this._opt = {}; // Avoid two roamController bind the same handler\n\n var bind = zrUtil.bind;\n var mousedownHandler = bind(mousedown, this);\n var mousemoveHandler = bind(mousemove, this);\n var mouseupHandler = bind(mouseup, this);\n var mousewheelHandler = bind(mousewheel, this);\n var pinchHandler = bind(pinch, this);\n Eventful.call(this);\n /**\n * @param {Function} pointerChecker\n * input: x, y\n * output: boolean\n */\n\n this.setPointerChecker = function (pointerChecker) {\n this.pointerChecker = pointerChecker;\n };\n /**\n * Notice: only enable needed types. For example, if 'zoom'\n * is not needed, 'zoom' should not be enabled, otherwise\n * default mousewheel behaviour (scroll page) will be disabled.\n *\n * @param {boolean|string} [controlType=true] Specify the control type,\n * which can be null/undefined or true/false\n * or 'pan/move' or 'zoom'/'scale'\n * @param {Object} [opt]\n * @param {Object} [opt.zoomOnMouseWheel=true] The value can be: true / false / 'shift' / 'ctrl' / 'alt'.\n * @param {Object} [opt.moveOnMouseMove=true] The value can be: true / false / 'shift' / 'ctrl' / 'alt'.\n * @param {Object} [opt.moveOnMouseWheel=false] The value can be: true / false / 'shift' / 'ctrl' / 'alt'.\n * @param {Object} [opt.preventDefaultMouseMove=true] When pan.\n */\n\n\n this.enable = function (controlType, opt) {\n // Disable previous first\n this.disable();\n this._opt = zrUtil.defaults(zrUtil.clone(opt) || {}, {\n zoomOnMouseWheel: true,\n moveOnMouseMove: true,\n // By default, wheel do not trigger move.\n moveOnMouseWheel: false,\n preventDefaultMouseMove: true\n });\n\n if (controlType == null) {\n controlType = true;\n }\n\n if (controlType === true || controlType === 'move' || controlType === 'pan') {\n zr.on('mousedown', mousedownHandler);\n zr.on('mousemove', mousemoveHandler);\n zr.on('mouseup', mouseupHandler);\n }\n\n if (controlType === true || controlType === 'scale' || controlType === 'zoom') {\n zr.on('mousewheel', mousewheelHandler);\n zr.on('pinch', pinchHandler);\n }\n };\n\n this.disable = function () {\n zr.off('mousedown', mousedownHandler);\n zr.off('mousemove', mousemoveHandler);\n zr.off('mouseup', mouseupHandler);\n zr.off('mousewheel', mousewheelHandler);\n zr.off('pinch', pinchHandler);\n };\n\n this.dispose = this.disable;\n\n this.isDragging = function () {\n return this._dragging;\n };\n\n this.isPinching = function () {\n return this._pinching;\n };\n}\n\nzrUtil.mixin(RoamController, Eventful);\n\nfunction mousedown(e) {\n if (eventTool.isMiddleOrRightButtonOnMouseUpDown(e) || e.target && e.target.draggable) {\n return;\n }\n\n var x = e.offsetX;\n var y = e.offsetY; // Only check on mosedown, but not mousemove.\n // Mouse can be out of target when mouse moving.\n\n if (this.pointerChecker && this.pointerChecker(e, x, y)) {\n this._x = x;\n this._y = y;\n this._dragging = true;\n }\n}\n\nfunction mousemove(e) {\n if (!this._dragging || !isAvailableBehavior('moveOnMouseMove', e, this._opt) || e.gestureEvent === 'pinch' || interactionMutex.isTaken(this._zr, 'globalPan')) {\n return;\n }\n\n var x = e.offsetX;\n var y = e.offsetY;\n var oldX = this._x;\n var oldY = this._y;\n var dx = x - oldX;\n var dy = y - oldY;\n this._x = x;\n this._y = y;\n this._opt.preventDefaultMouseMove && eventTool.stop(e.event);\n trigger(this, 'pan', 'moveOnMouseMove', e, {\n dx: dx,\n dy: dy,\n oldX: oldX,\n oldY: oldY,\n newX: x,\n newY: y\n });\n}\n\nfunction mouseup(e) {\n if (!eventTool.isMiddleOrRightButtonOnMouseUpDown(e)) {\n this._dragging = false;\n }\n}\n\nfunction mousewheel(e) {\n var shouldZoom = isAvailableBehavior('zoomOnMouseWheel', e, this._opt);\n var shouldMove = isAvailableBehavior('moveOnMouseWheel', e, this._opt);\n var wheelDelta = e.wheelDelta;\n var absWheelDeltaDelta = Math.abs(wheelDelta);\n var originX = e.offsetX;\n var originY = e.offsetY; // wheelDelta maybe -0 in chrome mac.\n\n if (wheelDelta === 0 || !shouldZoom && !shouldMove) {\n return;\n } // If both `shouldZoom` and `shouldMove` is true, trigger\n // their event both, and the final behavior is determined\n // by event listener themselves.\n\n\n if (shouldZoom) {\n // Convenience:\n // Mac and VM Windows on Mac: scroll up: zoom out.\n // Windows: scroll up: zoom in.\n // FIXME: Should do more test in different environment.\n // wheelDelta is too complicated in difference nvironment\n // (https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel),\n // although it has been normallized by zrender.\n // wheelDelta of mouse wheel is bigger than touch pad.\n var factor = absWheelDeltaDelta > 3 ? 1.4 : absWheelDeltaDelta > 1 ? 1.2 : 1.1;\n var scale = wheelDelta > 0 ? factor : 1 / factor;\n checkPointerAndTrigger(this, 'zoom', 'zoomOnMouseWheel', e, {\n scale: scale,\n originX: originX,\n originY: originY\n });\n }\n\n if (shouldMove) {\n // FIXME: Should do more test in different environment.\n var absDelta = Math.abs(wheelDelta); // wheelDelta of mouse wheel is bigger than touch pad.\n\n var scrollDelta = (wheelDelta > 0 ? 1 : -1) * (absDelta > 3 ? 0.4 : absDelta > 1 ? 0.15 : 0.05);\n checkPointerAndTrigger(this, 'scrollMove', 'moveOnMouseWheel', e, {\n scrollDelta: scrollDelta,\n originX: originX,\n originY: originY\n });\n }\n}\n\nfunction pinch(e) {\n if (interactionMutex.isTaken(this._zr, 'globalPan')) {\n return;\n }\n\n var scale = e.pinchScale > 1 ? 1.1 : 1 / 1.1;\n checkPointerAndTrigger(this, 'zoom', null, e, {\n scale: scale,\n originX: e.pinchX,\n originY: e.pinchY\n });\n}\n\nfunction checkPointerAndTrigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n if (controller.pointerChecker && controller.pointerChecker(e, contollerEvent.originX, contollerEvent.originY)) {\n // When mouse is out of roamController rect,\n // default befavoius should not be be disabled, otherwise\n // page sliding is disabled, contrary to expectation.\n eventTool.stop(e.event);\n trigger(controller, eventName, behaviorToCheck, e, contollerEvent);\n }\n}\n\nfunction trigger(controller, eventName, behaviorToCheck, e, contollerEvent) {\n // Also provide behavior checker for event listener, for some case that\n // multiple components share one listener.\n contollerEvent.isAvailableBehavior = zrUtil.bind(isAvailableBehavior, null, behaviorToCheck, e);\n controller.trigger(eventName, contollerEvent);\n} // settings: {\n// zoomOnMouseWheel\n// moveOnMouseMove\n// moveOnMouseWheel\n// }\n// The value can be: true / false / 'shift' / 'ctrl' / 'alt'.\n\n\nfunction isAvailableBehavior(behaviorToCheck, e, settings) {\n var setting = settings[behaviorToCheck];\n return !behaviorToCheck || setting && (!zrUtil.isString(setting) || e.event[setting + 'Key']);\n}\n\nvar _default = RoamController;\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 BaseAxisPointer = require(\"./BaseAxisPointer\");\n\nvar viewHelper = require(\"./viewHelper\");\n\nvar cartesianAxisHelper = require(\"../../coord/cartesian/cartesianAxisHelper\");\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 CartesianAxisPointer = BaseAxisPointer.extend({\n /**\n * @override\n */\n makeElOption: function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n var grid = axis.grid;\n var axisPointerType = axisPointerModel.get('type');\n var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent();\n var pixelValue = axis.toGlobalCoord(axis.dataToCoord(value, true));\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 = cartesianAxisHelper.layout(grid.model, 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 = cartesianAxisHelper.layout(axisModel.axis.grid.model, 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 grid = axis.grid;\n var axisExtent = axis.getGlobalExtent(true);\n var otherExtent = getCartesian(grid, axis).getOtherAxis(axis).getGlobalExtent();\n var dimIndex = axis.dim === 'x' ? 0 : 1;\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 cursorOtherValue = (otherExtent[1] + otherExtent[0]) / 2;\n var cursorPoint = [cursorOtherValue, cursorOtherValue];\n cursorPoint[dimIndex] = currPosition[dimIndex]; // Make tooltip do not overlap axisPointer and in the middle of the grid.\n\n var tooltipOptions = [{\n verticalAlign: 'middle'\n }, {\n align: 'center'\n }];\n return {\n position: currPosition,\n rotation: transform.rotation,\n cursorPoint: cursorPoint,\n tooltipOption: tooltipOptions[dimIndex]\n };\n }\n});\n\nfunction getCartesian(grid, axis) {\n var opt = {};\n opt[axis.dim + 'AxisIndex'] = axis.index;\n return grid.getCartesian(opt);\n}\n\nvar pointerShapeBuilder = {\n line: function (axis, pixelValue, otherExtent) {\n var targetShape = viewHelper.makeLineShape([pixelValue, otherExtent[0]], [pixelValue, otherExtent[1]], getAxisDimIndex(axis));\n return {\n type: 'Line',\n subPixelOptimize: true,\n shape: targetShape\n };\n },\n shadow: function (axis, pixelValue, otherExtent) {\n var bandWidth = Math.max(1, 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], getAxisDimIndex(axis))\n };\n }\n};\n\nfunction getAxisDimIndex(axis) {\n return axis.dim === 'x' ? 0 : 1;\n}\n\nAxisView.registerAxisPointerClass('CartesianAxisPointer', CartesianAxisPointer);\nvar _default = CartesianAxisPointer;\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 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\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// (1) The code `if (__DEV__) ...` can be removed by build tool.\n// (2) If intend to use `__DEV__`, this module should be imported. Use a global\n// variable `__DEV__` may cause that miss the declaration (see #6535), or the\n// declaration is behind of the using position (for example in `Model.extent`,\n// And tools like rollup can not analysis the dependency if not import).\nvar dev; // In browser\n\nif (typeof window !== 'undefined') {\n dev = window.__DEV__;\n} // In node\nelse if (typeof global !== 'undefined') {\n dev = global.__DEV__;\n }\n\nif (typeof dev === 'undefined') {\n dev = true;\n}\n\nvar __DEV__ = dev;\nexports.__DEV__ = __DEV__;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 _config = require(\"../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar env = require(\"zrender/lib/core/env\");\n\nvar _format = require(\"../util/format\");\n\nvar formatTime = _format.formatTime;\nvar encodeHTML = _format.encodeHTML;\nvar addCommas = _format.addCommas;\nvar getTooltipMarker = _format.getTooltipMarker;\n\nvar modelUtil = require(\"../util/model\");\n\nvar ComponentModel = require(\"./Component\");\n\nvar colorPaletteMixin = require(\"./mixin/colorPalette\");\n\nvar dataFormatMixin = require(\"../model/mixin/dataFormat\");\n\nvar _layout = require(\"../util/layout\");\n\nvar getLayoutParams = _layout.getLayoutParams;\nvar mergeLayoutParam = _layout.mergeLayoutParam;\n\nvar _task = require(\"../stream/task\");\n\nvar createTask = _task.createTask;\n\nvar _sourceHelper = require(\"../data/helper/sourceHelper\");\n\nvar prepareSource = _sourceHelper.prepareSource;\nvar getSource = _sourceHelper.getSource;\n\nvar _dataProvider = require(\"../data/helper/dataProvider\");\n\nvar retrieveRawValue = _dataProvider.retrieveRawValue;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 = modelUtil.makeInner();\nvar SeriesModel = ComponentModel.extend({\n type: 'series.__base__',\n\n /**\n * @readOnly\n */\n seriesIndex: 0,\n // coodinateSystem will be injected in the echarts/CoordinateSystem\n coordinateSystem: null,\n\n /**\n * @type {Object}\n * @protected\n */\n defaultOption: null,\n\n /**\n * legend visual provider to the legend component\n * @type {Object}\n */\n // PENDING\n legendVisualProvider: null,\n\n /**\n * Access path of color for visual\n */\n visualColorAccessPath: 'itemStyle.color',\n\n /**\n * Access path of borderColor for visual\n */\n visualBorderColorAccessPath: 'itemStyle.borderColor',\n\n /**\n * Support merge layout params.\n * Only support 'box' now (left/right/top/bottom/width/height).\n * @type {string|Object} Object can be {ignoreSize: true}\n * @readOnly\n */\n layoutMode: null,\n init: function (option, parentModel, ecModel, extraOpt) {\n /**\n * @type {number}\n * @readOnly\n */\n this.seriesIndex = this.componentIndex;\n this.dataTask = createTask({\n count: dataTaskCount,\n reset: dataTaskReset\n });\n this.dataTask.context = {\n model: this\n };\n this.mergeDefaultAndTheme(option, ecModel);\n prepareSource(this);\n var data = this.getInitialData(option, ecModel);\n wrapData(data, this);\n this.dataTask.context.data = data;\n\n /**\n * @type {module:echarts/data/List|module:echarts/data/Tree|module:echarts/data/Graph}\n * @private\n */\n inner(this).dataBeforeProcessed = data; // If we reverse the order (make data firstly, and then make\n // dataBeforeProcessed by cloneShallow), cloneShallow will\n // cause data.graph.data !== data when using\n // module:echarts/data/Graph or module:echarts/data/Tree.\n // See module:echarts/data/helper/linkList\n // Theoretically, it is unreasonable to call `seriesModel.getData()` in the model\n // init or merge stage, because the data can be restored. So we do not `restoreData`\n // and `setData` here, which forbids calling `seriesModel.getData()` in this stage.\n // Call `seriesModel.getRawData()` instead.\n // this.restoreData();\n\n autoSeriesName(this);\n },\n\n /**\n * Util for merge default and theme to option\n * @param {Object} option\n * @param {module:echarts/model/Global} ecModel\n */\n mergeDefaultAndTheme: function (option, ecModel) {\n var layoutMode = this.layoutMode;\n var inputPositionParams = layoutMode ? getLayoutParams(option) : {}; // Backward compat: using subType on theme.\n // But if name duplicate between series subType\n // (for example: parallel) add component mainType,\n // add suffix 'Series'.\n\n var themeSubType = this.subType;\n\n if (ComponentModel.hasClass(themeSubType)) {\n themeSubType += 'Series';\n }\n\n zrUtil.merge(option, ecModel.getTheme().get(this.subType));\n zrUtil.merge(option, this.getDefaultOption()); // Default label emphasis `show`\n\n modelUtil.defaultEmphasis(option, 'label', ['show']);\n this.fillDataTextStyle(option.data);\n\n if (layoutMode) {\n mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n },\n mergeOption: function (newSeriesOption, ecModel) {\n // this.settingTask.dirty();\n newSeriesOption = zrUtil.merge(this.option, newSeriesOption, true);\n this.fillDataTextStyle(newSeriesOption.data);\n var layoutMode = this.layoutMode;\n\n if (layoutMode) {\n mergeLayoutParam(this.option, newSeriesOption, layoutMode);\n }\n\n prepareSource(this);\n var data = this.getInitialData(newSeriesOption, ecModel);\n wrapData(data, this);\n this.dataTask.dirty();\n this.dataTask.context.data = data;\n inner(this).dataBeforeProcessed = data;\n autoSeriesName(this);\n },\n fillDataTextStyle: function (data) {\n // Default data label emphasis `show`\n // FIXME Tree structure data ?\n // FIXME Performance ?\n if (data && !zrUtil.isTypedArray(data)) {\n var props = ['show'];\n\n for (var i = 0; i < data.length; i++) {\n if (data[i] && data[i].label) {\n modelUtil.defaultEmphasis(data[i], 'label', props);\n }\n }\n }\n },\n\n /**\n * Init a data structure from data related option in series\n * Must be overwritten\n */\n getInitialData: function () {},\n\n /**\n * Append data to list\n * @param {Object} params\n * @param {Array|TypedArray} params.data\n */\n appendData: function (params) {\n // FIXME ???\n // (1) If data from dataset, forbidden append.\n // (2) support append data of dataset.\n var data = this.getRawData();\n data.appendData(params.data);\n },\n\n /**\n * Consider some method like `filter`, `map` need make new data,\n * We should make sure that `seriesModel.getData()` get correct\n * data in the stream procedure. So we fetch data from upstream\n * each time `task.perform` called.\n * @param {string} [dataType]\n * @return {module:echarts/data/List}\n */\n getData: function (dataType) {\n var task = getCurrentTask(this);\n\n if (task) {\n var data = task.context.data;\n return dataType == null ? data : data.getLinkedData(dataType);\n } else {\n // When series is not alive (that may happen when click toolbox\n // restore or setOption with not merge mode), series data may\n // be still need to judge animation or something when graphic\n // elements want to know whether fade out.\n return inner(this).data;\n }\n },\n\n /**\n * @param {module:echarts/data/List} data\n */\n setData: function (data) {\n var task = getCurrentTask(this);\n\n if (task) {\n var context = task.context; // Consider case: filter, data sample.\n\n if (context.data !== data && task.modifyOutputEnd) {\n task.setOutputEnd(data.count());\n }\n\n context.outputData = data; // Caution: setData should update context.data,\n // Because getData may be called multiply in a\n // single stage and expect to get the data just\n // set. (For example, AxisProxy, x y both call\n // getData and setDate sequentially).\n // So the context.data should be fetched from\n // upstream each time when a stage starts to be\n // performed.\n\n if (task !== this.dataTask) {\n context.data = data;\n }\n }\n\n inner(this).data = data;\n },\n\n /**\n * @see {module:echarts/data/helper/sourceHelper#getSource}\n * @return {module:echarts/data/Source} source\n */\n getSource: function () {\n return getSource(this);\n },\n\n /**\n * Get data before processed\n * @return {module:echarts/data/List}\n */\n getRawData: function () {\n return inner(this).dataBeforeProcessed;\n },\n\n /**\n * Get base axis if has coordinate system and has axis.\n * By default use coordSys.getBaseAxis();\n * Can be overrided for some chart.\n * @return {type} description\n */\n getBaseAxis: function () {\n var coordSys = this.coordinateSystem;\n return coordSys && coordSys.getBaseAxis && coordSys.getBaseAxis();\n },\n // FIXME\n\n /**\n * Default tooltip formatter\n *\n * @param {number} dataIndex\n * @param {boolean} [multipleSeries=false]\n * @param {number} [dataType]\n * @param {string} [renderMode='html'] valid values: 'html' and 'richText'.\n * 'html' is used for rendering tooltip in extra DOM form, and the result\n * string is used as DOM HTML content.\n * 'richText' is used for rendering tooltip in rich text form, for those where\n * DOM operation is not supported.\n * @return {Object} formatted tooltip with `html` and `markers`\n */\n formatTooltip: function (dataIndex, multipleSeries, dataType, renderMode) {\n var series = this;\n renderMode = renderMode || 'html';\n var newLine = renderMode === 'html' ? '
' : '\\n';\n var isRichText = renderMode === 'richText';\n var markers = {};\n var markerId = 0;\n\n function formatArrayValue(value) {\n // ??? TODO refactor these logic.\n // check: category-no-encode-has-axis-data in dataset.html\n var vertially = zrUtil.reduce(value, function (vertially, val, idx) {\n var dimItem = data.getDimensionInfo(idx);\n return vertially |= dimItem && dimItem.tooltip !== false && dimItem.displayName != null;\n }, 0);\n var result = [];\n tooltipDims.length ? zrUtil.each(tooltipDims, function (dim) {\n setEachItem(retrieveRawValue(data, dataIndex, dim), dim);\n }) // By default, all dims is used on tooltip.\n : zrUtil.each(value, setEachItem);\n\n function setEachItem(val, dim) {\n var dimInfo = data.getDimensionInfo(dim); // If `dimInfo.tooltip` is not set, show tooltip.\n\n if (!dimInfo || dimInfo.otherDims.tooltip === false) {\n return;\n }\n\n var dimType = dimInfo.type;\n var markName = 'sub' + series.seriesIndex + 'at' + markerId;\n var dimHead = getTooltipMarker({\n color: color,\n type: 'subItem',\n renderMode: renderMode,\n markerId: markName\n });\n var dimHeadStr = typeof dimHead === 'string' ? dimHead : dimHead.content;\n var valStr = (vertially ? dimHeadStr + encodeHTML(dimInfo.displayName || '-') + ': ' : '') + // FIXME should not format time for raw data?\n encodeHTML(dimType === 'ordinal' ? val + '' : dimType === 'time' ? multipleSeries ? '' : formatTime('yyyy/MM/dd hh:mm:ss', val) : addCommas(val));\n valStr && result.push(valStr);\n\n if (isRichText) {\n markers[markName] = color;\n ++markerId;\n }\n }\n\n var newLine = vertially ? isRichText ? '\\n' : '
' : '';\n var content = newLine + result.join(newLine || ', ');\n return {\n renderMode: renderMode,\n content: content,\n style: markers\n };\n }\n\n function formatSingleValue(val) {\n // return encodeHTML(addCommas(val));\n return {\n renderMode: renderMode,\n content: encodeHTML(addCommas(val)),\n style: markers\n };\n }\n\n var data = this.getData();\n var tooltipDims = data.mapDimension('defaultedTooltip', true);\n var tooltipDimLen = tooltipDims.length;\n var value = this.getRawValue(dataIndex);\n var isValueArr = zrUtil.isArray(value);\n var color = data.getItemVisual(dataIndex, 'color');\n\n if (zrUtil.isObject(color) && color.colorStops) {\n color = (color.colorStops[0] || {}).color;\n }\n\n color = color || 'transparent'; // Complicated rule for pretty tooltip.\n\n var formattedValue = tooltipDimLen > 1 || isValueArr && !tooltipDimLen ? formatArrayValue(value) : tooltipDimLen ? formatSingleValue(retrieveRawValue(data, dataIndex, tooltipDims[0])) : formatSingleValue(isValueArr ? value[0] : value);\n var content = formattedValue.content;\n var markName = series.seriesIndex + 'at' + markerId;\n var colorEl = getTooltipMarker({\n color: color,\n type: 'item',\n renderMode: renderMode,\n markerId: markName\n });\n markers[markName] = color;\n ++markerId;\n var name = data.getName(dataIndex);\n var seriesName = this.name;\n\n if (!modelUtil.isNameSpecified(this)) {\n seriesName = '';\n }\n\n seriesName = seriesName ? encodeHTML(seriesName) + (!multipleSeries ? newLine : ': ') : '';\n var colorStr = typeof colorEl === 'string' ? colorEl : colorEl.content;\n var html = !multipleSeries ? seriesName + colorStr + (name ? encodeHTML(name) + ': ' + content : content) : colorStr + seriesName + content;\n return {\n html: html,\n markers: markers\n };\n },\n\n /**\n * @return {boolean}\n */\n isAnimationEnabled: function () {\n if (env.node) {\n return false;\n }\n\n var animationEnabled = this.getShallow('animation');\n\n if (animationEnabled) {\n if (this.getData().count() > this.getShallow('animationThreshold')) {\n animationEnabled = false;\n }\n }\n\n return animationEnabled;\n },\n restoreData: function () {\n this.dataTask.dirty();\n },\n getColorFromPalette: function (name, scope, requestColorNum) {\n var ecModel = this.ecModel; // PENDING\n\n var color = colorPaletteMixin.getColorFromPalette.call(this, name, scope, requestColorNum);\n\n if (!color) {\n color = ecModel.getColorFromPalette(name, scope, requestColorNum);\n }\n\n return color;\n },\n\n /**\n * Use `data.mapDimension(coordDim, true)` instead.\n * @deprecated\n */\n coordDimToDataDim: function (coordDim) {\n return this.getRawData().mapDimension(coordDim, true);\n },\n\n /**\n * Get progressive rendering count each step\n * @return {number}\n */\n getProgressive: function () {\n return this.get('progressive');\n },\n\n /**\n * Get progressive rendering count each step\n * @return {number}\n */\n getProgressiveThreshold: function () {\n return this.get('progressiveThreshold');\n },\n\n /**\n * Get data indices for show tooltip content. See tooltip.\n * @abstract\n * @param {Array.|string} dim\n * @param {Array.} value\n * @param {module:echarts/coord/single/SingleAxis} baseAxis\n * @return {Object} {dataIndices, nestestValue}.\n */\n getAxisTooltipData: null,\n\n /**\n * See tooltip.\n * @abstract\n * @param {number} dataIndex\n * @return {Array.} Point of tooltip. null/undefined can be returned.\n */\n getTooltipPosition: null,\n\n /**\n * @see {module:echarts/stream/Scheduler}\n */\n pipeTask: null,\n\n /**\n * Convinient for override in extended class.\n * @protected\n * @type {Function}\n */\n preventIncremental: null,\n\n /**\n * @public\n * @readOnly\n * @type {Object}\n */\n pipelineContext: null\n});\nzrUtil.mixin(SeriesModel, dataFormatMixin);\nzrUtil.mixin(SeriesModel, colorPaletteMixin);\n/**\n * MUST be called after `prepareSource` called\n * Here we need to make auto series, especially for auto legend. But we\n * do not modify series.name in option to avoid side effects.\n */\n\nfunction autoSeriesName(seriesModel) {\n // User specified name has higher priority, otherwise it may cause\n // series can not be queried unexpectedly.\n var name = seriesModel.name;\n\n if (!modelUtil.isNameSpecified(seriesModel)) {\n seriesModel.name = getSeriesAutoName(seriesModel) || name;\n }\n}\n\nfunction getSeriesAutoName(seriesModel) {\n var data = seriesModel.getRawData();\n var dataDims = data.mapDimension('seriesName', true);\n var nameArr = [];\n zrUtil.each(dataDims, function (dataDim) {\n var dimInfo = data.getDimensionInfo(dataDim);\n dimInfo.displayName && nameArr.push(dimInfo.displayName);\n });\n return nameArr.join(' ');\n}\n\nfunction dataTaskCount(context) {\n return context.model.getRawData().count();\n}\n\nfunction dataTaskReset(context) {\n var seriesModel = context.model;\n seriesModel.setData(seriesModel.getRawData().cloneShallow());\n return dataTaskProgress;\n}\n\nfunction dataTaskProgress(param, context) {\n // Avoid repead cloneShallow when data just created in reset.\n if (context.outputData && param.end > context.outputData.count()) {\n context.model.getRawData().cloneShallow(context.outputData);\n }\n} // TODO refactor\n\n\nfunction wrapData(data, seriesModel) {\n zrUtil.each(data.CHANGABLE_METHODS, function (methodName) {\n data.wrapMethod(methodName, zrUtil.curry(onDataSelfChange, seriesModel));\n });\n}\n\nfunction onDataSelfChange(seriesModel) {\n var task = getCurrentTask(seriesModel);\n\n if (task) {\n // Consider case: filter, selectRange\n task.setOutputEnd(this.count());\n }\n}\n\nfunction getCurrentTask(seriesModel) {\n var scheduler = (seriesModel.ecModel || {}).scheduler;\n var pipeline = scheduler && scheduler.getPipeline(seriesModel.uid);\n\n if (pipeline) {\n // When pipline finished, the currrentTask keep the last\n // task (renderTask).\n var task = pipeline.currentTask;\n\n if (task) {\n var agentStubMap = task.agentStubMap;\n\n if (agentStubMap) {\n task = agentStubMap.get(seriesModel.uid);\n }\n }\n\n return task;\n }\n}\n\nvar _default = SeriesModel;\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\nvar makeStyleMapper = require(\"./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 getItemStyle = makeStyleMapper([['fill', 'color'], ['stroke', 'borderColor'], ['lineWidth', 'borderWidth'], ['opacity'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['shadowColor'], ['textPosition'], ['textAlign']]);\nvar _default = {\n getItemStyle: function (excludes, includes) {\n var style = getItemStyle(this, excludes, includes);\n var lineDash = this.getBorderLineDash();\n lineDash && (style.lineDash = lineDash);\n return style;\n },\n getBorderLineDash: function () {\n var lineType = this.get('borderType');\n return lineType === 'solid' || lineType == null ? null : lineType === 'dashed' ? [5, 5] : [1, 1];\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 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 * @class\n * @param {Object|DataDimensionInfo} [opt] All of the fields will be shallow copied.\n */\nfunction DataDimensionInfo(opt) {\n if (opt != null) {\n zrUtil.extend(this, opt);\n }\n /**\n * Dimension name.\n * Mandatory.\n * @type {string}\n */\n // this.name;\n\n /**\n * The origin name in dimsDef, see source helper.\n * If displayName given, the tooltip will displayed vertically.\n * Optional.\n * @type {string}\n */\n // this.displayName;\n\n /**\n * Which coordSys dimension this dimension mapped to.\n * A `coordDim` can be a \"coordSysDim\" that the coordSys required\n * (for example, an item in `coordSysDims` of `model/referHelper#CoordSysInfo`),\n * or an generated \"extra coord name\" if does not mapped to any \"coordSysDim\"\n * (That is determined by whether `isExtraCoord` is `true`).\n * Mandatory.\n * @type {string}\n */\n // this.coordDim;\n\n /**\n * The index of this dimension in `series.encode[coordDim]`.\n * Mandatory.\n * @type {number}\n */\n // this.coordDimIndex;\n\n /**\n * Dimension type. The enumerable values are the key of\n * `dataCtors` of `data/List`.\n * Optional.\n * @type {string}\n */\n // this.type;\n\n /**\n * This index of this dimension info in `data/List#_dimensionInfos`.\n * Mandatory after added to `data/List`.\n * @type {number}\n */\n // this.index;\n\n /**\n * The format of `otherDims` is:\n * ```js\n * {\n * tooltip: number optional,\n * label: number optional,\n * itemName: number optional,\n * seriesName: number optional,\n * }\n * ```\n *\n * A `series.encode` can specified these fields:\n * ```js\n * encode: {\n * // \"3, 1, 5\" is the index of data dimension.\n * tooltip: [3, 1, 5],\n * label: [0, 3],\n * ...\n * }\n * ```\n * `otherDims` is the parse result of the `series.encode` above, like:\n * ```js\n * // Suppose the index of this data dimension is `3`.\n * this.otherDims = {\n * // `3` is at the index `0` of the `encode.tooltip`\n * tooltip: 0,\n * // `3` is at the index `1` of the `encode.tooltip`\n * label: 1\n * };\n * ```\n *\n * This prop should never be `null`/`undefined` after initialized.\n * @type {Object}\n */\n\n\n this.otherDims = {};\n /**\n * Be `true` if this dimension is not mapped to any \"coordSysDim\" that the\n * \"coordSys\" required.\n * Mandatory.\n * @type {boolean}\n */\n // this.isExtraCoord;\n\n /**\n * @type {module:data/OrdinalMeta}\n */\n // this.ordinalMeta;\n\n /**\n * Whether to create inverted indices.\n * @type {boolean}\n */\n // this.createInvertedIndices;\n}\n\n;\nvar _default = DataDimensionInfo;\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 _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 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*/\nfunction rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, gridModel) {\n var axis = axisModel.axis;\n\n if (axis.scale.isBlank()) {\n return;\n }\n\n var splitAreaModel = axisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var gridRect = gridModel.coordinateSystem.getRect();\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitAreaModel,\n clamp: true\n });\n\n if (!ticksCoords.length) {\n return;\n } // For Making appropriate splitArea animation, the color and anid\n // should be corresponding to previous one if possible.\n\n\n var areaColorsLen = areaColors.length;\n var lastSplitAreaColors = axisView.__splitAreaColors;\n var newSplitAreaColors = zrUtil.createHashMap();\n var colorIndex = 0;\n\n if (lastSplitAreaColors) {\n for (var i = 0; i < ticksCoords.length; i++) {\n var cIndex = lastSplitAreaColors.get(ticksCoords[i].tickValue);\n\n if (cIndex != null) {\n colorIndex = (cIndex + (areaColorsLen - 1) * i) % areaColorsLen;\n break;\n }\n }\n }\n\n var prev = axis.toGlobalCoord(ticksCoords[0].coord);\n var areaStyle = areaStyleModel.getAreaStyle();\n areaColors = zrUtil.isArray(areaColors) ? areaColors : [areaColors];\n\n for (var i = 1; i < ticksCoords.length; i++) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n var x;\n var y;\n var width;\n var height;\n\n if (axis.isHorizontal()) {\n x = prev;\n y = gridRect.y;\n width = tickCoord - x;\n height = gridRect.height;\n prev = x + width;\n } else {\n x = gridRect.x;\n y = prev;\n width = gridRect.width;\n height = tickCoord - y;\n prev = y + height;\n }\n\n var tickValue = ticksCoords[i - 1].tickValue;\n tickValue != null && newSplitAreaColors.set(tickValue, colorIndex);\n axisGroup.add(new graphic.Rect({\n anid: tickValue != null ? 'area_' + tickValue : null,\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n },\n style: zrUtil.defaults({\n fill: areaColors[colorIndex]\n }, areaStyle),\n silent: true\n }));\n colorIndex = (colorIndex + 1) % areaColorsLen;\n }\n\n axisView.__splitAreaColors = newSplitAreaColors;\n}\n\nfunction rectCoordAxisHandleRemove(axisView) {\n axisView.__splitAreaColors = null;\n}\n\nexports.rectCoordAxisBuildSplitArea = rectCoordAxisBuildSplitArea;\nexports.rectCoordAxisHandleRemove = rectCoordAxisHandleRemove;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 isObject = _util.isObject;\nvar each = _util.each;\nvar map = _util.map;\nvar indexOf = _util.indexOf;\nvar retrieve = _util.retrieve;\n\nvar _layout = require(\"../../util/layout\");\n\nvar getLayoutRect = _layout.getLayoutRect;\n\nvar _axisHelper = require(\"../../coord/axisHelper\");\n\nvar createScaleByModel = _axisHelper.createScaleByModel;\nvar ifAxisCrossZero = _axisHelper.ifAxisCrossZero;\nvar niceScaleExtent = _axisHelper.niceScaleExtent;\nvar estimateLabelUnionRect = _axisHelper.estimateLabelUnionRect;\n\nvar Cartesian2D = require(\"./Cartesian2D\");\n\nvar Axis2D = require(\"./Axis2D\");\n\nvar CoordinateSystem = require(\"../../CoordinateSystem\");\n\nvar _dataStackHelper = require(\"../../data/helper/dataStackHelper\");\n\nvar getStackedDimension = _dataStackHelper.getStackedDimension;\n\nrequire(\"./GridModel\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * Grid is a region which contains at most 4 cartesian systems\n *\n * TODO Default cartesian\n */\n// Depends on GridModel, AxisModel, which performs preprocess.\n\n/**\n * Check if the axis is used in the specified grid\n * @inner\n */\nfunction isAxisUsedInTheGrid(axisModel, gridModel, ecModel) {\n return axisModel.getCoordSysModel() === gridModel;\n}\n\nfunction Grid(gridModel, ecModel, api) {\n /**\n * @type {Object.}\n * @private\n */\n this._coordsMap = {};\n /**\n * @type {Array.}\n * @private\n */\n\n this._coordsList = [];\n /**\n * @type {Object.>}\n * @private\n */\n\n this._axesMap = {};\n /**\n * @type {Array.}\n * @private\n */\n\n this._axesList = [];\n\n this._initCartesian(gridModel, ecModel, api);\n\n this.model = gridModel;\n}\n\nvar gridProto = Grid.prototype;\ngridProto.type = 'grid';\ngridProto.axisPointerEnabled = true;\n\ngridProto.getRect = function () {\n return this._rect;\n};\n\ngridProto.update = function (ecModel, api) {\n var axesMap = this._axesMap;\n\n this._updateScale(ecModel, this.model);\n\n each(axesMap.x, function (xAxis) {\n niceScaleExtent(xAxis.scale, xAxis.model);\n });\n each(axesMap.y, function (yAxis) {\n niceScaleExtent(yAxis.scale, yAxis.model);\n }); // Key: axisDim_axisIndex, value: boolean, whether onZero target.\n\n var onZeroRecords = {};\n each(axesMap.x, function (xAxis) {\n fixAxisOnZero(axesMap, 'y', xAxis, onZeroRecords);\n });\n each(axesMap.y, function (yAxis) {\n fixAxisOnZero(axesMap, 'x', yAxis, onZeroRecords);\n }); // Resize again if containLabel is enabled\n // FIXME It may cause getting wrong grid size in data processing stage\n\n this.resize(this.model, api);\n};\n\nfunction fixAxisOnZero(axesMap, otherAxisDim, axis, onZeroRecords) {\n axis.getAxesOnZeroOf = function () {\n // TODO: onZero of multiple axes.\n return otherAxisOnZeroOf ? [otherAxisOnZeroOf] : [];\n }; // onZero can not be enabled in these two situations:\n // 1. When any other axis is a category axis.\n // 2. When no axis is cross 0 point.\n\n\n var otherAxes = axesMap[otherAxisDim];\n var otherAxisOnZeroOf;\n var axisModel = axis.model;\n var onZero = axisModel.get('axisLine.onZero');\n var onZeroAxisIndex = axisModel.get('axisLine.onZeroAxisIndex');\n\n if (!onZero) {\n return;\n } // If target axis is specified.\n\n\n if (onZeroAxisIndex != null) {\n if (canOnZeroToAxis(otherAxes[onZeroAxisIndex])) {\n otherAxisOnZeroOf = otherAxes[onZeroAxisIndex];\n }\n } else {\n // Find the first available other axis.\n for (var idx in otherAxes) {\n if (otherAxes.hasOwnProperty(idx) && canOnZeroToAxis(otherAxes[idx]) // Consider that two Y axes on one value axis,\n // if both onZero, the two Y axes overlap.\n && !onZeroRecords[getOnZeroRecordKey(otherAxes[idx])]) {\n otherAxisOnZeroOf = otherAxes[idx];\n break;\n }\n }\n }\n\n if (otherAxisOnZeroOf) {\n onZeroRecords[getOnZeroRecordKey(otherAxisOnZeroOf)] = true;\n }\n\n function getOnZeroRecordKey(axis) {\n return axis.dim + '_' + axis.index;\n }\n}\n\nfunction canOnZeroToAxis(axis) {\n return axis && axis.type !== 'category' && axis.type !== 'time' && ifAxisCrossZero(axis);\n}\n/**\n * Resize the grid\n * @param {module:echarts/coord/cartesian/GridModel} gridModel\n * @param {module:echarts/ExtensionAPI} api\n */\n\n\ngridProto.resize = function (gridModel, api, ignoreContainLabel) {\n var gridRect = getLayoutRect(gridModel.getBoxLayoutParams(), {\n width: api.getWidth(),\n height: api.getHeight()\n });\n this._rect = gridRect;\n var axesList = this._axesList;\n adjustAxes(); // Minus label size\n\n if (!ignoreContainLabel && gridModel.get('containLabel')) {\n each(axesList, function (axis) {\n if (!axis.model.get('axisLabel.inside')) {\n var labelUnionRect = estimateLabelUnionRect(axis);\n\n if (labelUnionRect) {\n var dim = axis.isHorizontal() ? 'height' : 'width';\n var margin = axis.model.get('axisLabel.margin');\n gridRect[dim] -= labelUnionRect[dim] + margin;\n\n if (axis.position === 'top') {\n gridRect.y += labelUnionRect.height + margin;\n } else if (axis.position === 'left') {\n gridRect.x += labelUnionRect.width + margin;\n }\n }\n }\n });\n adjustAxes();\n }\n\n function adjustAxes() {\n each(axesList, function (axis) {\n var isHorizontal = axis.isHorizontal();\n var extent = isHorizontal ? [0, gridRect.width] : [0, gridRect.height];\n var idx = axis.inverse ? 1 : 0;\n axis.setExtent(extent[idx], extent[1 - idx]);\n updateAxisTransform(axis, isHorizontal ? gridRect.x : gridRect.y);\n });\n }\n};\n/**\n * @param {string} axisType\n * @param {number} [axisIndex]\n */\n\n\ngridProto.getAxis = function (axisType, axisIndex) {\n var axesMapOnDim = this._axesMap[axisType];\n\n if (axesMapOnDim != null) {\n if (axisIndex == null) {\n // Find first axis\n for (var name in axesMapOnDim) {\n if (axesMapOnDim.hasOwnProperty(name)) {\n return axesMapOnDim[name];\n }\n }\n }\n\n return axesMapOnDim[axisIndex];\n }\n};\n/**\n * @return {Array.}\n */\n\n\ngridProto.getAxes = function () {\n return this._axesList.slice();\n};\n/**\n * Usage:\n * grid.getCartesian(xAxisIndex, yAxisIndex);\n * grid.getCartesian(xAxisIndex);\n * grid.getCartesian(null, yAxisIndex);\n * grid.getCartesian({xAxisIndex: ..., yAxisIndex: ...});\n *\n * @param {number|Object} [xAxisIndex]\n * @param {number} [yAxisIndex]\n */\n\n\ngridProto.getCartesian = function (xAxisIndex, yAxisIndex) {\n if (xAxisIndex != null && yAxisIndex != null) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n return this._coordsMap[key];\n }\n\n if (isObject(xAxisIndex)) {\n yAxisIndex = xAxisIndex.yAxisIndex;\n xAxisIndex = xAxisIndex.xAxisIndex;\n } // When only xAxisIndex or yAxisIndex given, find its first cartesian.\n\n\n for (var i = 0, coordList = this._coordsList; i < coordList.length; i++) {\n if (coordList[i].getAxis('x').index === xAxisIndex || coordList[i].getAxis('y').index === yAxisIndex) {\n return coordList[i];\n }\n }\n};\n\ngridProto.getCartesians = function () {\n return this._coordsList.slice();\n};\n/**\n * @implements\n * see {module:echarts/CoodinateSystem}\n */\n\n\ngridProto.convertToPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(ecModel, finder);\n\n return target.cartesian ? target.cartesian.dataToPoint(value) : target.axis ? target.axis.toGlobalCoord(target.axis.dataToCoord(value)) : null;\n};\n/**\n * @implements\n * see {module:echarts/CoodinateSystem}\n */\n\n\ngridProto.convertFromPixel = function (ecModel, finder, value) {\n var target = this._findConvertTarget(ecModel, finder);\n\n return target.cartesian ? target.cartesian.pointToData(value) : target.axis ? target.axis.coordToData(target.axis.toLocalCoord(value)) : null;\n};\n/**\n * @inner\n */\n\n\ngridProto._findConvertTarget = function (ecModel, finder) {\n var seriesModel = finder.seriesModel;\n var xAxisModel = finder.xAxisModel || seriesModel && seriesModel.getReferringComponents('xAxis')[0];\n var yAxisModel = finder.yAxisModel || seriesModel && seriesModel.getReferringComponents('yAxis')[0];\n var gridModel = finder.gridModel;\n var coordsList = this._coordsList;\n var cartesian;\n var axis;\n\n if (seriesModel) {\n cartesian = seriesModel.coordinateSystem;\n indexOf(coordsList, cartesian) < 0 && (cartesian = null);\n } else if (xAxisModel && yAxisModel) {\n cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n } else if (xAxisModel) {\n axis = this.getAxis('x', xAxisModel.componentIndex);\n } else if (yAxisModel) {\n axis = this.getAxis('y', yAxisModel.componentIndex);\n } // Lowest priority.\n else if (gridModel) {\n var grid = gridModel.coordinateSystem;\n\n if (grid === this) {\n cartesian = this._coordsList[0];\n }\n }\n\n return {\n cartesian: cartesian,\n axis: axis\n };\n};\n/**\n * @implements\n * see {module:echarts/CoodinateSystem}\n */\n\n\ngridProto.containPoint = function (point) {\n var coord = this._coordsList[0];\n\n if (coord) {\n return coord.containPoint(point);\n }\n};\n/**\n * Initialize cartesian coordinate systems\n * @private\n */\n\n\ngridProto._initCartesian = function (gridModel, ecModel, api) {\n var axisPositionUsed = {\n left: false,\n right: false,\n top: false,\n bottom: false\n };\n var axesMap = {\n x: {},\n y: {}\n };\n var axesCount = {\n x: 0,\n y: 0\n }; /// Create axis\n\n ecModel.eachComponent('xAxis', createAxisCreator('x'), this);\n ecModel.eachComponent('yAxis', createAxisCreator('y'), this);\n\n if (!axesCount.x || !axesCount.y) {\n // Roll back when there no either x or y axis\n this._axesMap = {};\n this._axesList = [];\n return;\n }\n\n this._axesMap = axesMap; /// Create cartesian2d\n\n each(axesMap.x, function (xAxis, xAxisIndex) {\n each(axesMap.y, function (yAxis, yAxisIndex) {\n var key = 'x' + xAxisIndex + 'y' + yAxisIndex;\n var cartesian = new Cartesian2D(key);\n cartesian.grid = this;\n cartesian.model = gridModel;\n this._coordsMap[key] = cartesian;\n\n this._coordsList.push(cartesian);\n\n cartesian.addAxis(xAxis);\n cartesian.addAxis(yAxis);\n }, this);\n }, this);\n\n function createAxisCreator(axisType) {\n return function (axisModel, idx) {\n if (!isAxisUsedInTheGrid(axisModel, gridModel, ecModel)) {\n return;\n }\n\n var axisPosition = axisModel.get('position');\n\n if (axisType === 'x') {\n // Fix position\n if (axisPosition !== 'top' && axisPosition !== 'bottom') {\n // Default bottom of X\n axisPosition = axisPositionUsed.bottom ? 'top' : 'bottom';\n }\n } else {\n // Fix position\n if (axisPosition !== 'left' && axisPosition !== 'right') {\n // Default left of Y\n axisPosition = axisPositionUsed.left ? 'right' : 'left';\n }\n }\n\n axisPositionUsed[axisPosition] = true;\n var axis = new Axis2D(axisType, createScaleByModel(axisModel), [0, 0], axisModel.get('type'), axisPosition);\n var isCategory = axis.type === 'category';\n axis.onBand = isCategory && axisModel.get('boundaryGap');\n axis.inverse = axisModel.get('inverse'); // Inject axis into axisModel\n\n axisModel.axis = axis; // Inject axisModel into axis\n\n axis.model = axisModel; // Inject grid info axis\n\n axis.grid = this; // Index of axis, can be used as key\n\n axis.index = idx;\n\n this._axesList.push(axis);\n\n axesMap[axisType][idx] = axis;\n axesCount[axisType]++;\n };\n }\n};\n/**\n * Update cartesian properties from series\n * @param {module:echarts/model/Option} option\n * @private\n */\n\n\ngridProto._updateScale = function (ecModel, gridModel) {\n // Reset scale\n each(this._axesList, function (axis) {\n axis.scale.setExtent(Infinity, -Infinity);\n });\n ecModel.eachSeries(function (seriesModel) {\n if (isCartesian2D(seriesModel)) {\n var axesModels = findAxesModels(seriesModel, ecModel);\n var xAxisModel = axesModels[0];\n var yAxisModel = axesModels[1];\n\n if (!isAxisUsedInTheGrid(xAxisModel, gridModel, ecModel) || !isAxisUsedInTheGrid(yAxisModel, gridModel, ecModel)) {\n return;\n }\n\n var cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n var data = seriesModel.getData();\n var xAxis = cartesian.getAxis('x');\n var yAxis = cartesian.getAxis('y');\n\n if (data.type === 'list') {\n unionExtent(data, xAxis, seriesModel);\n unionExtent(data, yAxis, seriesModel);\n }\n }\n }, this);\n\n function unionExtent(data, axis, seriesModel) {\n each(data.mapDimension(axis.dim, true), function (dim) {\n axis.scale.unionExtentFromData( // For example, the extent of the orginal dimension\n // is [0.1, 0.5], the extent of the `stackResultDimension`\n // is [7, 9], the final extent should not include [0.1, 0.5].\n data, getStackedDimension(data, dim));\n });\n }\n};\n/**\n * @param {string} [dim] 'x' or 'y' or 'auto' or null/undefined\n * @return {Object} {baseAxes: [], otherAxes: []}\n */\n\n\ngridProto.getTooltipAxes = function (dim) {\n var baseAxes = [];\n var otherAxes = [];\n each(this.getCartesians(), function (cartesian) {\n var baseAxis = dim != null && dim !== 'auto' ? cartesian.getAxis(dim) : cartesian.getBaseAxis();\n var otherAxis = cartesian.getOtherAxis(baseAxis);\n indexOf(baseAxes, baseAxis) < 0 && baseAxes.push(baseAxis);\n indexOf(otherAxes, otherAxis) < 0 && otherAxes.push(otherAxis);\n });\n return {\n baseAxes: baseAxes,\n otherAxes: otherAxes\n };\n};\n/**\n * @inner\n */\n\n\nfunction updateAxisTransform(axis, coordBase) {\n var axisExtent = axis.getExtent();\n var axisExtentSum = axisExtent[0] + axisExtent[1]; // Fast transform\n\n axis.toGlobalCoord = axis.dim === 'x' ? function (coord) {\n return coord + coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n axis.toLocalCoord = axis.dim === 'x' ? function (coord) {\n return coord - coordBase;\n } : function (coord) {\n return axisExtentSum - coord + coordBase;\n };\n}\n\nvar axesTypes = ['xAxis', 'yAxis'];\n/**\n * @inner\n */\n\nfunction findAxesModels(seriesModel, ecModel) {\n return map(axesTypes, function (axisType) {\n var axisModel = seriesModel.getReferringComponents(axisType)[0];\n return axisModel;\n });\n}\n/**\n * @inner\n */\n\n\nfunction isCartesian2D(seriesModel) {\n return seriesModel.get('coordinateSystem') === 'cartesian2d';\n}\n\nGrid.create = function (ecModel, api) {\n var grids = [];\n ecModel.eachComponent('grid', function (gridModel, idx) {\n var grid = new Grid(gridModel, ecModel, api);\n grid.name = 'grid_' + idx; // dataSampling requires axis extent, so resize\n // should be performed in create stage.\n\n grid.resize(gridModel, api, true);\n gridModel.coordinateSystem = grid;\n grids.push(grid);\n }); // Inject the coordinateSystems into seriesModel\n\n ecModel.eachSeries(function (seriesModel) {\n if (!isCartesian2D(seriesModel)) {\n return;\n }\n\n var axesModels = findAxesModels(seriesModel, ecModel);\n var xAxisModel = axesModels[0];\n var yAxisModel = axesModels[1];\n var gridModel = xAxisModel.getCoordSysModel();\n var grid = gridModel.coordinateSystem;\n seriesModel.coordinateSystem = grid.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);\n });\n return grids;\n}; // For deciding which dimensions to use when creating list data\n\n\nGrid.dimensions = Grid.prototype.dimensions = Cartesian2D.prototype.dimensions;\nCoordinateSystem.register('cartesian2d', Grid);\nvar _default = Grid;\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 _config = require(\"../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar Model = require(\"../model/Model\");\n\nvar DataDiffer = require(\"./DataDiffer\");\n\nvar Source = require(\"./Source\");\n\nvar _dataProvider = require(\"./helper/dataProvider\");\n\nvar defaultDimValueGetters = _dataProvider.defaultDimValueGetters;\nvar DefaultDataProvider = _dataProvider.DefaultDataProvider;\n\nvar _dimensionHelper = require(\"./helper/dimensionHelper\");\n\nvar summarizeDimensions = _dimensionHelper.summarizeDimensions;\n\nvar DataDimensionInfo = require(\"./DataDimensionInfo\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 Float64Array, Int32Array, Uint32Array, Uint16Array */\n\n/**\n * List for data storage\n * @module echarts/data/List\n */\nvar isObject = zrUtil.isObject;\nvar UNDEFINED = 'undefined';\nvar INDEX_NOT_FOUND = -1; // Use prefix to avoid index to be the same as otherIdList[idx],\n// which will cause weird udpate animation.\n\nvar ID_PREFIX = 'e\\0\\0';\nvar dataCtors = {\n 'float': typeof Float64Array === UNDEFINED ? Array : Float64Array,\n 'int': typeof Int32Array === UNDEFINED ? Array : Int32Array,\n // Ordinal data type can be string or int\n 'ordinal': Array,\n 'number': Array,\n 'time': Array\n}; // Caution: MUST not use `new CtorUint32Array(arr, 0, len)`, because the Ctor of array is\n// different from the Ctor of typed array.\n\nvar CtorUint32Array = typeof Uint32Array === UNDEFINED ? Array : Uint32Array;\nvar CtorInt32Array = typeof Int32Array === UNDEFINED ? Array : Int32Array;\nvar CtorUint16Array = typeof Uint16Array === UNDEFINED ? Array : Uint16Array;\n\nfunction getIndicesCtor(list) {\n // The possible max value in this._indicies is always this._rawCount despite of filtering.\n return list._rawCount > 65535 ? CtorUint32Array : CtorUint16Array;\n}\n\nfunction cloneChunk(originalChunk) {\n var Ctor = originalChunk.constructor; // Only shallow clone is enough when Array.\n\n return Ctor === Array ? originalChunk.slice() : new Ctor(originalChunk);\n}\n\nvar TRANSFERABLE_PROPERTIES = ['hasItemOption', '_nameList', '_idList', '_invertedIndicesMap', '_rawData', '_chunkSize', '_chunkCount', '_dimValueGetter', '_count', '_rawCount', '_nameDimIdx', '_idDimIdx'];\nvar CLONE_PROPERTIES = ['_extent', '_approximateExtent', '_rawExtent'];\n\nfunction transferProperties(target, source) {\n zrUtil.each(TRANSFERABLE_PROPERTIES.concat(source.__wrappedMethods || []), function (propName) {\n if (source.hasOwnProperty(propName)) {\n target[propName] = source[propName];\n }\n });\n target.__wrappedMethods = source.__wrappedMethods;\n zrUtil.each(CLONE_PROPERTIES, function (propName) {\n target[propName] = zrUtil.clone(source[propName]);\n });\n target._calculationInfo = zrUtil.extend(source._calculationInfo);\n}\n/**\n * @constructor\n * @alias module:echarts/data/List\n *\n * @param {Array.} dimensions\n * For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...].\n * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius\n * @param {module:echarts/model/Model} hostModel\n */\n\n\nvar List = function (dimensions, hostModel) {\n dimensions = dimensions || ['x', 'y'];\n var dimensionInfos = {};\n var dimensionNames = [];\n var invertedIndicesMap = {};\n\n for (var i = 0; i < dimensions.length; i++) {\n // Use the original dimensions[i], where other flag props may exists.\n var dimensionInfo = dimensions[i];\n\n if (zrUtil.isString(dimensionInfo)) {\n dimensionInfo = new DataDimensionInfo({\n name: dimensionInfo\n });\n } else if (!(dimensionInfo instanceof DataDimensionInfo)) {\n dimensionInfo = new DataDimensionInfo(dimensionInfo);\n }\n\n var dimensionName = dimensionInfo.name;\n dimensionInfo.type = dimensionInfo.type || 'float';\n\n if (!dimensionInfo.coordDim) {\n dimensionInfo.coordDim = dimensionName;\n dimensionInfo.coordDimIndex = 0;\n }\n\n dimensionInfo.otherDims = dimensionInfo.otherDims || {};\n dimensionNames.push(dimensionName);\n dimensionInfos[dimensionName] = dimensionInfo;\n dimensionInfo.index = i;\n\n if (dimensionInfo.createInvertedIndices) {\n invertedIndicesMap[dimensionName] = [];\n }\n }\n /**\n * @readOnly\n * @type {Array.}\n */\n\n\n this.dimensions = dimensionNames;\n /**\n * Infomation of each data dimension, like data type.\n * @type {Object}\n */\n\n this._dimensionInfos = dimensionInfos;\n /**\n * @type {module:echarts/model/Model}\n */\n\n this.hostModel = hostModel;\n /**\n * @type {module:echarts/model/Model}\n */\n\n this.dataType;\n /**\n * Indices stores the indices of data subset after filtered.\n * This data subset will be used in chart.\n * @type {Array.}\n * @readOnly\n */\n\n this._indices = null;\n this._count = 0;\n this._rawCount = 0;\n /**\n * Data storage\n * @type {Object.>}\n * @private\n */\n\n this._storage = {};\n /**\n * @type {Array.}\n */\n\n this._nameList = [];\n /**\n * @type {Array.}\n */\n\n this._idList = [];\n /**\n * Models of data option is stored sparse for optimizing memory cost\n * @type {Array.}\n * @private\n */\n\n this._optionModels = [];\n /**\n * Global visual properties after visual coding\n * @type {Object}\n * @private\n */\n\n this._visual = {};\n /**\n * Globel layout properties.\n * @type {Object}\n * @private\n */\n\n this._layout = {};\n /**\n * Item visual properties after visual coding\n * @type {Array.}\n * @private\n */\n\n this._itemVisuals = [];\n /**\n * Key: visual type, Value: boolean\n * @type {Object}\n * @readOnly\n */\n\n this.hasItemVisual = {};\n /**\n * Item layout properties after layout\n * @type {Array.}\n * @private\n */\n\n this._itemLayouts = [];\n /**\n * Graphic elemnents\n * @type {Array.}\n * @private\n */\n\n this._graphicEls = [];\n /**\n * Max size of each chunk.\n * @type {number}\n * @private\n */\n\n this._chunkSize = 1e5;\n /**\n * @type {number}\n * @private\n */\n\n this._chunkCount = 0;\n /**\n * @type {Array.}\n * @private\n */\n\n this._rawData;\n /**\n * Raw extent will not be cloned, but only transfered.\n * It will not be calculated util needed.\n * key: dim,\n * value: {end: number, extent: Array.}\n * @type {Object}\n * @private\n */\n\n this._rawExtent = {};\n /**\n * @type {Object}\n * @private\n */\n\n this._extent = {};\n /**\n * key: dim\n * value: extent\n * @type {Object}\n * @private\n */\n\n this._approximateExtent = {};\n /**\n * Cache summary info for fast visit. See \"dimensionHelper\".\n * @type {Object}\n * @private\n */\n\n this._dimensionsSummary = summarizeDimensions(this);\n /**\n * @type {Object.}\n * @private\n */\n\n this._invertedIndicesMap = invertedIndicesMap;\n /**\n * @type {Object}\n * @private\n */\n\n this._calculationInfo = {};\n /**\n * User output info of this data.\n * DO NOT use it in other places!\n *\n * When preparing user params for user callbacks, we have\n * to clone these inner data structures to prevent users\n * from modifying them to effect built-in logic. And for\n * performance consideration we make this `userOutput` to\n * avoid clone them too many times.\n *\n * @type {Object}\n * @readOnly\n */\n\n this.userOutput = this._dimensionsSummary.userOutput;\n};\n\nvar listProto = List.prototype;\nlistProto.type = 'list';\n/**\n * If each data item has it's own option\n * @type {boolean}\n */\n\nlistProto.hasItemOption = true;\n/**\n * The meanings of the input parameter `dim`:\n *\n * + If dim is a number (e.g., `1`), it means the index of the dimension.\n * For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'.\n * + If dim is a number-like string (e.g., `\"1\"`):\n * + If there is the same concrete dim name defined in `this.dimensions`, it means that concrete name.\n * + If not, it will be converted to a number, which means the index of the dimension.\n * (why? because of the backward compatbility. We have been tolerating number-like string in\n * dimension setting, although now it seems that it is not a good idea.)\n * For example, `visualMap[i].dimension: \"1\"` is the same meaning as `visualMap[i].dimension: 1`,\n * if no dimension name is defined as `\"1\"`.\n * + If dim is a not-number-like string, it means the concrete dim name.\n * For example, it can be be default name `\"x\"`, `\"y\"`, `\"z\"`, `\"lng\"`, `\"lat\"`, `\"angle\"`, `\"radius\"`,\n * or customized in `dimensions` property of option like `\"age\"`.\n *\n * Get dimension name\n * @param {string|number} dim See above.\n * @return {string} Concrete dim name.\n */\n\nlistProto.getDimension = function (dim) {\n if (typeof dim === 'number' // If being a number-like string but not being defined a dimension name.\n || !isNaN(dim) && !this._dimensionInfos.hasOwnProperty(dim)) {\n dim = this.dimensions[dim];\n }\n\n return dim;\n};\n/**\n * Get type and calculation info of particular dimension\n * @param {string|number} dim\n * Dimension can be concrete names like x, y, z, lng, lat, angle, radius\n * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius'\n */\n\n\nlistProto.getDimensionInfo = function (dim) {\n // Do not clone, because there may be categories in dimInfo.\n return this._dimensionInfos[this.getDimension(dim)];\n};\n/**\n * @return {Array.} concrete dimension name list on coord.\n */\n\n\nlistProto.getDimensionsOnCoord = function () {\n return this._dimensionsSummary.dataDimsOnCoord.slice();\n};\n/**\n * @param {string} coordDim\n * @param {number} [idx] A coordDim may map to more than one data dim.\n * If idx is `true`, return a array of all mapped dims.\n * If idx is not specified, return the first dim not extra.\n * @return {string|Array.} concrete data dim.\n * If idx is number, and not found, return null/undefined.\n * If idx is `true`, and not found, return empty array (always return array).\n */\n\n\nlistProto.mapDimension = function (coordDim, idx) {\n var dimensionsSummary = this._dimensionsSummary;\n\n if (idx == null) {\n return dimensionsSummary.encodeFirstDimNotExtra[coordDim];\n }\n\n var dims = dimensionsSummary.encode[coordDim];\n return idx === true // always return array if idx is `true`\n ? (dims || []).slice() : dims && dims[idx];\n};\n/**\n * Initialize from data\n * @param {Array.} data source or data or data provider.\n * @param {Array.} [nameLIst] The name of a datum is used on data diff and\n * default label/tooltip.\n * A name can be specified in encode.itemName,\n * or dataItem.name (only for series option data),\n * or provided in nameList from outside.\n * @param {Function} [dimValueGetter] (dataItem, dimName, dataIndex, dimIndex) => number\n */\n\n\nlistProto.initData = function (data, nameList, dimValueGetter) {\n var notProvider = Source.isInstance(data) || zrUtil.isArrayLike(data);\n\n if (notProvider) {\n data = new DefaultDataProvider(data, this.dimensions.length);\n }\n\n this._rawData = data; // Clear\n\n this._storage = {};\n this._indices = null;\n this._nameList = nameList || [];\n this._idList = [];\n this._nameRepeatCount = {};\n\n if (!dimValueGetter) {\n this.hasItemOption = false;\n }\n /**\n * @readOnly\n */\n\n\n this.defaultDimValueGetter = defaultDimValueGetters[this._rawData.getSource().sourceFormat]; // Default dim value getter\n\n this._dimValueGetter = dimValueGetter = dimValueGetter || this.defaultDimValueGetter;\n this._dimValueGetterArrayRows = defaultDimValueGetters.arrayRows; // Reset raw extent.\n\n this._rawExtent = {};\n\n this._initDataFromProvider(0, data.count()); // If data has no item option.\n\n\n if (data.pure) {\n this.hasItemOption = false;\n }\n};\n\nlistProto.getProvider = function () {\n return this._rawData;\n};\n/**\n * Caution: Can be only called on raw data (before `this._indices` created).\n */\n\n\nlistProto.appendData = function (data) {\n var rawData = this._rawData;\n var start = this.count();\n rawData.appendData(data);\n var end = rawData.count();\n\n if (!rawData.persistent) {\n end += start;\n }\n\n this._initDataFromProvider(start, end);\n};\n/**\n * Caution: Can be only called on raw data (before `this._indices` created).\n * This method does not modify `rawData` (`dataProvider`), but only\n * add values to storage.\n *\n * The final count will be increased by `Math.max(values.length, names.length)`.\n *\n * @param {Array.>} values That is the SourceType: 'arrayRows', like\n * [\n * [12, 33, 44],\n * [NaN, 43, 1],\n * ['-', 'asdf', 0]\n * ]\n * Each item is exaclty cooresponding to a dimension.\n * @param {Array.} [names]\n */\n\n\nlistProto.appendValues = function (values, names) {\n var chunkSize = this._chunkSize;\n var storage = this._storage;\n var dimensions = this.dimensions;\n var dimLen = dimensions.length;\n var rawExtent = this._rawExtent;\n var start = this.count();\n var end = start + Math.max(values.length, names ? names.length : 0);\n var originalChunkCount = this._chunkCount;\n\n for (var i = 0; i < dimLen; i++) {\n var dim = dimensions[i];\n\n if (!rawExtent[dim]) {\n rawExtent[dim] = getInitialExtent();\n }\n\n if (!storage[dim]) {\n storage[dim] = [];\n }\n\n prepareChunks(storage, this._dimensionInfos[dim], chunkSize, originalChunkCount, end);\n this._chunkCount = storage[dim].length;\n }\n\n var emptyDataItem = new Array(dimLen);\n\n for (var idx = start; idx < end; idx++) {\n var sourceIdx = idx - start;\n var chunkIndex = Math.floor(idx / chunkSize);\n var chunkOffset = idx % chunkSize; // Store the data by dimensions\n\n for (var k = 0; k < dimLen; k++) {\n var dim = dimensions[k];\n\n var val = this._dimValueGetterArrayRows(values[sourceIdx] || emptyDataItem, dim, sourceIdx, k);\n\n storage[dim][chunkIndex][chunkOffset] = val;\n var dimRawExtent = rawExtent[dim];\n val < dimRawExtent[0] && (dimRawExtent[0] = val);\n val > dimRawExtent[1] && (dimRawExtent[1] = val);\n }\n\n if (names) {\n this._nameList[idx] = names[sourceIdx];\n }\n }\n\n this._rawCount = this._count = end; // Reset data extent\n\n this._extent = {};\n prepareInvertedIndex(this);\n};\n\nlistProto._initDataFromProvider = function (start, end) {\n // Optimize.\n if (start >= end) {\n return;\n }\n\n var chunkSize = this._chunkSize;\n var rawData = this._rawData;\n var storage = this._storage;\n var dimensions = this.dimensions;\n var dimLen = dimensions.length;\n var dimensionInfoMap = this._dimensionInfos;\n var nameList = this._nameList;\n var idList = this._idList;\n var rawExtent = this._rawExtent;\n var nameRepeatCount = this._nameRepeatCount = {};\n var nameDimIdx;\n var originalChunkCount = this._chunkCount;\n\n for (var i = 0; i < dimLen; i++) {\n var dim = dimensions[i];\n\n if (!rawExtent[dim]) {\n rawExtent[dim] = getInitialExtent();\n }\n\n var dimInfo = dimensionInfoMap[dim];\n\n if (dimInfo.otherDims.itemName === 0) {\n nameDimIdx = this._nameDimIdx = i;\n }\n\n if (dimInfo.otherDims.itemId === 0) {\n this._idDimIdx = i;\n }\n\n if (!storage[dim]) {\n storage[dim] = [];\n }\n\n prepareChunks(storage, dimInfo, chunkSize, originalChunkCount, end);\n this._chunkCount = storage[dim].length;\n }\n\n var dataItem = new Array(dimLen);\n\n for (var idx = start; idx < end; idx++) {\n // NOTICE: Try not to write things into dataItem\n dataItem = rawData.getItem(idx, dataItem); // Each data item is value\n // [1, 2]\n // 2\n // Bar chart, line chart which uses category axis\n // only gives the 'y' value. 'x' value is the indices of category\n // Use a tempValue to normalize the value to be a (x, y) value\n\n var chunkIndex = Math.floor(idx / chunkSize);\n var chunkOffset = idx % chunkSize; // Store the data by dimensions\n\n for (var k = 0; k < dimLen; k++) {\n var dim = dimensions[k];\n var dimStorage = storage[dim][chunkIndex]; // PENDING NULL is empty or zero\n\n var val = this._dimValueGetter(dataItem, dim, idx, k);\n\n dimStorage[chunkOffset] = val;\n var dimRawExtent = rawExtent[dim];\n val < dimRawExtent[0] && (dimRawExtent[0] = val);\n val > dimRawExtent[1] && (dimRawExtent[1] = val);\n } // ??? FIXME not check by pure but sourceFormat?\n // TODO refactor these logic.\n\n\n if (!rawData.pure) {\n var name = nameList[idx];\n\n if (dataItem && name == null) {\n // If dataItem is {name: ...}, it has highest priority.\n // That is appropriate for many common cases.\n if (dataItem.name != null) {\n // There is no other place to persistent dataItem.name,\n // so save it to nameList.\n nameList[idx] = name = dataItem.name;\n } else if (nameDimIdx != null) {\n var nameDim = dimensions[nameDimIdx];\n var nameDimChunk = storage[nameDim][chunkIndex];\n\n if (nameDimChunk) {\n name = nameDimChunk[chunkOffset];\n var ordinalMeta = dimensionInfoMap[nameDim].ordinalMeta;\n\n if (ordinalMeta && ordinalMeta.categories.length) {\n name = ordinalMeta.categories[name];\n }\n }\n }\n } // Try using the id in option\n // id or name is used on dynamical data, mapping old and new items.\n\n\n var id = dataItem == null ? null : dataItem.id;\n\n if (id == null && name != null) {\n // Use name as id and add counter to avoid same name\n nameRepeatCount[name] = nameRepeatCount[name] || 0;\n id = name;\n\n if (nameRepeatCount[name] > 0) {\n id += '__ec__' + nameRepeatCount[name];\n }\n\n nameRepeatCount[name]++;\n }\n\n id != null && (idList[idx] = id);\n }\n }\n\n if (!rawData.persistent && rawData.clean) {\n // Clean unused data if data source is typed array.\n rawData.clean();\n }\n\n this._rawCount = this._count = end; // Reset data extent\n\n this._extent = {};\n prepareInvertedIndex(this);\n};\n\nfunction prepareChunks(storage, dimInfo, chunkSize, chunkCount, end) {\n var DataCtor = dataCtors[dimInfo.type];\n var lastChunkIndex = chunkCount - 1;\n var dim = dimInfo.name;\n var resizeChunkArray = storage[dim][lastChunkIndex];\n\n if (resizeChunkArray && resizeChunkArray.length < chunkSize) {\n var newStore = new DataCtor(Math.min(end - lastChunkIndex * chunkSize, chunkSize)); // The cost of the copy is probably inconsiderable\n // within the initial chunkSize.\n\n for (var j = 0; j < resizeChunkArray.length; j++) {\n newStore[j] = resizeChunkArray[j];\n }\n\n storage[dim][lastChunkIndex] = newStore;\n } // Create new chunks.\n\n\n for (var k = chunkCount * chunkSize; k < end; k += chunkSize) {\n storage[dim].push(new DataCtor(Math.min(end - k, chunkSize)));\n }\n}\n\nfunction prepareInvertedIndex(list) {\n var invertedIndicesMap = list._invertedIndicesMap;\n zrUtil.each(invertedIndicesMap, function (invertedIndices, dim) {\n var dimInfo = list._dimensionInfos[dim]; // Currently, only dimensions that has ordinalMeta can create inverted indices.\n\n var ordinalMeta = dimInfo.ordinalMeta;\n\n if (ordinalMeta) {\n invertedIndices = invertedIndicesMap[dim] = new CtorInt32Array(ordinalMeta.categories.length); // The default value of TypedArray is 0. To avoid miss\n // mapping to 0, we should set it as INDEX_NOT_FOUND.\n\n for (var i = 0; i < invertedIndices.length; i++) {\n invertedIndices[i] = INDEX_NOT_FOUND;\n }\n\n for (var i = 0; i < list._count; i++) {\n // Only support the case that all values are distinct.\n invertedIndices[list.get(dim, i)] = i;\n }\n }\n });\n}\n\nfunction getRawValueFromStore(list, dimIndex, rawIndex) {\n var val;\n\n if (dimIndex != null) {\n var chunkSize = list._chunkSize;\n var chunkIndex = Math.floor(rawIndex / chunkSize);\n var chunkOffset = rawIndex % chunkSize;\n var dim = list.dimensions[dimIndex];\n var chunk = list._storage[dim][chunkIndex];\n\n if (chunk) {\n val = chunk[chunkOffset];\n var ordinalMeta = list._dimensionInfos[dim].ordinalMeta;\n\n if (ordinalMeta && ordinalMeta.categories.length) {\n val = ordinalMeta.categories[val];\n }\n }\n }\n\n return val;\n}\n/**\n * @return {number}\n */\n\n\nlistProto.count = function () {\n return this._count;\n};\n\nlistProto.getIndices = function () {\n var newIndices;\n var indices = this._indices;\n\n if (indices) {\n var Ctor = indices.constructor;\n var thisCount = this._count; // `new Array(a, b, c)` is different from `new Uint32Array(a, b, c)`.\n\n if (Ctor === Array) {\n newIndices = new Ctor(thisCount);\n\n for (var i = 0; i < thisCount; i++) {\n newIndices[i] = indices[i];\n }\n } else {\n newIndices = new Ctor(indices.buffer, 0, thisCount);\n }\n } else {\n var Ctor = getIndicesCtor(this);\n var newIndices = new Ctor(this.count());\n\n for (var i = 0; i < newIndices.length; i++) {\n newIndices[i] = i;\n }\n }\n\n return newIndices;\n};\n/**\n * Get value. Return NaN if idx is out of range.\n * @param {string} dim Dim must be concrete name.\n * @param {number} idx\n * @param {boolean} stack\n * @return {number}\n */\n\n\nlistProto.get = function (dim, idx\n/*, stack */\n) {\n if (!(idx >= 0 && idx < this._count)) {\n return NaN;\n }\n\n var storage = this._storage;\n\n if (!storage[dim]) {\n // TODO Warn ?\n return NaN;\n }\n\n idx = this.getRawIndex(idx);\n var chunkIndex = Math.floor(idx / this._chunkSize);\n var chunkOffset = idx % this._chunkSize;\n var chunkStore = storage[dim][chunkIndex];\n var value = chunkStore[chunkOffset]; // FIXME ordinal data type is not stackable\n // if (stack) {\n // var dimensionInfo = this._dimensionInfos[dim];\n // if (dimensionInfo && dimensionInfo.stackable) {\n // var stackedOn = this.stackedOn;\n // while (stackedOn) {\n // // Get no stacked data of stacked on\n // var stackedValue = stackedOn.get(dim, idx);\n // // Considering positive stack, negative stack and empty data\n // if ((value >= 0 && stackedValue > 0) // Positive stack\n // || (value <= 0 && stackedValue < 0) // Negative stack\n // ) {\n // value += stackedValue;\n // }\n // stackedOn = stackedOn.stackedOn;\n // }\n // }\n // }\n\n return value;\n};\n/**\n * @param {string} dim concrete dim\n * @param {number} rawIndex\n * @return {number|string}\n */\n\n\nlistProto.getByRawIndex = function (dim, rawIdx) {\n if (!(rawIdx >= 0 && rawIdx < this._rawCount)) {\n return NaN;\n }\n\n var dimStore = this._storage[dim];\n\n if (!dimStore) {\n // TODO Warn ?\n return NaN;\n }\n\n var chunkIndex = Math.floor(rawIdx / this._chunkSize);\n var chunkOffset = rawIdx % this._chunkSize;\n var chunkStore = dimStore[chunkIndex];\n return chunkStore[chunkOffset];\n};\n/**\n * FIXME Use `get` on chrome maybe slow(in filterSelf and selectRange).\n * Hack a much simpler _getFast\n * @private\n */\n\n\nlistProto._getFast = function (dim, rawIdx) {\n var chunkIndex = Math.floor(rawIdx / this._chunkSize);\n var chunkOffset = rawIdx % this._chunkSize;\n var chunkStore = this._storage[dim][chunkIndex];\n return chunkStore[chunkOffset];\n};\n/**\n * Get value for multi dimensions.\n * @param {Array.} [dimensions] If ignored, using all dimensions.\n * @param {number} idx\n * @return {number}\n */\n\n\nlistProto.getValues = function (dimensions, idx\n/*, stack */\n) {\n var values = [];\n\n if (!zrUtil.isArray(dimensions)) {\n // stack = idx;\n idx = dimensions;\n dimensions = this.dimensions;\n }\n\n for (var i = 0, len = dimensions.length; i < len; i++) {\n values.push(this.get(dimensions[i], idx\n /*, stack */\n ));\n }\n\n return values;\n};\n/**\n * If value is NaN. Inlcuding '-'\n * Only check the coord dimensions.\n * @param {string} dim\n * @param {number} idx\n * @return {number}\n */\n\n\nlistProto.hasValue = function (idx) {\n var dataDimsOnCoord = this._dimensionsSummary.dataDimsOnCoord;\n\n for (var i = 0, len = dataDimsOnCoord.length; i < len; i++) {\n // Ordinal type originally can be string or number.\n // But when an ordinal type is used on coord, it can\n // not be string but only number. So we can also use isNaN.\n if (isNaN(this.get(dataDimsOnCoord[i], idx))) {\n return false;\n }\n }\n\n return true;\n};\n/**\n * Get extent of data in one dimension\n * @param {string} dim\n * @param {boolean} stack\n */\n\n\nlistProto.getDataExtent = function (dim\n/*, stack */\n) {\n // Make sure use concrete dim as cache name.\n dim = this.getDimension(dim);\n var dimData = this._storage[dim];\n var initialExtent = getInitialExtent(); // stack = !!((stack || false) && this.getCalculationInfo(dim));\n\n if (!dimData) {\n return initialExtent;\n } // Make more strict checkings to ensure hitting cache.\n\n\n var currEnd = this.count(); // var cacheName = [dim, !!stack].join('_');\n // var cacheName = dim;\n // Consider the most cases when using data zoom, `getDataExtent`\n // happened before filtering. We cache raw extent, which is not\n // necessary to be cleared and recalculated when restore data.\n\n var useRaw = !this._indices; // && !stack;\n\n var dimExtent;\n\n if (useRaw) {\n return this._rawExtent[dim].slice();\n }\n\n dimExtent = this._extent[dim];\n\n if (dimExtent) {\n return dimExtent.slice();\n }\n\n dimExtent = initialExtent;\n var min = dimExtent[0];\n var max = dimExtent[1];\n\n for (var i = 0; i < currEnd; i++) {\n // var value = stack ? this.get(dim, i, true) : this._getFast(dim, this.getRawIndex(i));\n var value = this._getFast(dim, this.getRawIndex(i));\n\n value < min && (min = value);\n value > max && (max = value);\n }\n\n dimExtent = [min, max];\n this._extent[dim] = dimExtent;\n return dimExtent;\n};\n/**\n * Optimize for the scenario that data is filtered by a given extent.\n * Consider that if data amount is more than hundreds of thousand,\n * extent calculation will cost more than 10ms and the cache will\n * be erased because of the filtering.\n */\n\n\nlistProto.getApproximateExtent = function (dim\n/*, stack */\n) {\n dim = this.getDimension(dim);\n return this._approximateExtent[dim] || this.getDataExtent(dim\n /*, stack */\n );\n};\n\nlistProto.setApproximateExtent = function (extent, dim\n/*, stack */\n) {\n dim = this.getDimension(dim);\n this._approximateExtent[dim] = extent.slice();\n};\n/**\n * @param {string} key\n * @return {*}\n */\n\n\nlistProto.getCalculationInfo = function (key) {\n return this._calculationInfo[key];\n};\n/**\n * @param {string|Object} key or k-v object\n * @param {*} [value]\n */\n\n\nlistProto.setCalculationInfo = function (key, value) {\n isObject(key) ? zrUtil.extend(this._calculationInfo, key) : this._calculationInfo[key] = value;\n};\n/**\n * Get sum of data in one dimension\n * @param {string} dim\n */\n\n\nlistProto.getSum = function (dim\n/*, stack */\n) {\n var dimData = this._storage[dim];\n var sum = 0;\n\n if (dimData) {\n for (var i = 0, len = this.count(); i < len; i++) {\n var value = this.get(dim, i\n /*, stack */\n );\n\n if (!isNaN(value)) {\n sum += value;\n }\n }\n }\n\n return sum;\n};\n/**\n * Get median of data in one dimension\n * @param {string} dim\n */\n\n\nlistProto.getMedian = function (dim\n/*, stack */\n) {\n var dimDataArray = []; // map all data of one dimension\n\n this.each(dim, function (val, idx) {\n if (!isNaN(val)) {\n dimDataArray.push(val);\n }\n }); // TODO\n // Use quick select?\n // immutability & sort\n\n var sortedDimDataArray = [].concat(dimDataArray).sort(function (a, b) {\n return a - b;\n });\n var len = this.count(); // calculate median\n\n return len === 0 ? 0 : len % 2 === 1 ? sortedDimDataArray[(len - 1) / 2] : (sortedDimDataArray[len / 2] + sortedDimDataArray[len / 2 - 1]) / 2;\n}; // /**\n// * Retreive the index with given value\n// * @param {string} dim Concrete dimension.\n// * @param {number} value\n// * @return {number}\n// */\n// Currently incorrect: should return dataIndex but not rawIndex.\n// Do not fix it until this method is to be used somewhere.\n// FIXME Precision of float value\n// listProto.indexOf = function (dim, value) {\n// var storage = this._storage;\n// var dimData = storage[dim];\n// var chunkSize = this._chunkSize;\n// if (dimData) {\n// for (var i = 0, len = this.count(); i < len; i++) {\n// var chunkIndex = Math.floor(i / chunkSize);\n// var chunkOffset = i % chunkSize;\n// if (dimData[chunkIndex][chunkOffset] === value) {\n// return i;\n// }\n// }\n// }\n// return -1;\n// };\n\n/**\n * Only support the dimension which inverted index created.\n * Do not support other cases until required.\n * @param {string} concrete dim\n * @param {number|string} value\n * @return {number} rawIndex\n */\n\n\nlistProto.rawIndexOf = function (dim, value) {\n var invertedIndices = dim && this._invertedIndicesMap[dim];\n var rawIndex = invertedIndices[value];\n\n if (rawIndex == null || isNaN(rawIndex)) {\n return INDEX_NOT_FOUND;\n }\n\n return rawIndex;\n};\n/**\n * Retreive the index with given name\n * @param {number} idx\n * @param {number} name\n * @return {number}\n */\n\n\nlistProto.indexOfName = function (name) {\n for (var i = 0, len = this.count(); i < len; i++) {\n if (this.getName(i) === name) {\n return i;\n }\n }\n\n return -1;\n};\n/**\n * Retreive the index with given raw data index\n * @param {number} idx\n * @param {number} name\n * @return {number}\n */\n\n\nlistProto.indexOfRawIndex = function (rawIndex) {\n if (rawIndex >= this._rawCount || rawIndex < 0) {\n return -1;\n }\n\n if (!this._indices) {\n return rawIndex;\n } // Indices are ascending\n\n\n var indices = this._indices; // If rawIndex === dataIndex\n\n var rawDataIndex = indices[rawIndex];\n\n if (rawDataIndex != null && rawDataIndex < this._count && rawDataIndex === rawIndex) {\n return rawIndex;\n }\n\n var left = 0;\n var right = this._count - 1;\n\n while (left <= right) {\n var mid = (left + right) / 2 | 0;\n\n if (indices[mid] < rawIndex) {\n left = mid + 1;\n } else if (indices[mid] > rawIndex) {\n right = mid - 1;\n } else {\n return mid;\n }\n }\n\n return -1;\n};\n/**\n * Retreive the index of nearest value\n * @param {string} dim\n * @param {number} value\n * @param {number} [maxDistance=Infinity]\n * @return {Array.} If and only if multiple indices has\n * the same value, they are put to the result.\n */\n\n\nlistProto.indicesOfNearest = function (dim, value, maxDistance) {\n var storage = this._storage;\n var dimData = storage[dim];\n var nearestIndices = [];\n\n if (!dimData) {\n return nearestIndices;\n }\n\n if (maxDistance == null) {\n maxDistance = Infinity;\n }\n\n var minDist = Infinity;\n var minDiff = -1;\n var nearestIndicesLen = 0; // Check the test case of `test/ut/spec/data/List.js`.\n\n for (var i = 0, len = this.count(); i < len; i++) {\n var diff = value - this.get(dim, i);\n var dist = Math.abs(diff);\n\n if (dist <= maxDistance) {\n // When the `value` is at the middle of `this.get(dim, i)` and `this.get(dim, i+1)`,\n // we'd better not push both of them to `nearestIndices`, otherwise it is easy to\n // get more than one item in `nearestIndices` (more specifically, in `tooltip`).\n // So we chose the one that `diff >= 0` in this csae.\n // But if `this.get(dim, i)` and `this.get(dim, j)` get the same value, both of them\n // should be push to `nearestIndices`.\n if (dist < minDist || dist === minDist && diff >= 0 && minDiff < 0) {\n minDist = dist;\n minDiff = diff;\n nearestIndicesLen = 0;\n }\n\n if (diff === minDiff) {\n nearestIndices[nearestIndicesLen++] = i;\n }\n }\n }\n\n nearestIndices.length = nearestIndicesLen;\n return nearestIndices;\n};\n/**\n * Get raw data index\n * @param {number} idx\n * @return {number}\n */\n\n\nlistProto.getRawIndex = getRawIndexWithoutIndices;\n\nfunction getRawIndexWithoutIndices(idx) {\n return idx;\n}\n\nfunction getRawIndexWithIndices(idx) {\n if (idx < this._count && idx >= 0) {\n return this._indices[idx];\n }\n\n return -1;\n}\n/**\n * Get raw data item\n * @param {number} idx\n * @return {number}\n */\n\n\nlistProto.getRawDataItem = function (idx) {\n if (!this._rawData.persistent) {\n var val = [];\n\n for (var i = 0; i < this.dimensions.length; i++) {\n var dim = this.dimensions[i];\n val.push(this.get(dim, idx));\n }\n\n return val;\n } else {\n return this._rawData.getItem(this.getRawIndex(idx));\n }\n};\n/**\n * @param {number} idx\n * @param {boolean} [notDefaultIdx=false]\n * @return {string}\n */\n\n\nlistProto.getName = function (idx) {\n var rawIndex = this.getRawIndex(idx);\n return this._nameList[rawIndex] || getRawValueFromStore(this, this._nameDimIdx, rawIndex) || '';\n};\n/**\n * @param {number} idx\n * @param {boolean} [notDefaultIdx=false]\n * @return {string}\n */\n\n\nlistProto.getId = function (idx) {\n return getId(this, this.getRawIndex(idx));\n};\n\nfunction getId(list, rawIndex) {\n var id = list._idList[rawIndex];\n\n if (id == null) {\n id = getRawValueFromStore(list, list._idDimIdx, rawIndex);\n }\n\n if (id == null) {\n // FIXME Check the usage in graph, should not use prefix.\n id = ID_PREFIX + rawIndex;\n }\n\n return id;\n}\n\nfunction normalizeDimensions(dimensions) {\n if (!zrUtil.isArray(dimensions)) {\n dimensions = [dimensions];\n }\n\n return dimensions;\n}\n\nfunction validateDimensions(list, dims) {\n for (var i = 0; i < dims.length; i++) {\n // stroage may be empty when no data, so use\n // dimensionInfos to check.\n if (!list._dimensionInfos[dims[i]]) {\n console.error('Unkown dimension ' + dims[i]);\n }\n }\n}\n/**\n * Data iteration\n * @param {string|Array.}\n * @param {Function} cb\n * @param {*} [context=this]\n *\n * @example\n * list.each('x', function (x, idx) {});\n * list.each(['x', 'y'], function (x, y, idx) {});\n * list.each(function (idx) {})\n */\n\n\nlistProto.each = function (dims, cb, context, contextCompat) {\n 'use strict';\n\n if (!this._count) {\n return;\n }\n\n if (typeof dims === 'function') {\n contextCompat = context;\n context = cb;\n cb = dims;\n dims = [];\n } // contextCompat just for compat echarts3\n\n\n context = context || contextCompat || this;\n dims = zrUtil.map(normalizeDimensions(dims), this.getDimension, this);\n var dimSize = dims.length;\n\n for (var i = 0; i < this.count(); i++) {\n // Simple optimization\n switch (dimSize) {\n case 0:\n cb.call(context, i);\n break;\n\n case 1:\n cb.call(context, this.get(dims[0], i), i);\n break;\n\n case 2:\n cb.call(context, this.get(dims[0], i), this.get(dims[1], i), i);\n break;\n\n default:\n var k = 0;\n var value = [];\n\n for (; k < dimSize; k++) {\n value[k] = this.get(dims[k], i);\n } // Index\n\n\n value[k] = i;\n cb.apply(context, value);\n }\n }\n};\n/**\n * Data filter\n * @param {string|Array.}\n * @param {Function} cb\n * @param {*} [context=this]\n */\n\n\nlistProto.filterSelf = function (dimensions, cb, context, contextCompat) {\n 'use strict';\n\n if (!this._count) {\n return;\n }\n\n if (typeof dimensions === 'function') {\n contextCompat = context;\n context = cb;\n cb = dimensions;\n dimensions = [];\n } // contextCompat just for compat echarts3\n\n\n context = context || contextCompat || this;\n dimensions = zrUtil.map(normalizeDimensions(dimensions), this.getDimension, this);\n var count = this.count();\n var Ctor = getIndicesCtor(this);\n var newIndices = new Ctor(count);\n var value = [];\n var dimSize = dimensions.length;\n var offset = 0;\n var dim0 = dimensions[0];\n\n for (var i = 0; i < count; i++) {\n var keep;\n var rawIdx = this.getRawIndex(i); // Simple optimization\n\n if (dimSize === 0) {\n keep = cb.call(context, i);\n } else if (dimSize === 1) {\n var val = this._getFast(dim0, rawIdx);\n\n keep = cb.call(context, val, i);\n } else {\n for (var k = 0; k < dimSize; k++) {\n value[k] = this._getFast(dim0, rawIdx);\n }\n\n value[k] = i;\n keep = cb.apply(context, value);\n }\n\n if (keep) {\n newIndices[offset++] = rawIdx;\n }\n } // Set indices after filtered.\n\n\n if (offset < count) {\n this._indices = newIndices;\n }\n\n this._count = offset; // Reset data extent\n\n this._extent = {};\n this.getRawIndex = this._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;\n return this;\n};\n/**\n * Select data in range. (For optimization of filter)\n * (Manually inline code, support 5 million data filtering in data zoom.)\n */\n\n\nlistProto.selectRange = function (range) {\n 'use strict';\n\n if (!this._count) {\n return;\n }\n\n var dimensions = [];\n\n for (var dim in range) {\n if (range.hasOwnProperty(dim)) {\n dimensions.push(dim);\n }\n }\n\n var dimSize = dimensions.length;\n\n if (!dimSize) {\n return;\n }\n\n var originalCount = this.count();\n var Ctor = getIndicesCtor(this);\n var newIndices = new Ctor(originalCount);\n var offset = 0;\n var dim0 = dimensions[0];\n var min = range[dim0][0];\n var max = range[dim0][1];\n var quickFinished = false;\n\n if (!this._indices) {\n // Extreme optimization for common case. About 2x faster in chrome.\n var idx = 0;\n\n if (dimSize === 1) {\n var dimStorage = this._storage[dimensions[0]];\n\n for (var k = 0; k < this._chunkCount; k++) {\n var chunkStorage = dimStorage[k];\n var len = Math.min(this._count - k * this._chunkSize, this._chunkSize);\n\n for (var i = 0; i < len; i++) {\n var val = chunkStorage[i]; // NaN will not be filtered. Consider the case, in line chart, empty\n // value indicates the line should be broken. But for the case like\n // scatter plot, a data item with empty value will not be rendered,\n // but the axis extent may be effected if some other dim of the data\n // item has value. Fortunately it is not a significant negative effect.\n\n if (val >= min && val <= max || isNaN(val)) {\n newIndices[offset++] = idx;\n }\n\n idx++;\n }\n }\n\n quickFinished = true;\n } else if (dimSize === 2) {\n var dimStorage = this._storage[dim0];\n var dimStorage2 = this._storage[dimensions[1]];\n var min2 = range[dimensions[1]][0];\n var max2 = range[dimensions[1]][1];\n\n for (var k = 0; k < this._chunkCount; k++) {\n var chunkStorage = dimStorage[k];\n var chunkStorage2 = dimStorage2[k];\n var len = Math.min(this._count - k * this._chunkSize, this._chunkSize);\n\n for (var i = 0; i < len; i++) {\n var val = chunkStorage[i];\n var val2 = chunkStorage2[i]; // Do not filter NaN, see comment above.\n\n if ((val >= min && val <= max || isNaN(val)) && (val2 >= min2 && val2 <= max2 || isNaN(val2))) {\n newIndices[offset++] = idx;\n }\n\n idx++;\n }\n }\n\n quickFinished = true;\n }\n }\n\n if (!quickFinished) {\n if (dimSize === 1) {\n for (var i = 0; i < originalCount; i++) {\n var rawIndex = this.getRawIndex(i);\n\n var val = this._getFast(dim0, rawIndex); // Do not filter NaN, see comment above.\n\n\n if (val >= min && val <= max || isNaN(val)) {\n newIndices[offset++] = rawIndex;\n }\n }\n } else {\n for (var i = 0; i < originalCount; i++) {\n var keep = true;\n var rawIndex = this.getRawIndex(i);\n\n for (var k = 0; k < dimSize; k++) {\n var dimk = dimensions[k];\n\n var val = this._getFast(dim, rawIndex); // Do not filter NaN, see comment above.\n\n\n if (val < range[dimk][0] || val > range[dimk][1]) {\n keep = false;\n }\n }\n\n if (keep) {\n newIndices[offset++] = this.getRawIndex(i);\n }\n }\n }\n } // Set indices after filtered.\n\n\n if (offset < originalCount) {\n this._indices = newIndices;\n }\n\n this._count = offset; // Reset data extent\n\n this._extent = {};\n this.getRawIndex = this._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;\n return this;\n};\n/**\n * Data mapping to a plain array\n * @param {string|Array.} [dimensions]\n * @param {Function} cb\n * @param {*} [context=this]\n * @return {Array}\n */\n\n\nlistProto.mapArray = function (dimensions, cb, context, contextCompat) {\n 'use strict';\n\n if (typeof dimensions === 'function') {\n contextCompat = context;\n context = cb;\n cb = dimensions;\n dimensions = [];\n } // contextCompat just for compat echarts3\n\n\n context = context || contextCompat || this;\n var result = [];\n this.each(dimensions, function () {\n result.push(cb && cb.apply(this, arguments));\n }, context);\n return result;\n}; // Data in excludeDimensions is copied, otherwise transfered.\n\n\nfunction cloneListForMapAndSample(original, excludeDimensions) {\n var allDimensions = original.dimensions;\n var list = new List(zrUtil.map(allDimensions, original.getDimensionInfo, original), original.hostModel); // FIXME If needs stackedOn, value may already been stacked\n\n transferProperties(list, original);\n var storage = list._storage = {};\n var originalStorage = original._storage; // Init storage\n\n for (var i = 0; i < allDimensions.length; i++) {\n var dim = allDimensions[i];\n\n if (originalStorage[dim]) {\n // Notice that we do not reset invertedIndicesMap here, becuase\n // there is no scenario of mapping or sampling ordinal dimension.\n if (zrUtil.indexOf(excludeDimensions, dim) >= 0) {\n storage[dim] = cloneDimStore(originalStorage[dim]);\n list._rawExtent[dim] = getInitialExtent();\n list._extent[dim] = null;\n } else {\n // Direct reference for other dimensions\n storage[dim] = originalStorage[dim];\n }\n }\n }\n\n return list;\n}\n\nfunction cloneDimStore(originalDimStore) {\n var newDimStore = new Array(originalDimStore.length);\n\n for (var j = 0; j < originalDimStore.length; j++) {\n newDimStore[j] = cloneChunk(originalDimStore[j]);\n }\n\n return newDimStore;\n}\n\nfunction getInitialExtent() {\n return [Infinity, -Infinity];\n}\n/**\n * Data mapping to a new List with given dimensions\n * @param {string|Array.} dimensions\n * @param {Function} cb\n * @param {*} [context=this]\n * @return {Array}\n */\n\n\nlistProto.map = function (dimensions, cb, context, contextCompat) {\n 'use strict'; // contextCompat just for compat echarts3\n\n context = context || contextCompat || this;\n dimensions = zrUtil.map(normalizeDimensions(dimensions), this.getDimension, this);\n var list = cloneListForMapAndSample(this, dimensions); // Following properties are all immutable.\n // So we can reference to the same value\n\n list._indices = this._indices;\n list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;\n var storage = list._storage;\n var tmpRetValue = [];\n var chunkSize = this._chunkSize;\n var dimSize = dimensions.length;\n var dataCount = this.count();\n var values = [];\n var rawExtent = list._rawExtent;\n\n for (var dataIndex = 0; dataIndex < dataCount; dataIndex++) {\n for (var dimIndex = 0; dimIndex < dimSize; dimIndex++) {\n values[dimIndex] = this.get(dimensions[dimIndex], dataIndex\n /*, stack */\n );\n }\n\n values[dimSize] = dataIndex;\n var retValue = cb && cb.apply(context, values);\n\n if (retValue != null) {\n // a number or string (in oridinal dimension)?\n if (typeof retValue !== 'object') {\n tmpRetValue[0] = retValue;\n retValue = tmpRetValue;\n }\n\n var rawIndex = this.getRawIndex(dataIndex);\n var chunkIndex = Math.floor(rawIndex / chunkSize);\n var chunkOffset = rawIndex % chunkSize;\n\n for (var i = 0; i < retValue.length; i++) {\n var dim = dimensions[i];\n var val = retValue[i];\n var rawExtentOnDim = rawExtent[dim];\n var dimStore = storage[dim];\n\n if (dimStore) {\n dimStore[chunkIndex][chunkOffset] = val;\n }\n\n if (val < rawExtentOnDim[0]) {\n rawExtentOnDim[0] = val;\n }\n\n if (val > rawExtentOnDim[1]) {\n rawExtentOnDim[1] = val;\n }\n }\n }\n }\n\n return list;\n};\n/**\n * Large data down sampling on given dimension\n * @param {string} dimension\n * @param {number} rate\n * @param {Function} sampleValue\n * @param {Function} sampleIndex Sample index for name and id\n */\n\n\nlistProto.downSample = function (dimension, rate, sampleValue, sampleIndex) {\n var list = cloneListForMapAndSample(this, [dimension]);\n var targetStorage = list._storage;\n var frameValues = [];\n var frameSize = Math.floor(1 / rate);\n var dimStore = targetStorage[dimension];\n var len = this.count();\n var chunkSize = this._chunkSize;\n var rawExtentOnDim = list._rawExtent[dimension];\n var newIndices = new (getIndicesCtor(this))(len);\n var offset = 0;\n\n for (var i = 0; i < len; i += frameSize) {\n // Last frame\n if (frameSize > len - i) {\n frameSize = len - i;\n frameValues.length = frameSize;\n }\n\n for (var k = 0; k < frameSize; k++) {\n var dataIdx = this.getRawIndex(i + k);\n var originalChunkIndex = Math.floor(dataIdx / chunkSize);\n var originalChunkOffset = dataIdx % chunkSize;\n frameValues[k] = dimStore[originalChunkIndex][originalChunkOffset];\n }\n\n var value = sampleValue(frameValues);\n var sampleFrameIdx = this.getRawIndex(Math.min(i + sampleIndex(frameValues, value) || 0, len - 1));\n var sampleChunkIndex = Math.floor(sampleFrameIdx / chunkSize);\n var sampleChunkOffset = sampleFrameIdx % chunkSize; // Only write value on the filtered data\n\n dimStore[sampleChunkIndex][sampleChunkOffset] = value;\n\n if (value < rawExtentOnDim[0]) {\n rawExtentOnDim[0] = value;\n }\n\n if (value > rawExtentOnDim[1]) {\n rawExtentOnDim[1] = value;\n }\n\n newIndices[offset++] = sampleFrameIdx;\n }\n\n list._count = offset;\n list._indices = newIndices;\n list.getRawIndex = getRawIndexWithIndices;\n return list;\n};\n/**\n * Get model of one data item.\n *\n * @param {number} idx\n */\n// FIXME Model proxy ?\n\n\nlistProto.getItemModel = function (idx) {\n var hostModel = this.hostModel;\n return new Model(this.getRawDataItem(idx), hostModel, hostModel && hostModel.ecModel);\n};\n/**\n * Create a data differ\n * @param {module:echarts/data/List} otherList\n * @return {module:echarts/data/DataDiffer}\n */\n\n\nlistProto.diff = function (otherList) {\n var thisList = this;\n return new DataDiffer(otherList ? otherList.getIndices() : [], this.getIndices(), function (idx) {\n return getId(otherList, idx);\n }, function (idx) {\n return getId(thisList, idx);\n });\n};\n/**\n * Get visual property.\n * @param {string} key\n */\n\n\nlistProto.getVisual = function (key) {\n var visual = this._visual;\n return visual && visual[key];\n};\n/**\n * Set visual property\n * @param {string|Object} key\n * @param {*} [value]\n *\n * @example\n * setVisual('color', color);\n * setVisual({\n * 'color': color\n * });\n */\n\n\nlistProto.setVisual = function (key, val) {\n if (isObject(key)) {\n for (var name in key) {\n if (key.hasOwnProperty(name)) {\n this.setVisual(name, key[name]);\n }\n }\n\n return;\n }\n\n this._visual = this._visual || {};\n this._visual[key] = val;\n};\n/**\n * Set layout property.\n * @param {string|Object} key\n * @param {*} [val]\n */\n\n\nlistProto.setLayout = function (key, val) {\n if (isObject(key)) {\n for (var name in key) {\n if (key.hasOwnProperty(name)) {\n this.setLayout(name, key[name]);\n }\n }\n\n return;\n }\n\n this._layout[key] = val;\n};\n/**\n * Get layout property.\n * @param {string} key.\n * @return {*}\n */\n\n\nlistProto.getLayout = function (key) {\n return this._layout[key];\n};\n/**\n * Get layout of single data item\n * @param {number} idx\n */\n\n\nlistProto.getItemLayout = function (idx) {\n return this._itemLayouts[idx];\n};\n/**\n * Set layout of single data item\n * @param {number} idx\n * @param {Object} layout\n * @param {boolean=} [merge=false]\n */\n\n\nlistProto.setItemLayout = function (idx, layout, merge) {\n this._itemLayouts[idx] = merge ? zrUtil.extend(this._itemLayouts[idx] || {}, layout) : layout;\n};\n/**\n * Clear all layout of single data item\n */\n\n\nlistProto.clearItemLayouts = function () {\n this._itemLayouts.length = 0;\n};\n/**\n * Get visual property of single data item\n * @param {number} idx\n * @param {string} key\n * @param {boolean} [ignoreParent=false]\n */\n\n\nlistProto.getItemVisual = function (idx, key, ignoreParent) {\n var itemVisual = this._itemVisuals[idx];\n var val = itemVisual && itemVisual[key];\n\n if (val == null && !ignoreParent) {\n // Use global visual property\n return this.getVisual(key);\n }\n\n return val;\n};\n/**\n * Set visual property of single data item\n *\n * @param {number} idx\n * @param {string|Object} key\n * @param {*} [value]\n *\n * @example\n * setItemVisual(0, 'color', color);\n * setItemVisual(0, {\n * 'color': color\n * });\n */\n\n\nlistProto.setItemVisual = function (idx, key, value) {\n var itemVisual = this._itemVisuals[idx] || {};\n var hasItemVisual = this.hasItemVisual;\n this._itemVisuals[idx] = itemVisual;\n\n if (isObject(key)) {\n for (var name in key) {\n if (key.hasOwnProperty(name)) {\n itemVisual[name] = key[name];\n hasItemVisual[name] = true;\n }\n }\n\n return;\n }\n\n itemVisual[key] = value;\n hasItemVisual[key] = true;\n};\n/**\n * Clear itemVisuals and list visual.\n */\n\n\nlistProto.clearAllVisual = function () {\n this._visual = {};\n this._itemVisuals = [];\n this.hasItemVisual = {};\n};\n\nvar setItemDataAndSeriesIndex = function (child) {\n child.seriesIndex = this.seriesIndex;\n child.dataIndex = this.dataIndex;\n child.dataType = this.dataType;\n};\n/**\n * Set graphic element relative to data. It can be set as null\n * @param {number} idx\n * @param {module:zrender/Element} [el]\n */\n\n\nlistProto.setItemGraphicEl = function (idx, el) {\n var hostModel = this.hostModel;\n\n if (el) {\n // Add data index and series index for indexing the data by element\n // Useful in tooltip\n el.dataIndex = idx;\n el.dataType = this.dataType;\n el.seriesIndex = hostModel && hostModel.seriesIndex;\n\n if (el.type === 'group') {\n el.traverse(setItemDataAndSeriesIndex, el);\n }\n }\n\n this._graphicEls[idx] = el;\n};\n/**\n * @param {number} idx\n * @return {module:zrender/Element}\n */\n\n\nlistProto.getItemGraphicEl = function (idx) {\n return this._graphicEls[idx];\n};\n/**\n * @param {Function} cb\n * @param {*} context\n */\n\n\nlistProto.eachItemGraphicEl = function (cb, context) {\n zrUtil.each(this._graphicEls, function (el, idx) {\n if (el) {\n cb && cb.call(context, el, idx);\n }\n });\n};\n/**\n * Shallow clone a new list except visual and layout properties, and graph elements.\n * New list only change the indices.\n */\n\n\nlistProto.cloneShallow = function (list) {\n if (!list) {\n var dimensionInfoList = zrUtil.map(this.dimensions, this.getDimensionInfo, this);\n list = new List(dimensionInfoList, this.hostModel);\n } // FIXME\n\n\n list._storage = this._storage;\n transferProperties(list, this); // Clone will not change the data extent and indices\n\n if (this._indices) {\n var Ctor = this._indices.constructor;\n list._indices = new Ctor(this._indices);\n } else {\n list._indices = null;\n }\n\n list.getRawIndex = list._indices ? getRawIndexWithIndices : getRawIndexWithoutIndices;\n return list;\n};\n/**\n * Wrap some method to add more feature\n * @param {string} methodName\n * @param {Function} injectFunction\n */\n\n\nlistProto.wrapMethod = function (methodName, injectFunction) {\n var originalMethod = this[methodName];\n\n if (typeof originalMethod !== 'function') {\n return;\n }\n\n this.__wrappedMethods = this.__wrappedMethods || [];\n\n this.__wrappedMethods.push(methodName);\n\n this[methodName] = function () {\n var res = originalMethod.apply(this, arguments);\n return injectFunction.apply(this, [res].concat(zrUtil.slice(arguments)));\n };\n}; // Methods that create a new list based on this list should be listed here.\n// Notice that those method should `RETURN` the new list.\n\n\nlistProto.TRANSFERABLE_METHODS = ['cloneShallow', 'downSample', 'map']; // Methods that change indices of this list should be listed here.\n\nlistProto.CHANGABLE_METHODS = ['filterSelf', 'selectRange'];\nvar _default = List;\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\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 TYPE_DELIMITER = '.';\nvar IS_CONTAINER = '___EC__COMPONENT__CONTAINER___';\n/**\n * Notice, parseClassType('') should returns {main: '', sub: ''}\n * @public\n */\n\nfunction parseClassType(componentType) {\n var ret = {\n main: '',\n sub: ''\n };\n\n if (componentType) {\n componentType = componentType.split(TYPE_DELIMITER);\n ret.main = componentType[0] || '';\n ret.sub = componentType[1] || '';\n }\n\n return ret;\n}\n/**\n * @public\n */\n\n\nfunction checkClassType(componentType) {\n zrUtil.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(componentType), 'componentType \"' + componentType + '\" illegal');\n}\n/**\n * @public\n */\n\n\nfunction enableClassExtend(RootClass, mandatoryMethods) {\n RootClass.$constructor = RootClass;\n\n RootClass.extend = function (proto) {\n var superClass = this;\n\n var ExtendedClass = function () {\n if (!proto.$constructor) {\n superClass.apply(this, arguments);\n } else {\n proto.$constructor.apply(this, arguments);\n }\n };\n\n zrUtil.extend(ExtendedClass.prototype, proto);\n ExtendedClass.extend = this.extend;\n ExtendedClass.superCall = superCall;\n ExtendedClass.superApply = superApply;\n zrUtil.inherits(ExtendedClass, this);\n ExtendedClass.superClass = superClass;\n return ExtendedClass;\n };\n}\n\nvar classBase = 0;\n/**\n * Can not use instanceof, consider different scope by\n * cross domain or es module import in ec extensions.\n * Mount a method \"isInstance()\" to Clz.\n */\n\nfunction enableClassCheck(Clz) {\n var classAttr = ['__\\0is_clz', classBase++, Math.random().toFixed(3)].join('_');\n Clz.prototype[classAttr] = true;\n\n Clz.isInstance = function (obj) {\n return !!(obj && obj[classAttr]);\n };\n} // superCall should have class info, which can not be fetch from 'this'.\n// Consider this case:\n// class A has method f,\n// class B inherits class A, overrides method f, f call superApply('f'),\n// class C inherits class B, do not overrides method f,\n// then when method of class C is called, dead loop occured.\n\n\nfunction superCall(context, methodName) {\n var args = zrUtil.slice(arguments, 2);\n return this.superClass.prototype[methodName].apply(context, args);\n}\n\nfunction superApply(context, methodName, args) {\n return this.superClass.prototype[methodName].apply(context, args);\n}\n/**\n * @param {Object} entity\n * @param {Object} options\n * @param {boolean} [options.registerWhenExtend]\n * @public\n */\n\n\nfunction enableClassManagement(entity, options) {\n options = options || {};\n /**\n * Component model classes\n * key: componentType,\n * value:\n * componentClass, when componentType is 'xxx'\n * or Object., when componentType is 'xxx.yy'\n * @type {Object}\n */\n\n var storage = {};\n\n entity.registerClass = function (Clazz, componentType) {\n if (componentType) {\n checkClassType(componentType);\n componentType = parseClassType(componentType);\n\n if (!componentType.sub) {\n storage[componentType.main] = Clazz;\n } else if (componentType.sub !== IS_CONTAINER) {\n var container = makeContainer(componentType);\n container[componentType.sub] = Clazz;\n }\n }\n\n return Clazz;\n };\n\n entity.getClass = function (componentMainType, subType, throwWhenNotFound) {\n var Clazz = storage[componentMainType];\n\n if (Clazz && Clazz[IS_CONTAINER]) {\n Clazz = subType ? Clazz[subType] : null;\n }\n\n if (throwWhenNotFound && !Clazz) {\n throw new Error(!subType ? componentMainType + '.' + 'type should be specified.' : 'Component ' + componentMainType + '.' + (subType || '') + ' not exists. Load it first.');\n }\n\n return Clazz;\n };\n\n entity.getClassesByMainType = function (componentType) {\n componentType = parseClassType(componentType);\n var result = [];\n var obj = storage[componentType.main];\n\n if (obj && obj[IS_CONTAINER]) {\n zrUtil.each(obj, function (o, type) {\n type !== IS_CONTAINER && result.push(o);\n });\n } else {\n result.push(obj);\n }\n\n return result;\n };\n\n entity.hasClass = function (componentType) {\n // Just consider componentType.main.\n componentType = parseClassType(componentType);\n return !!storage[componentType.main];\n };\n /**\n * @return {Array.} Like ['aa', 'bb'], but can not be ['aa.xx']\n */\n\n\n entity.getAllClassMainTypes = function () {\n var types = [];\n zrUtil.each(storage, function (obj, type) {\n types.push(type);\n });\n return types;\n };\n /**\n * If a main type is container and has sub types\n * @param {string} mainType\n * @return {boolean}\n */\n\n\n entity.hasSubTypes = function (componentType) {\n componentType = parseClassType(componentType);\n var obj = storage[componentType.main];\n return obj && obj[IS_CONTAINER];\n };\n\n entity.parseClassType = parseClassType;\n\n function makeContainer(componentType) {\n var container = storage[componentType.main];\n\n if (!container || !container[IS_CONTAINER]) {\n container = storage[componentType.main] = {};\n container[IS_CONTAINER] = true;\n }\n\n return container;\n }\n\n if (options.registerWhenExtend) {\n var originalExtend = entity.extend;\n\n if (originalExtend) {\n entity.extend = function (proto) {\n var ExtendedClass = originalExtend.call(this, proto);\n return entity.registerClass(ExtendedClass, proto.type);\n };\n }\n }\n\n return entity;\n}\n/**\n * @param {string|Array.} properties\n */\n\n\nfunction setReadOnly(obj, properties) {// FIXME It seems broken in IE8 simulation of IE11\n // if (!zrUtil.isArray(properties)) {\n // properties = properties != null ? [properties] : [];\n // }\n // zrUtil.each(properties, function (prop) {\n // var value = obj[prop];\n // Object.defineProperty\n // && Object.defineProperty(obj, prop, {\n // value: value, writable: false\n // });\n // zrUtil.isArray(obj[prop])\n // && Object.freeze\n // && Object.freeze(obj[prop]);\n // });\n}\n\nexports.parseClassType = parseClassType;\nexports.enableClassExtend = enableClassExtend;\nexports.enableClassCheck = enableClassCheck;\nexports.enableClassManagement = enableClassManagement;\nexports.setReadOnly = setReadOnly;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 _config = require(\"../../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar echarts = require(\"../../echarts\");\n\nvar axisPointerModelHelper = require(\"../axisPointer/modelHelper\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * Base class of AxisView.\n */\nvar AxisView = echarts.extendComponentView({\n type: 'axis',\n\n /**\n * @private\n */\n _axisPointer: null,\n\n /**\n * @protected\n * @type {string}\n */\n axisPointerClass: null,\n\n /**\n * @override\n */\n render: function (axisModel, ecModel, api, payload) {\n // FIXME\n // This process should proformed after coordinate systems updated\n // (axis scale updated), and should be performed each time update.\n // So put it here temporarily, although it is not appropriate to\n // put a model-writing procedure in `view`.\n this.axisPointerClass && axisPointerModelHelper.fixValue(axisModel);\n AxisView.superApply(this, 'render', arguments);\n updateAxisPointer(this, axisModel, ecModel, api, payload, true);\n },\n\n /**\n * Action handler.\n * @public\n * @param {module:echarts/coord/cartesian/AxisModel} axisModel\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n * @param {Object} payload\n */\n updateAxisPointer: function (axisModel, ecModel, api, payload, force) {\n updateAxisPointer(this, axisModel, ecModel, api, payload, false);\n },\n\n /**\n * @override\n */\n remove: function (ecModel, api) {\n var axisPointer = this._axisPointer;\n axisPointer && axisPointer.remove(api);\n AxisView.superApply(this, 'remove', arguments);\n },\n\n /**\n * @override\n */\n dispose: function (ecModel, api) {\n disposeAxisPointer(this, api);\n AxisView.superApply(this, 'dispose', arguments);\n }\n});\n\nfunction updateAxisPointer(axisView, axisModel, ecModel, api, payload, forceRender) {\n var Clazz = AxisView.getAxisPointerClass(axisView.axisPointerClass);\n\n if (!Clazz) {\n return;\n }\n\n var axisPointerModel = axisPointerModelHelper.getAxisPointerModel(axisModel);\n axisPointerModel ? (axisView._axisPointer || (axisView._axisPointer = new Clazz())).render(axisModel, axisPointerModel, api, forceRender) : disposeAxisPointer(axisView, api);\n}\n\nfunction disposeAxisPointer(axisView, ecModel, api) {\n var axisPointer = axisView._axisPointer;\n axisPointer && axisPointer.dispose(ecModel, api);\n axisView._axisPointer = null;\n}\n\nvar axisPointerClazz = [];\n\nAxisView.registerAxisPointerClass = function (type, clazz) {\n axisPointerClazz[type] = clazz;\n};\n\nAxisView.getAxisPointerClass = function (type) {\n return type && axisPointerClazz[type];\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\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 _config = require(\"../config\");\n\nvar __DEV__ = _config.__DEV__;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar OrdinalScale = require(\"../scale/Ordinal\");\n\nvar IntervalScale = require(\"../scale/Interval\");\n\nvar Scale = require(\"../scale/Scale\");\n\nvar numberUtil = require(\"../util/number\");\n\nvar _barGrid = require(\"../layout/barGrid\");\n\nvar prepareLayoutBarSeries = _barGrid.prepareLayoutBarSeries;\nvar makeColumnLayout = _barGrid.makeColumnLayout;\nvar retrieveColumnLayout = _barGrid.retrieveColumnLayout;\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nrequire(\"../scale/Time\");\n\nrequire(\"../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\n/**\n * Get axis scale extent before niced.\n * Item of returned array can only be number (including Infinity and NaN).\n */\nfunction getScaleExtent(scale, model) {\n var scaleType = scale.type;\n var min = model.getMin();\n var max = model.getMax();\n var originalExtent = scale.getExtent();\n var axisDataLen;\n var boundaryGap;\n var span;\n\n if (scaleType === 'ordinal') {\n axisDataLen = model.getCategories().length;\n } else {\n boundaryGap = model.get('boundaryGap');\n\n if (!zrUtil.isArray(boundaryGap)) {\n boundaryGap = [boundaryGap || 0, boundaryGap || 0];\n }\n\n if (typeof boundaryGap[0] === 'boolean') {\n boundaryGap = [0, 0];\n }\n\n boundaryGap[0] = numberUtil.parsePercent(boundaryGap[0], 1);\n boundaryGap[1] = numberUtil.parsePercent(boundaryGap[1], 1);\n span = originalExtent[1] - originalExtent[0] || Math.abs(originalExtent[0]);\n } // Notice: When min/max is not set (that is, when there are null/undefined,\n // which is the most common case), these cases should be ensured:\n // (1) For 'ordinal', show all axis.data.\n // (2) For others:\n // + `boundaryGap` is applied (if min/max set, boundaryGap is\n // disabled).\n // + If `needCrossZero`, min/max should be zero, otherwise, min/max should\n // be the result that originalExtent enlarged by boundaryGap.\n // (3) If no data, it should be ensured that `scale.setBlank` is set.\n // FIXME\n // (1) When min/max is 'dataMin' or 'dataMax', should boundaryGap be able to used?\n // (2) When `needCrossZero` and all data is positive/negative, should it be ensured\n // that the results processed by boundaryGap are positive/negative?\n\n\n if (min === 'dataMin') {\n min = originalExtent[0];\n } else if (typeof min === 'function') {\n min = min({\n min: originalExtent[0],\n max: originalExtent[1]\n });\n }\n\n if (max === 'dataMax') {\n max = originalExtent[1];\n } else if (typeof max === 'function') {\n max = max({\n min: originalExtent[0],\n max: originalExtent[1]\n });\n }\n\n var fixMin = min != null;\n var fixMax = max != null;\n\n if (min == null) {\n min = scaleType === 'ordinal' ? axisDataLen ? 0 : NaN : originalExtent[0] - boundaryGap[0] * span;\n }\n\n if (max == null) {\n max = scaleType === 'ordinal' ? axisDataLen ? axisDataLen - 1 : NaN : originalExtent[1] + boundaryGap[1] * span;\n }\n\n (min == null || !isFinite(min)) && (min = NaN);\n (max == null || !isFinite(max)) && (max = NaN);\n scale.setBlank(zrUtil.eqNaN(min) || zrUtil.eqNaN(max) || scaleType === 'ordinal' && !scale.getOrdinalMeta().categories.length); // Evaluate if axis needs cross zero\n\n if (model.getNeedCrossZero()) {\n // Axis is over zero and min is not set\n if (min > 0 && max > 0 && !fixMin) {\n min = 0;\n } // Axis is under zero and max is not set\n\n\n if (min < 0 && max < 0 && !fixMax) {\n max = 0;\n }\n } // If bars are placed on a base axis of type time or interval account for axis boundary overflow and current axis\n // is base axis\n // FIXME\n // (1) Consider support value axis, where below zero and axis `onZero` should be handled properly.\n // (2) Refactor the logic with `barGrid`. Is it not need to `makeBarWidthAndOffsetInfo` twice with different extent?\n // Should not depend on series type `bar`?\n // (3) Fix that might overlap when using dataZoom.\n // (4) Consider other chart types using `barGrid`?\n // See #6728, #4862, `test/bar-overflow-time-plot.html`\n\n\n var ecModel = model.ecModel;\n\n if (ecModel && scaleType === 'time'\n /*|| scaleType === 'interval' */\n ) {\n var barSeriesModels = prepareLayoutBarSeries('bar', ecModel);\n var isBaseAxisAndHasBarSeries;\n zrUtil.each(barSeriesModels, function (seriesModel) {\n isBaseAxisAndHasBarSeries |= seriesModel.getBaseAxis() === model.axis;\n });\n\n if (isBaseAxisAndHasBarSeries) {\n // Calculate placement of bars on axis\n var barWidthAndOffset = makeColumnLayout(barSeriesModels); // Adjust axis min and max to account for overflow\n\n var adjustedScale = adjustScaleForOverflow(min, max, model, barWidthAndOffset);\n min = adjustedScale.min;\n max = adjustedScale.max;\n }\n }\n\n return {\n extent: [min, max],\n // \"fix\" means \"fixed\", the value should not be\n // changed in the subsequent steps.\n fixMin: fixMin,\n fixMax: fixMax\n };\n}\n\nfunction adjustScaleForOverflow(min, max, model, barWidthAndOffset) {\n // Get Axis Length\n var axisExtent = model.axis.getExtent();\n var axisLength = axisExtent[1] - axisExtent[0]; // Get bars on current base axis and calculate min and max overflow\n\n var barsOnCurrentAxis = retrieveColumnLayout(barWidthAndOffset, model.axis);\n\n if (barsOnCurrentAxis === undefined) {\n return {\n min: min,\n max: max\n };\n }\n\n var minOverflow = Infinity;\n zrUtil.each(barsOnCurrentAxis, function (item) {\n minOverflow = Math.min(item.offset, minOverflow);\n });\n var maxOverflow = -Infinity;\n zrUtil.each(barsOnCurrentAxis, function (item) {\n maxOverflow = Math.max(item.offset + item.width, maxOverflow);\n });\n minOverflow = Math.abs(minOverflow);\n maxOverflow = Math.abs(maxOverflow);\n var totalOverFlow = minOverflow + maxOverflow; // Calulate required buffer based on old range and overflow\n\n var oldRange = max - min;\n var oldRangePercentOfNew = 1 - (minOverflow + maxOverflow) / axisLength;\n var overflowBuffer = oldRange / oldRangePercentOfNew - oldRange;\n max += overflowBuffer * (maxOverflow / totalOverFlow);\n min -= overflowBuffer * (minOverflow / totalOverFlow);\n return {\n min: min,\n max: max\n };\n}\n\nfunction niceScaleExtent(scale, model) {\n var extentInfo = getScaleExtent(scale, model);\n var extent = extentInfo.extent;\n var splitNumber = model.get('splitNumber');\n\n if (scale.type === 'log') {\n scale.base = model.get('logBase');\n }\n\n var scaleType = scale.type;\n scale.setExtent(extent[0], extent[1]);\n scale.niceExtent({\n splitNumber: splitNumber,\n fixMin: extentInfo.fixMin,\n fixMax: extentInfo.fixMax,\n minInterval: scaleType === 'interval' || scaleType === 'time' ? model.get('minInterval') : null,\n maxInterval: scaleType === 'interval' || scaleType === 'time' ? model.get('maxInterval') : null\n }); // If some one specified the min, max. And the default calculated interval\n // is not good enough. He can specify the interval. It is often appeared\n // in angle axis with angle 0 - 360. Interval calculated in interval scale is hard\n // to be 60.\n // FIXME\n\n var interval = model.get('interval');\n\n if (interval != null) {\n scale.setInterval && scale.setInterval(interval);\n }\n}\n/**\n * @param {module:echarts/model/Model} model\n * @param {string} [axisType] Default retrieve from model.type\n * @return {module:echarts/scale/*}\n */\n\n\nfunction createScaleByModel(model, axisType) {\n axisType = axisType || model.get('type');\n\n if (axisType) {\n switch (axisType) {\n // Buildin scale\n case 'category':\n return new OrdinalScale(model.getOrdinalMeta ? model.getOrdinalMeta() : model.getCategories(), [Infinity, -Infinity]);\n\n case 'value':\n return new IntervalScale();\n // Extended scale, like time and log\n\n default:\n return (Scale.getClass(axisType) || IntervalScale).create(model);\n }\n }\n}\n/**\n * Check if the axis corss 0\n */\n\n\nfunction ifAxisCrossZero(axis) {\n var dataExtent = axis.scale.getExtent();\n var min = dataExtent[0];\n var max = dataExtent[1];\n return !(min > 0 && max > 0 || min < 0 && max < 0);\n}\n/**\n * @param {module:echarts/coord/Axis} axis\n * @return {Function} Label formatter function.\n * param: {number} tickValue,\n * param: {number} idx, the index in all ticks.\n * If category axis, this param is not requied.\n * return: {string} label string.\n */\n\n\nfunction makeLabelFormatter(axis) {\n var labelFormatter = axis.getLabelModel().get('formatter');\n var categoryTickStart = axis.type === 'category' ? axis.scale.getExtent()[0] : null;\n\n if (typeof labelFormatter === 'string') {\n labelFormatter = function (tpl) {\n return function (val) {\n // For category axis, get raw value; for numeric axis,\n // get foramtted label like '1,333,444'.\n val = axis.scale.getLabel(val);\n return tpl.replace('{value}', val != null ? val : '');\n };\n }(labelFormatter); // Consider empty array\n\n\n return labelFormatter;\n } else if (typeof labelFormatter === 'function') {\n return function (tickValue, idx) {\n // The original intention of `idx` is \"the index of the tick in all ticks\".\n // But the previous implementation of category axis do not consider the\n // `axisLabel.interval`, which cause that, for example, the `interval` is\n // `1`, then the ticks \"name5\", \"name7\", \"name9\" are displayed, where the\n // corresponding `idx` are `0`, `2`, `4`, but not `0`, `1`, `2`. So we keep\n // the definition here for back compatibility.\n if (categoryTickStart != null) {\n idx = tickValue - categoryTickStart;\n }\n\n return labelFormatter(getAxisRawValue(axis, tickValue), idx);\n };\n } else {\n return function (tick) {\n return axis.scale.getLabel(tick);\n };\n }\n}\n\nfunction getAxisRawValue(axis, value) {\n // In category axis with data zoom, tick is not the original\n // index of axis.data. So tick should not be exposed to user\n // in category axis.\n return axis.type === 'category' ? axis.scale.getLabel(value) : value;\n}\n/**\n * @param {module:echarts/coord/Axis} axis\n * @return {module:zrender/core/BoundingRect} Be null/undefined if no labels.\n */\n\n\nfunction estimateLabelUnionRect(axis) {\n var axisModel = axis.model;\n var scale = axis.scale;\n\n if (!axisModel.get('axisLabel.show') || scale.isBlank()) {\n return;\n }\n\n var isCategory = axis.type === 'category';\n var realNumberScaleTicks;\n var tickCount;\n var categoryScaleExtent = scale.getExtent(); // Optimize for large category data, avoid call `getTicks()`.\n\n if (isCategory) {\n tickCount = scale.count();\n } else {\n realNumberScaleTicks = scale.getTicks();\n tickCount = realNumberScaleTicks.length;\n }\n\n var axisLabelModel = axis.getLabelModel();\n var labelFormatter = makeLabelFormatter(axis);\n var rect;\n var step = 1; // Simple optimization for large amount of labels\n\n if (tickCount > 40) {\n step = Math.ceil(tickCount / 40);\n }\n\n for (var i = 0; i < tickCount; i += step) {\n var tickValue = realNumberScaleTicks ? realNumberScaleTicks[i] : categoryScaleExtent[0] + i;\n var label = labelFormatter(tickValue);\n var unrotatedSingleRect = axisLabelModel.getTextRect(label);\n var singleRect = rotateTextRect(unrotatedSingleRect, axisLabelModel.get('rotate') || 0);\n rect ? rect.union(singleRect) : rect = singleRect;\n }\n\n return rect;\n}\n\nfunction rotateTextRect(textRect, rotate) {\n var rotateRadians = rotate * Math.PI / 180;\n var boundingBox = textRect.plain();\n var beforeWidth = boundingBox.width;\n var beforeHeight = boundingBox.height;\n var afterWidth = beforeWidth * Math.abs(Math.cos(rotateRadians)) + Math.abs(beforeHeight * Math.sin(rotateRadians));\n var afterHeight = beforeWidth * Math.abs(Math.sin(rotateRadians)) + Math.abs(beforeHeight * Math.cos(rotateRadians));\n var rotatedRect = new BoundingRect(boundingBox.x, boundingBox.y, afterWidth, afterHeight);\n return rotatedRect;\n}\n/**\n * @param {module:echarts/src/model/Model} model axisLabelModel or axisTickModel\n * @return {number|String} Can be null|'auto'|number|function\n */\n\n\nfunction getOptionCategoryInterval(model) {\n var interval = model.get('interval');\n return interval == null ? 'auto' : interval;\n}\n/**\n * Set `categoryInterval` as 0 implicitly indicates that\n * show all labels reguardless of overlap.\n * @param {Object} axis axisModel.axis\n * @return {boolean}\n */\n\n\nfunction shouldShowAllLabels(axis) {\n return axis.type === 'category' && getOptionCategoryInterval(axis.getLabelModel()) === 0;\n}\n\nexports.getScaleExtent = getScaleExtent;\nexports.niceScaleExtent = niceScaleExtent;\nexports.createScaleByModel = createScaleByModel;\nexports.ifAxisCrossZero = ifAxisCrossZero;\nexports.makeLabelFormatter = makeLabelFormatter;\nexports.getAxisRawValue = getAxisRawValue;\nexports.estimateLabelUnionRect = estimateLabelUnionRect;\nexports.getOptionCategoryInterval = getOptionCategoryInterval;\nexports.shouldShowAllLabels = shouldShowAllLabels;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 map = _util.map;\nvar isFunction = _util.isFunction;\nvar createHashMap = _util.createHashMap;\nvar noop = _util.noop;\n\nvar _task = require(\"./task\");\n\nvar createTask = _task.createTask;\n\nvar _component = require(\"../util/component\");\n\nvar getUID = _component.getUID;\n\nvar GlobalModel = require(\"../model/Global\");\n\nvar ExtensionAPI = require(\"../ExtensionAPI\");\n\nvar _model = require(\"../util/model\");\n\nvar normalizeToArray = _model.normalizeToArray;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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/stream/Scheduler\n */\n\n/**\n * @constructor\n */\nfunction Scheduler(ecInstance, api, dataProcessorHandlers, visualHandlers) {\n this.ecInstance = ecInstance;\n this.api = api;\n this.unfinished; // Fix current processors in case that in some rear cases that\n // processors might be registered after echarts instance created.\n // Register processors incrementally for a echarts instance is\n // not supported by this stream architecture.\n\n var dataProcessorHandlers = this._dataProcessorHandlers = dataProcessorHandlers.slice();\n var visualHandlers = this._visualHandlers = visualHandlers.slice();\n this._allHandlers = dataProcessorHandlers.concat(visualHandlers);\n /**\n * @private\n * @type {\n * [handlerUID: string]: {\n * seriesTaskMap?: {\n * [seriesUID: string]: Task\n * },\n * overallTask?: Task\n * }\n * }\n */\n\n this._stageTaskMap = createHashMap();\n}\n\nvar proto = Scheduler.prototype;\n/**\n * @param {module:echarts/model/Global} ecModel\n * @param {Object} payload\n */\n\nproto.restoreData = function (ecModel, payload) {\n // TODO: Only restore needed series and components, but not all components.\n // Currently `restoreData` of all of the series and component will be called.\n // But some independent components like `title`, `legend`, `graphic`, `toolbox`,\n // `tooltip`, `axisPointer`, etc, do not need series refresh when `setOption`,\n // and some components like coordinate system, axes, dataZoom, visualMap only\n // need their target series refresh.\n // (1) If we are implementing this feature some day, we should consider these cases:\n // if a data processor depends on a component (e.g., dataZoomProcessor depends\n // on the settings of `dataZoom`), it should be re-performed if the component\n // is modified by `setOption`.\n // (2) If a processor depends on sevral series, speicified by its `getTargetSeries`,\n // it should be re-performed when the result array of `getTargetSeries` changed.\n // We use `dependencies` to cover these issues.\n // (3) How to update target series when coordinate system related components modified.\n // TODO: simply the dirty mechanism? Check whether only the case here can set tasks dirty,\n // and this case all of the tasks will be set as dirty.\n ecModel.restoreData(payload); // Theoretically an overall task not only depends on each of its target series, but also\n // depends on all of the series.\n // The overall task is not in pipeline, and `ecModel.restoreData` only set pipeline tasks\n // dirty. If `getTargetSeries` of an overall task returns nothing, we should also ensure\n // that the overall task is set as dirty and to be performed, otherwise it probably cause\n // state chaos. So we have to set dirty of all of the overall tasks manually, otherwise it\n // probably cause state chaos (consider `dataZoomProcessor`).\n\n this._stageTaskMap.each(function (taskRecord) {\n var overallTask = taskRecord.overallTask;\n overallTask && overallTask.dirty();\n });\n}; // If seriesModel provided, incremental threshold is check by series data.\n\n\nproto.getPerformArgs = function (task, isBlock) {\n // For overall task\n if (!task.__pipeline) {\n return;\n }\n\n var pipeline = this._pipelineMap.get(task.__pipeline.id);\n\n var pCtx = pipeline.context;\n var incremental = !isBlock && pipeline.progressiveEnabled && (!pCtx || pCtx.progressiveRender) && task.__idxInPipeline > pipeline.blockIndex;\n var step = incremental ? pipeline.step : null;\n var modDataCount = pCtx && pCtx.modDataCount;\n var modBy = modDataCount != null ? Math.ceil(modDataCount / step) : null;\n return {\n step: step,\n modBy: modBy,\n modDataCount: modDataCount\n };\n};\n\nproto.getPipeline = function (pipelineId) {\n return this._pipelineMap.get(pipelineId);\n};\n/**\n * Current, progressive rendering starts from visual and layout.\n * Always detect render mode in the same stage, avoiding that incorrect\n * detection caused by data filtering.\n * Caution:\n * `updateStreamModes` use `seriesModel.getData()`.\n */\n\n\nproto.updateStreamModes = function (seriesModel, view) {\n var pipeline = this._pipelineMap.get(seriesModel.uid);\n\n var data = seriesModel.getData();\n var dataLen = data.count(); // `progressiveRender` means that can render progressively in each\n // animation frame. Note that some types of series do not provide\n // `view.incrementalPrepareRender` but support `chart.appendData`. We\n // use the term `incremental` but not `progressive` to describe the\n // case that `chart.appendData`.\n\n var progressiveRender = pipeline.progressiveEnabled && view.incrementalPrepareRender && dataLen >= pipeline.threshold;\n var large = seriesModel.get('large') && dataLen >= seriesModel.get('largeThreshold'); // TODO: modDataCount should not updated if `appendData`, otherwise cause whole repaint.\n // see `test/candlestick-large3.html`\n\n var modDataCount = seriesModel.get('progressiveChunkMode') === 'mod' ? dataLen : null;\n seriesModel.pipelineContext = pipeline.context = {\n progressiveRender: progressiveRender,\n modDataCount: modDataCount,\n large: large\n };\n};\n\nproto.restorePipelines = function (ecModel) {\n var scheduler = this;\n var pipelineMap = scheduler._pipelineMap = createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n var progressive = seriesModel.getProgressive();\n var pipelineId = seriesModel.uid;\n pipelineMap.set(pipelineId, {\n id: pipelineId,\n head: null,\n tail: null,\n threshold: seriesModel.getProgressiveThreshold(),\n progressiveEnabled: progressive && !(seriesModel.preventIncremental && seriesModel.preventIncremental()),\n blockIndex: -1,\n step: Math.round(progressive || 700),\n count: 0\n });\n pipe(scheduler, seriesModel, seriesModel.dataTask);\n });\n};\n\nproto.prepareStageTasks = function () {\n var stageTaskMap = this._stageTaskMap;\n var ecModel = this.ecInstance.getModel();\n var api = this.api;\n each(this._allHandlers, function (handler) {\n var record = stageTaskMap.get(handler.uid) || stageTaskMap.set(handler.uid, []);\n handler.reset && createSeriesStageTask(this, handler, record, ecModel, api);\n handler.overallReset && createOverallStageTask(this, handler, record, ecModel, api);\n }, this);\n};\n\nproto.prepareView = function (view, model, ecModel, api) {\n var renderTask = view.renderTask;\n var context = renderTask.context;\n context.model = model;\n context.ecModel = ecModel;\n context.api = api;\n renderTask.__block = !view.incrementalPrepareRender;\n pipe(this, model, renderTask);\n};\n\nproto.performDataProcessorTasks = function (ecModel, payload) {\n // If we do not use `block` here, it should be considered when to update modes.\n performStageTasks(this, this._dataProcessorHandlers, ecModel, payload, {\n block: true\n });\n}; // opt\n// opt.visualType: 'visual' or 'layout'\n// opt.setDirty\n\n\nproto.performVisualTasks = function (ecModel, payload, opt) {\n performStageTasks(this, this._visualHandlers, ecModel, payload, opt);\n};\n\nfunction performStageTasks(scheduler, stageHandlers, ecModel, payload, opt) {\n opt = opt || {};\n var unfinished;\n each(stageHandlers, function (stageHandler, idx) {\n if (opt.visualType && opt.visualType !== stageHandler.visualType) {\n return;\n }\n\n var stageHandlerRecord = scheduler._stageTaskMap.get(stageHandler.uid);\n\n var seriesTaskMap = stageHandlerRecord.seriesTaskMap;\n var overallTask = stageHandlerRecord.overallTask;\n\n if (overallTask) {\n var overallNeedDirty;\n var agentStubMap = overallTask.agentStubMap;\n agentStubMap.each(function (stub) {\n if (needSetDirty(opt, stub)) {\n stub.dirty();\n overallNeedDirty = true;\n }\n });\n overallNeedDirty && overallTask.dirty();\n updatePayload(overallTask, payload);\n var performArgs = scheduler.getPerformArgs(overallTask, opt.block); // Execute stubs firstly, which may set the overall task dirty,\n // then execute the overall task. And stub will call seriesModel.setData,\n // which ensures that in the overallTask seriesModel.getData() will not\n // return incorrect data.\n\n agentStubMap.each(function (stub) {\n stub.perform(performArgs);\n });\n unfinished |= overallTask.perform(performArgs);\n } else if (seriesTaskMap) {\n seriesTaskMap.each(function (task, pipelineId) {\n if (needSetDirty(opt, task)) {\n task.dirty();\n }\n\n var performArgs = scheduler.getPerformArgs(task, opt.block); // FIXME\n // if intending to decalare `performRawSeries` in handlers, only\n // stream-independent (specifically, data item independent) operations can be\n // performed. Because is a series is filtered, most of the tasks will not\n // be performed. A stream-dependent operation probably cause wrong biz logic.\n // Perhaps we should not provide a separate callback for this case instead\n // of providing the config `performRawSeries`. The stream-dependent operaions\n // and stream-independent operations should better not be mixed.\n\n performArgs.skip = !stageHandler.performRawSeries && ecModel.isSeriesFiltered(task.context.model);\n updatePayload(task, payload);\n unfinished |= task.perform(performArgs);\n });\n }\n });\n\n function needSetDirty(opt, task) {\n return opt.setDirty && (!opt.dirtyMap || opt.dirtyMap.get(task.__pipeline.id));\n }\n\n scheduler.unfinished |= unfinished;\n}\n\nproto.performSeriesTasks = function (ecModel) {\n var unfinished;\n ecModel.eachSeries(function (seriesModel) {\n // Progress to the end for dataInit and dataRestore.\n unfinished |= seriesModel.dataTask.perform();\n });\n this.unfinished |= unfinished;\n};\n\nproto.plan = function () {\n // Travel pipelines, check block.\n this._pipelineMap.each(function (pipeline) {\n var task = pipeline.tail;\n\n do {\n if (task.__block) {\n pipeline.blockIndex = task.__idxInPipeline;\n break;\n }\n\n task = task.getUpstream();\n } while (task);\n });\n};\n\nvar updatePayload = proto.updatePayload = function (task, payload) {\n payload !== 'remain' && (task.context.payload = payload);\n};\n\nfunction createSeriesStageTask(scheduler, stageHandler, stageHandlerRecord, ecModel, api) {\n var seriesTaskMap = stageHandlerRecord.seriesTaskMap || (stageHandlerRecord.seriesTaskMap = createHashMap());\n var seriesType = stageHandler.seriesType;\n var getTargetSeries = stageHandler.getTargetSeries; // If a stageHandler should cover all series, `createOnAllSeries` should be declared mandatorily,\n // to avoid some typo or abuse. Otherwise if an extension do not specify a `seriesType`,\n // it works but it may cause other irrelevant charts blocked.\n\n if (stageHandler.createOnAllSeries) {\n ecModel.eachRawSeries(create);\n } else if (seriesType) {\n ecModel.eachRawSeriesByType(seriesType, create);\n } else if (getTargetSeries) {\n getTargetSeries(ecModel, api).each(create);\n }\n\n function create(seriesModel) {\n var pipelineId = seriesModel.uid; // Init tasks for each seriesModel only once.\n // Reuse original task instance.\n\n var task = seriesTaskMap.get(pipelineId) || seriesTaskMap.set(pipelineId, createTask({\n plan: seriesTaskPlan,\n reset: seriesTaskReset,\n count: seriesTaskCount\n }));\n task.context = {\n model: seriesModel,\n ecModel: ecModel,\n api: api,\n useClearVisual: stageHandler.isVisual && !stageHandler.isLayout,\n plan: stageHandler.plan,\n reset: stageHandler.reset,\n scheduler: scheduler\n };\n pipe(scheduler, seriesModel, task);\n } // Clear unused series tasks.\n\n\n var pipelineMap = scheduler._pipelineMap;\n seriesTaskMap.each(function (task, pipelineId) {\n if (!pipelineMap.get(pipelineId)) {\n task.dispose();\n seriesTaskMap.removeKey(pipelineId);\n }\n });\n}\n\nfunction createOverallStageTask(scheduler, stageHandler, stageHandlerRecord, ecModel, api) {\n var overallTask = stageHandlerRecord.overallTask = stageHandlerRecord.overallTask // For overall task, the function only be called on reset stage.\n || createTask({\n reset: overallTaskReset\n });\n overallTask.context = {\n ecModel: ecModel,\n api: api,\n overallReset: stageHandler.overallReset,\n scheduler: scheduler\n }; // Reuse orignal stubs.\n\n var agentStubMap = overallTask.agentStubMap = overallTask.agentStubMap || createHashMap();\n var seriesType = stageHandler.seriesType;\n var getTargetSeries = stageHandler.getTargetSeries;\n var overallProgress = true;\n var modifyOutputEnd = stageHandler.modifyOutputEnd; // An overall task with seriesType detected or has `getTargetSeries`, we add\n // stub in each pipelines, it will set the overall task dirty when the pipeline\n // progress. Moreover, to avoid call the overall task each frame (too frequent),\n // we set the pipeline block.\n\n if (seriesType) {\n ecModel.eachRawSeriesByType(seriesType, createStub);\n } else if (getTargetSeries) {\n getTargetSeries(ecModel, api).each(createStub);\n } // Otherwise, (usually it is legancy case), the overall task will only be\n // executed when upstream dirty. Otherwise the progressive rendering of all\n // pipelines will be disabled unexpectedly. But it still needs stubs to receive\n // dirty info from upsteam.\n else {\n overallProgress = false;\n each(ecModel.getSeries(), createStub);\n }\n\n function createStub(seriesModel) {\n var pipelineId = seriesModel.uid;\n var stub = agentStubMap.get(pipelineId);\n\n if (!stub) {\n stub = agentStubMap.set(pipelineId, createTask({\n reset: stubReset,\n onDirty: stubOnDirty\n })); // When the result of `getTargetSeries` changed, the overallTask\n // should be set as dirty and re-performed.\n\n overallTask.dirty();\n }\n\n stub.context = {\n model: seriesModel,\n overallProgress: overallProgress,\n modifyOutputEnd: modifyOutputEnd\n };\n stub.agent = overallTask;\n stub.__block = overallProgress;\n pipe(scheduler, seriesModel, stub);\n } // Clear unused stubs.\n\n\n var pipelineMap = scheduler._pipelineMap;\n agentStubMap.each(function (stub, pipelineId) {\n if (!pipelineMap.get(pipelineId)) {\n stub.dispose(); // When the result of `getTargetSeries` changed, the overallTask\n // should be set as dirty and re-performed.\n\n overallTask.dirty();\n agentStubMap.removeKey(pipelineId);\n }\n });\n}\n\nfunction overallTaskReset(context) {\n context.overallReset(context.ecModel, context.api, context.payload);\n}\n\nfunction stubReset(context, upstreamContext) {\n return context.overallProgress && stubProgress;\n}\n\nfunction stubProgress() {\n this.agent.dirty();\n this.getDownstream().dirty();\n}\n\nfunction stubOnDirty() {\n this.agent && this.agent.dirty();\n}\n\nfunction seriesTaskPlan(context) {\n return context.plan && context.plan(context.model, context.ecModel, context.api, context.payload);\n}\n\nfunction seriesTaskReset(context) {\n if (context.useClearVisual) {\n context.data.clearAllVisual();\n }\n\n var resetDefines = context.resetDefines = normalizeToArray(context.reset(context.model, context.ecModel, context.api, context.payload));\n return resetDefines.length > 1 ? map(resetDefines, function (v, idx) {\n return makeSeriesTaskProgress(idx);\n }) : singleSeriesTaskProgress;\n}\n\nvar singleSeriesTaskProgress = makeSeriesTaskProgress(0);\n\nfunction makeSeriesTaskProgress(resetDefineIdx) {\n return function (params, context) {\n var data = context.data;\n var resetDefine = context.resetDefines[resetDefineIdx];\n\n if (resetDefine && resetDefine.dataEach) {\n for (var i = params.start; i < params.end; i++) {\n resetDefine.dataEach(data, i);\n }\n } else if (resetDefine && resetDefine.progress) {\n resetDefine.progress(params, data);\n }\n };\n}\n\nfunction seriesTaskCount(context) {\n return context.data.count();\n}\n\nfunction pipe(scheduler, seriesModel, task) {\n var pipelineId = seriesModel.uid;\n\n var pipeline = scheduler._pipelineMap.get(pipelineId);\n\n !pipeline.head && (pipeline.head = task);\n pipeline.tail && pipeline.tail.pipe(task);\n pipeline.tail = task;\n task.__idxInPipeline = pipeline.count++;\n task.__pipeline = pipeline;\n}\n\nScheduler.wrapStageHandler = function (stageHandler, visualType) {\n if (isFunction(stageHandler)) {\n stageHandler = {\n overallReset: stageHandler,\n seriesType: detectSeriseType(stageHandler)\n };\n }\n\n stageHandler.uid = getUID('stageHandler');\n visualType && (stageHandler.visualType = visualType);\n return stageHandler;\n};\n/**\n * Only some legacy stage handlers (usually in echarts extensions) are pure function.\n * To ensure that they can work normally, they should work in block mode, that is,\n * they should not be started util the previous tasks finished. So they cause the\n * progressive rendering disabled. We try to detect the series type, to narrow down\n * the block range to only the series type they concern, but not all series.\n */\n\n\nfunction detectSeriseType(legacyFunc) {\n seriesType = null;\n\n try {\n // Assume there is no async when calling `eachSeriesByType`.\n legacyFunc(ecModelMock, apiMock);\n } catch (e) {}\n\n return seriesType;\n}\n\nvar ecModelMock = {};\nvar apiMock = {};\nvar seriesType;\nmockMethods(ecModelMock, GlobalModel);\nmockMethods(apiMock, ExtensionAPI);\n\necModelMock.eachSeriesByType = ecModelMock.eachRawSeriesByType = function (type) {\n seriesType = type;\n};\n\necModelMock.eachComponent = function (cond) {\n if (cond.mainType === 'series' && cond.subType) {\n seriesType = cond.subType;\n }\n};\n\nfunction mockMethods(target, Clz) {\n /* eslint-disable */\n for (var name in Clz.prototype) {\n // Do not use hasOwnProperty\n target[name] = noop;\n }\n /* eslint-enable */\n\n}\n\nvar _default = Scheduler;\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 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\nvar formatUtil = require(\"../../util/format\");\n\nvar BaseAxisPointer = require(\"./BaseAxisPointer\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar viewHelper = require(\"./viewHelper\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar AxisBuilder = require(\"../axis/AxisBuilder\");\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 PolarAxisPointer = BaseAxisPointer.extend({\n /**\n * @override\n */\n makeElOption: function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n\n if (axis.dim === 'angle') {\n this.animationThreshold = Math.PI / 18;\n }\n\n var polar = axis.polar;\n var otherAxis = polar.getOtherAxis(axis);\n var otherExtent = otherAxis.getExtent();\n var coordValue;\n coordValue = axis['dataTo' + formatUtil.capitalFirst(axis.dim)](value);\n var axisPointerType = axisPointerModel.get('type');\n\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, polar, coordValue, otherExtent, elStyle);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n\n var labelMargin = axisPointerModel.get('label.margin');\n var labelPos = getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin);\n viewHelper.buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos);\n } // Do not support handle, utill any user requires it.\n\n});\n\nfunction getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin) {\n var axis = axisModel.axis;\n var coord = axis.dataToCoord(value);\n var axisAngle = polar.getAngleAxis().getExtent()[0];\n axisAngle = axisAngle / 180 * Math.PI;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var position;\n var align;\n var verticalAlign;\n\n if (axis.dim === 'radius') {\n var transform = matrix.create();\n matrix.rotate(transform, transform, axisAngle);\n matrix.translate(transform, transform, [polar.cx, polar.cy]);\n position = graphic.applyTransform([coord, -labelMargin], transform);\n var labelRotation = axisModel.getModel('axisLabel').get('rotate') || 0;\n var labelLayout = AxisBuilder.innerTextLayout(axisAngle, labelRotation * Math.PI / 180, -1);\n align = labelLayout.textAlign;\n verticalAlign = labelLayout.textVerticalAlign;\n } else {\n // angle axis\n var r = radiusExtent[1];\n position = polar.coordToPoint([r + labelMargin, coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n align = Math.abs(position[0] - cx) / r < 0.3 ? 'center' : position[0] > cx ? 'left' : 'right';\n verticalAlign = Math.abs(position[1] - cy) / r < 0.3 ? 'middle' : position[1] > cy ? 'top' : 'bottom';\n }\n\n return {\n position: position,\n align: align,\n verticalAlign: verticalAlign\n };\n}\n\nvar pointerShapeBuilder = {\n line: function (axis, polar, coordValue, otherExtent, elStyle) {\n return axis.dim === 'angle' ? {\n type: 'Line',\n shape: viewHelper.makeLineShape(polar.coordToPoint([otherExtent[0], coordValue]), polar.coordToPoint([otherExtent[1], coordValue]))\n } : {\n type: 'Circle',\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: coordValue\n }\n };\n },\n shadow: function (axis, polar, coordValue, otherExtent, elStyle) {\n var bandWidth = Math.max(1, axis.getBandWidth());\n var radian = Math.PI / 180;\n return axis.dim === 'angle' ? {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, otherExtent[0], otherExtent[1], // In ECharts y is negative if angle is positive\n (-coordValue - bandWidth / 2) * radian, (-coordValue + bandWidth / 2) * radian)\n } : {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, coordValue - bandWidth / 2, coordValue + bandWidth / 2, 0, Math.PI * 2)\n };\n }\n};\nAxisView.registerAxisPointerClass('PolarAxisPointer', PolarAxisPointer);\nvar _default = PolarAxisPointer;\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 Model = require(\"./Model\");\n\nvar componentUtil = require(\"../util/component\");\n\nvar _clazz = require(\"../util/clazz\");\n\nvar enableClassManagement = _clazz.enableClassManagement;\nvar parseClassType = _clazz.parseClassType;\n\nvar _model = require(\"../util/model\");\n\nvar makeInner = _model.makeInner;\n\nvar layout = require(\"../util/layout\");\n\nvar boxLayoutMixin = require(\"./mixin/boxLayout\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * Component model\n *\n * @module echarts/model/Component\n */\nvar inner = makeInner();\n/**\n * @alias module:echarts/model/Component\n * @constructor\n * @param {Object} option\n * @param {module:echarts/model/Model} parentModel\n * @param {module:echarts/model/Model} ecModel\n */\n\nvar ComponentModel = Model.extend({\n type: 'component',\n\n /**\n * @readOnly\n * @type {string}\n */\n id: '',\n\n /**\n * Because simplified concept is probably better, series.name (or component.name)\n * has been having too many resposibilities:\n * (1) Generating id (which requires name in option should not be modified).\n * (2) As an index to mapping series when merging option or calling API (a name\n * can refer to more then one components, which is convinient is some case).\n * (3) Display.\n * @readOnly\n */\n name: '',\n\n /**\n * @readOnly\n * @type {string}\n */\n mainType: '',\n\n /**\n * @readOnly\n * @type {string}\n */\n subType: '',\n\n /**\n * @readOnly\n * @type {number}\n */\n componentIndex: 0,\n\n /**\n * @type {Object}\n * @protected\n */\n defaultOption: null,\n\n /**\n * @type {module:echarts/model/Global}\n * @readOnly\n */\n ecModel: null,\n\n /**\n * key: componentType\n * value: Component model list, can not be null.\n * @type {Object.>}\n * @readOnly\n */\n dependentModels: [],\n\n /**\n * @type {string}\n * @readOnly\n */\n uid: null,\n\n /**\n * Support merge layout params.\n * Only support 'box' now (left/right/top/bottom/width/height).\n * @type {string|Object} Object can be {ignoreSize: true}\n * @readOnly\n */\n layoutMode: null,\n $constructor: function (option, parentModel, ecModel, extraOpt) {\n Model.call(this, option, parentModel, ecModel, extraOpt);\n this.uid = componentUtil.getUID('ec_cpt_model');\n },\n init: function (option, parentModel, ecModel, extraOpt) {\n this.mergeDefaultAndTheme(option, ecModel);\n },\n mergeDefaultAndTheme: function (option, ecModel) {\n var layoutMode = this.layoutMode;\n var inputPositionParams = layoutMode ? layout.getLayoutParams(option) : {};\n var themeModel = ecModel.getTheme();\n zrUtil.merge(option, themeModel.get(this.mainType));\n zrUtil.merge(option, this.getDefaultOption());\n\n if (layoutMode) {\n layout.mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n },\n mergeOption: function (option, extraOpt) {\n zrUtil.merge(this.option, option, true);\n var layoutMode = this.layoutMode;\n\n if (layoutMode) {\n layout.mergeLayoutParam(this.option, option, layoutMode);\n }\n },\n // Hooker after init or mergeOption\n optionUpdated: function (newCptOption, isInit) {},\n getDefaultOption: function () {\n var fields = inner(this);\n\n if (!fields.defaultOption) {\n var optList = [];\n var Class = this.constructor;\n\n while (Class) {\n var opt = Class.prototype.defaultOption;\n opt && optList.push(opt);\n Class = Class.superClass;\n }\n\n var defaultOption = {};\n\n for (var i = optList.length - 1; i >= 0; i--) {\n defaultOption = zrUtil.merge(defaultOption, optList[i], true);\n }\n\n fields.defaultOption = defaultOption;\n }\n\n return fields.defaultOption;\n },\n getReferringComponents: function (mainType) {\n return this.ecModel.queryComponents({\n mainType: mainType,\n index: this.get(mainType + 'Index', true),\n id: this.get(mainType + 'Id', true)\n });\n }\n}); // Reset ComponentModel.extend, add preConstruct.\n// clazzUtil.enableClassExtend(\n// ComponentModel,\n// function (option, parentModel, ecModel, extraOpt) {\n// // Set dependentModels, componentIndex, name, id, mainType, subType.\n// zrUtil.extend(this, extraOpt);\n// this.uid = componentUtil.getUID('componentModel');\n// // this.setReadOnly([\n// // 'type', 'id', 'uid', 'name', 'mainType', 'subType',\n// // 'dependentModels', 'componentIndex'\n// // ]);\n// }\n// );\n// Add capability of registerClass, getClass, hasClass, registerSubTypeDefaulter and so on.\n\nenableClassManagement(ComponentModel, {\n registerWhenExtend: true\n});\ncomponentUtil.enableSubTypeDefaulter(ComponentModel); // Add capability of ComponentModel.topologicalTravel.\n\ncomponentUtil.enableTopologicalTravel(ComponentModel, getDependencies);\n\nfunction getDependencies(componentType) {\n var deps = [];\n zrUtil.each(ComponentModel.getClassesByMainType(componentType), function (Clazz) {\n deps = deps.concat(Clazz.prototype.dependencies || []);\n }); // Ensure main type.\n\n deps = zrUtil.map(deps, function (type) {\n return parseClassType(type).main;\n }); // Hack dataset for convenience.\n\n if (componentType !== 'dataset' && zrUtil.indexOf(deps, 'dataset') <= 0) {\n deps.unshift('dataset');\n }\n\n return deps;\n}\n\nzrUtil.mixin(ComponentModel, boxLayoutMixin);\nvar _default = ComponentModel;\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 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 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 defaultOption = {\n show: true,\n zlevel: 0,\n z: 0,\n // Inverse the axis.\n inverse: false,\n // Axis name displayed.\n name: '',\n // 'start' | 'middle' | 'end'\n nameLocation: 'end',\n // By degree. By default auto rotate by nameLocation.\n nameRotate: null,\n nameTruncate: {\n maxWidth: null,\n ellipsis: '...',\n placeholder: '.'\n },\n // Use global text style by default.\n nameTextStyle: {},\n // The gap between axisName and axisLine.\n nameGap: 15,\n // Default `false` to support tooltip.\n silent: false,\n // Default `false` to avoid legacy user event listener fail.\n triggerEvent: false,\n tooltip: {\n show: false\n },\n axisPointer: {},\n axisLine: {\n show: true,\n onZero: true,\n onZeroAxisIndex: null,\n lineStyle: {\n color: '#333',\n width: 1,\n type: 'solid'\n },\n // The arrow at both ends the the axis.\n symbol: ['none', 'none'],\n symbolSize: [10, 15]\n },\n axisTick: {\n show: true,\n // Whether axisTick is inside the grid or outside the grid.\n inside: false,\n // The length of axisTick.\n length: 5,\n lineStyle: {\n width: 1\n }\n },\n axisLabel: {\n show: true,\n // Whether axisLabel is inside the grid or outside the grid.\n inside: false,\n rotate: 0,\n // true | false | null/undefined (auto)\n showMinLabel: null,\n // true | false | null/undefined (auto)\n showMaxLabel: null,\n margin: 8,\n // formatter: null,\n fontSize: 12\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: ['#ccc'],\n width: 1,\n type: 'solid'\n }\n },\n splitArea: {\n show: false,\n areaStyle: {\n color: ['rgba(250,250,250,0.3)', 'rgba(200,200,200,0.3)']\n }\n }\n};\nvar axisDefault = {};\naxisDefault.categoryAxis = zrUtil.merge({\n // The gap at both ends of the axis. For categoryAxis, boolean.\n boundaryGap: true,\n // Set false to faster category collection.\n // Only usefull in the case like: category is\n // ['2012-01-01', '2012-01-02', ...], where the input\n // data has been ensured not duplicate and is large data.\n // null means \"auto\":\n // if axis.data provided, do not deduplication,\n // else do deduplication.\n deduplication: null,\n // splitArea: {\n // show: false\n // },\n splitLine: {\n show: false\n },\n axisTick: {\n // If tick is align with label when boundaryGap is true\n alignWithLabel: false,\n interval: 'auto'\n },\n axisLabel: {\n interval: 'auto'\n }\n}, defaultOption);\naxisDefault.valueAxis = zrUtil.merge({\n // The gap at both ends of the axis. For value axis, [GAP, GAP], where\n // `GAP` can be an absolute pixel number (like `35`), or percent (like `'30%'`)\n boundaryGap: [0, 0],\n // TODO\n // min/max: [30, datamin, 60] or [20, datamin] or [datamin, 60]\n // Min value of the axis. can be:\n // + a number\n // + 'dataMin': use the min value in data.\n // + null/undefined: auto decide min value (consider pretty look and boundaryGap).\n // min: null,\n // Max value of the axis. can be:\n // + a number\n // + 'dataMax': use the max value in data.\n // + null/undefined: auto decide max value (consider pretty look and boundaryGap).\n // max: null,\n // Readonly prop, specifies start value of the range when using data zoom.\n // rangeStart: null\n // Readonly prop, specifies end value of the range when using data zoom.\n // rangeEnd: null\n // Optional value can be:\n // + `false`: always include value 0.\n // + `true`: the extent do not consider value 0.\n // scale: false,\n // AxisTick and axisLabel and splitLine are caculated based on splitNumber.\n splitNumber: 5,\n // Interval specifies the span of the ticks is mandatorily.\n // interval: null\n // Specify min interval when auto calculate tick interval.\n // minInterval: null\n // Specify max interval when auto calculate tick interval.\n // maxInterval: null\n minorTick: {\n // Minor tick, not available for cateogry axis.\n show: false,\n // Split number of minor ticks. The value should be in range of (0, 100)\n splitNumber: 5,\n // Lenght of minor tick\n length: 3,\n // Same inside with axisTick\n // Line style\n lineStyle: {// Default to be same with axisTick\n }\n },\n minorSplitLine: {\n show: false,\n lineStyle: {\n color: '#eee',\n width: 1\n }\n }\n}, defaultOption);\naxisDefault.timeAxis = zrUtil.defaults({\n scale: true,\n min: 'dataMin',\n max: 'dataMax'\n}, axisDefault.valueAxis);\naxisDefault.logAxis = zrUtil.defaults({\n scale: true,\n logBase: 10\n}, axisDefault.valueAxis);\nvar _default = axisDefault;\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 echarts = require(\"../../echarts\");\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 = echarts.extendComponentModel({\n type: 'polar',\n dependencies: ['polarAxis', 'angleAxis'],\n\n /**\n * @type {module:echarts/coord/polar/Polar}\n */\n coordinateSystem: null,\n\n /**\n * @param {string} axisType\n * @return {module:echarts/coord/polar/AxisModel}\n */\n findAxisModel: function (axisType) {\n var foundAxisModel;\n var ecModel = this.ecModel;\n ecModel.eachComponent(axisType, function (axisModel) {\n if (axisModel.getCoordSysModel() === this) {\n foundAxisModel = axisModel;\n }\n }, this);\n return foundAxisModel;\n },\n defaultOption: {\n zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '80%'\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\nrequire(\"../coord/polar/polarCreator\");\n\nrequire(\"./axis/RadiusAxisView\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 _util = require(\"zrender/lib/core/util\");\n\nvar each = _util.each;\nvar filter = _util.filter;\nvar map = _util.map;\nvar isArray = _util.isArray;\nvar indexOf = _util.indexOf;\nvar isObject = _util.isObject;\nvar isString = _util.isString;\nvar createHashMap = _util.createHashMap;\nvar assert = _util.assert;\nvar clone = _util.clone;\nvar merge = _util.merge;\nvar extend = _util.extend;\nvar mixin = _util.mixin;\n\nvar modelUtil = require(\"../util/model\");\n\nvar Model = require(\"./Model\");\n\nvar ComponentModel = require(\"./Component\");\n\nvar globalDefault = require(\"./globalDefault\");\n\nvar colorPaletteMixin = require(\"./mixin/colorPalette\");\n\nvar _sourceHelper = require(\"../data/helper/sourceHelper\");\n\nvar resetSourceDefaulter = _sourceHelper.resetSourceDefaulter;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * ECharts global model\n *\n * @module {echarts/model/Global}\n */\n\n/**\n * Caution: If the mechanism should be changed some day, these cases\n * should be considered:\n *\n * (1) In `merge option` mode, if using the same option to call `setOption`\n * many times, the result should be the same (try our best to ensure that).\n * (2) In `merge option` mode, if a component has no id/name specified, it\n * will be merged by index, and the result sequence of the components is\n * consistent to the original sequence.\n * (3) `reset` feature (in toolbox). Find detailed info in comments about\n * `mergeOption` in module:echarts/model/OptionManager.\n */\nvar OPTION_INNER_KEY = '\\0_ec_inner';\n/**\n * @alias module:echarts/model/Global\n *\n * @param {Object} option\n * @param {module:echarts/model/Model} parentModel\n * @param {Object} theme\n */\n\nvar GlobalModel = Model.extend({\n init: function (option, parentModel, theme, optionManager) {\n theme = theme || {};\n this.option = null; // Mark as not initialized.\n\n /**\n * @type {module:echarts/model/Model}\n * @private\n */\n\n this._theme = new Model(theme);\n /**\n * @type {module:echarts/model/OptionManager}\n */\n\n this._optionManager = optionManager;\n },\n setOption: function (option, optionPreprocessorFuncs) {\n assert(!(OPTION_INNER_KEY in option), 'please use chart.getOption()');\n\n this._optionManager.setOption(option, optionPreprocessorFuncs);\n\n this.resetOption(null);\n },\n\n /**\n * @param {string} type null/undefined: reset all.\n * 'recreate': force recreate all.\n * 'timeline': only reset timeline option\n * 'media': only reset media query option\n * @return {boolean} Whether option changed.\n */\n resetOption: function (type) {\n var optionChanged = false;\n var optionManager = this._optionManager;\n\n if (!type || type === 'recreate') {\n var baseOption = optionManager.mountOption(type === 'recreate');\n\n if (!this.option || type === 'recreate') {\n initBase.call(this, baseOption);\n } else {\n this.restoreData();\n this.mergeOption(baseOption);\n }\n\n optionChanged = true;\n }\n\n if (type === 'timeline' || type === 'media') {\n this.restoreData();\n }\n\n if (!type || type === 'recreate' || type === 'timeline') {\n var timelineOption = optionManager.getTimelineOption(this);\n timelineOption && (this.mergeOption(timelineOption), optionChanged = true);\n }\n\n if (!type || type === 'recreate' || type === 'media') {\n var mediaOptions = optionManager.getMediaOption(this, this._api);\n\n if (mediaOptions.length) {\n each(mediaOptions, function (mediaOption) {\n this.mergeOption(mediaOption, optionChanged = true);\n }, this);\n }\n }\n\n return optionChanged;\n },\n\n /**\n * @protected\n */\n mergeOption: function (newOption) {\n var option = this.option;\n var componentsMap = this._componentsMap;\n var newCptTypes = [];\n resetSourceDefaulter(this); // If no component class, merge directly.\n // For example: color, animaiton options, etc.\n\n each(newOption, function (componentOption, mainType) {\n if (componentOption == null) {\n return;\n }\n\n if (!ComponentModel.hasClass(mainType)) {\n // globalSettingTask.dirty();\n option[mainType] = option[mainType] == null ? clone(componentOption) : merge(option[mainType], componentOption, true);\n } else if (mainType) {\n newCptTypes.push(mainType);\n }\n });\n ComponentModel.topologicalTravel(newCptTypes, ComponentModel.getAllClassMainTypes(), visitComponent, this);\n\n function visitComponent(mainType, dependencies) {\n var newCptOptionList = modelUtil.normalizeToArray(newOption[mainType]);\n var mapResult = modelUtil.mappingToExists(componentsMap.get(mainType), newCptOptionList);\n modelUtil.makeIdAndName(mapResult); // Set mainType and complete subType.\n\n each(mapResult, function (item, index) {\n var opt = item.option;\n\n if (isObject(opt)) {\n item.keyInfo.mainType = mainType;\n item.keyInfo.subType = determineSubType(mainType, opt, item.exist);\n }\n });\n var dependentModels = getComponentsByTypes(componentsMap, dependencies);\n option[mainType] = [];\n componentsMap.set(mainType, []);\n each(mapResult, function (resultItem, index) {\n var componentModel = resultItem.exist;\n var newCptOption = resultItem.option;\n assert(isObject(newCptOption) || componentModel, 'Empty component definition'); // Consider where is no new option and should be merged using {},\n // see removeEdgeAndAdd in topologicalTravel and\n // ComponentModel.getAllClassMainTypes.\n\n if (!newCptOption) {\n componentModel.mergeOption({}, this);\n componentModel.optionUpdated({}, false);\n } else {\n var ComponentModelClass = ComponentModel.getClass(mainType, resultItem.keyInfo.subType, true);\n\n if (componentModel && componentModel.constructor === ComponentModelClass) {\n componentModel.name = resultItem.keyInfo.name; // componentModel.settingTask && componentModel.settingTask.dirty();\n\n componentModel.mergeOption(newCptOption, this);\n componentModel.optionUpdated(newCptOption, false);\n } else {\n // PENDING Global as parent ?\n var extraOpt = extend({\n dependentModels: dependentModels,\n componentIndex: index\n }, resultItem.keyInfo);\n componentModel = new ComponentModelClass(newCptOption, this, this, extraOpt);\n extend(componentModel, extraOpt);\n componentModel.init(newCptOption, this, this, extraOpt); // Call optionUpdated after init.\n // newCptOption has been used as componentModel.option\n // and may be merged with theme and default, so pass null\n // to avoid confusion.\n\n componentModel.optionUpdated(null, true);\n }\n }\n\n componentsMap.get(mainType)[index] = componentModel;\n option[mainType][index] = componentModel.option;\n }, this); // Backup series for filtering.\n\n if (mainType === 'series') {\n createSeriesIndices(this, componentsMap.get('series'));\n }\n }\n\n this._seriesIndicesMap = createHashMap(this._seriesIndices = this._seriesIndices || []);\n },\n\n /**\n * Get option for output (cloned option and inner info removed)\n * @public\n * @return {Object}\n */\n getOption: function () {\n var option = clone(this.option);\n each(option, function (opts, mainType) {\n if (ComponentModel.hasClass(mainType)) {\n var opts = modelUtil.normalizeToArray(opts);\n\n for (var i = opts.length - 1; i >= 0; i--) {\n // Remove options with inner id.\n if (modelUtil.isIdInner(opts[i])) {\n opts.splice(i, 1);\n }\n }\n\n option[mainType] = opts;\n }\n });\n delete option[OPTION_INNER_KEY];\n return option;\n },\n\n /**\n * @return {module:echarts/model/Model}\n */\n getTheme: function () {\n return this._theme;\n },\n\n /**\n * @param {string} mainType\n * @param {number} [idx=0]\n * @return {module:echarts/model/Component}\n */\n getComponent: function (mainType, idx) {\n var list = this._componentsMap.get(mainType);\n\n if (list) {\n return list[idx || 0];\n }\n },\n\n /**\n * If none of index and id and name used, return all components with mainType.\n * @param {Object} condition\n * @param {string} condition.mainType\n * @param {string} [condition.subType] If ignore, only query by mainType\n * @param {number|Array.} [condition.index] Either input index or id or name.\n * @param {string|Array.} [condition.id] Either input index or id or name.\n * @param {string|Array.} [condition.name] Either input index or id or name.\n * @return {Array.}\n */\n queryComponents: function (condition) {\n var mainType = condition.mainType;\n\n if (!mainType) {\n return [];\n }\n\n var index = condition.index;\n var id = condition.id;\n var name = condition.name;\n\n var cpts = this._componentsMap.get(mainType);\n\n if (!cpts || !cpts.length) {\n return [];\n }\n\n var result;\n\n if (index != null) {\n if (!isArray(index)) {\n index = [index];\n }\n\n result = filter(map(index, function (idx) {\n return cpts[idx];\n }), function (val) {\n return !!val;\n });\n } else if (id != null) {\n var isIdArray = isArray(id);\n result = filter(cpts, function (cpt) {\n return isIdArray && indexOf(id, cpt.id) >= 0 || !isIdArray && cpt.id === id;\n });\n } else if (name != null) {\n var isNameArray = isArray(name);\n result = filter(cpts, function (cpt) {\n return isNameArray && indexOf(name, cpt.name) >= 0 || !isNameArray && cpt.name === name;\n });\n } else {\n // Return all components with mainType\n result = cpts.slice();\n }\n\n return filterBySubType(result, condition);\n },\n\n /**\n * The interface is different from queryComponents,\n * which is convenient for inner usage.\n *\n * @usage\n * var result = findComponents(\n * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}}\n * );\n * var result = findComponents(\n * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}}\n * );\n * var result = findComponents(\n * {mainType: 'series',\n * filter: function (model, index) {...}}\n * );\n * // result like [component0, componnet1, ...]\n *\n * @param {Object} condition\n * @param {string} condition.mainType Mandatory.\n * @param {string} [condition.subType] Optional.\n * @param {Object} [condition.query] like {xxxIndex, xxxId, xxxName},\n * where xxx is mainType.\n * If query attribute is null/undefined or has no index/id/name,\n * do not filtering by query conditions, which is convenient for\n * no-payload situations or when target of action is global.\n * @param {Function} [condition.filter] parameter: component, return boolean.\n * @return {Array.}\n */\n findComponents: function (condition) {\n var query = condition.query;\n var mainType = condition.mainType;\n var queryCond = getQueryCond(query);\n var result = queryCond ? this.queryComponents(queryCond) : this._componentsMap.get(mainType);\n return doFilter(filterBySubType(result, condition));\n\n function getQueryCond(q) {\n var indexAttr = mainType + 'Index';\n var idAttr = mainType + 'Id';\n var nameAttr = mainType + 'Name';\n return q && (q[indexAttr] != null || q[idAttr] != null || q[nameAttr] != null) ? {\n mainType: mainType,\n // subType will be filtered finally.\n index: q[indexAttr],\n id: q[idAttr],\n name: q[nameAttr]\n } : null;\n }\n\n function doFilter(res) {\n return condition.filter ? filter(res, condition.filter) : res;\n }\n },\n\n /**\n * @usage\n * eachComponent('legend', function (legendModel, index) {\n * ...\n * });\n * eachComponent(function (componentType, model, index) {\n * // componentType does not include subType\n * // (componentType is 'xxx' but not 'xxx.aa')\n * });\n * eachComponent(\n * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}},\n * function (model, index) {...}\n * );\n * eachComponent(\n * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}},\n * function (model, index) {...}\n * );\n *\n * @param {string|Object=} mainType When mainType is object, the definition\n * is the same as the method 'findComponents'.\n * @param {Function} cb\n * @param {*} context\n */\n eachComponent: function (mainType, cb, context) {\n var componentsMap = this._componentsMap;\n\n if (typeof mainType === 'function') {\n context = cb;\n cb = mainType;\n componentsMap.each(function (components, componentType) {\n each(components, function (component, index) {\n cb.call(context, componentType, component, index);\n });\n });\n } else if (isString(mainType)) {\n each(componentsMap.get(mainType), cb, context);\n } else if (isObject(mainType)) {\n var queryResult = this.findComponents(mainType);\n each(queryResult, cb, context);\n }\n },\n\n /**\n * @param {string} name\n * @return {Array.}\n */\n getSeriesByName: function (name) {\n var series = this._componentsMap.get('series');\n\n return filter(series, function (oneSeries) {\n return oneSeries.name === name;\n });\n },\n\n /**\n * @param {number} seriesIndex\n * @return {module:echarts/model/Series}\n */\n getSeriesByIndex: function (seriesIndex) {\n return this._componentsMap.get('series')[seriesIndex];\n },\n\n /**\n * Get series list before filtered by type.\n * FIXME: rename to getRawSeriesByType?\n *\n * @param {string} subType\n * @return {Array.}\n */\n getSeriesByType: function (subType) {\n var series = this._componentsMap.get('series');\n\n return filter(series, function (oneSeries) {\n return oneSeries.subType === subType;\n });\n },\n\n /**\n * @return {Array.}\n */\n getSeries: function () {\n return this._componentsMap.get('series').slice();\n },\n\n /**\n * @return {number}\n */\n getSeriesCount: function () {\n return this._componentsMap.get('series').length;\n },\n\n /**\n * After filtering, series may be different\n * frome raw series.\n *\n * @param {Function} cb\n * @param {*} context\n */\n eachSeries: function (cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n\n cb.call(context, series, rawSeriesIndex);\n }, this);\n },\n\n /**\n * Iterate raw series before filtered.\n *\n * @param {Function} cb\n * @param {*} context\n */\n eachRawSeries: function (cb, context) {\n each(this._componentsMap.get('series'), cb, context);\n },\n\n /**\n * After filtering, series may be different.\n * frome raw series.\n *\n * @param {string} subType.\n * @param {Function} cb\n * @param {*} context\n */\n eachSeriesByType: function (subType, cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n\n if (series.subType === subType) {\n cb.call(context, series, rawSeriesIndex);\n }\n }, this);\n },\n\n /**\n * Iterate raw series before filtered of given type.\n *\n * @parma {string} subType\n * @param {Function} cb\n * @param {*} context\n */\n eachRawSeriesByType: function (subType, cb, context) {\n return each(this.getSeriesByType(subType), cb, context);\n },\n\n /**\n * @param {module:echarts/model/Series} seriesModel\n */\n isSeriesFiltered: function (seriesModel) {\n assertSeriesInitialized(this);\n return this._seriesIndicesMap.get(seriesModel.componentIndex) == null;\n },\n\n /**\n * @return {Array.}\n */\n getCurrentSeriesIndices: function () {\n return (this._seriesIndices || []).slice();\n },\n\n /**\n * @param {Function} cb\n * @param {*} context\n */\n filterSeries: function (cb, context) {\n assertSeriesInitialized(this);\n var filteredSeries = filter(this._componentsMap.get('series'), cb, context);\n createSeriesIndices(this, filteredSeries);\n },\n restoreData: function (payload) {\n var componentsMap = this._componentsMap;\n createSeriesIndices(this, componentsMap.get('series'));\n var componentTypes = [];\n componentsMap.each(function (components, componentType) {\n componentTypes.push(componentType);\n });\n ComponentModel.topologicalTravel(componentTypes, ComponentModel.getAllClassMainTypes(), function (componentType, dependencies) {\n each(componentsMap.get(componentType), function (component) {\n (componentType !== 'series' || !isNotTargetSeries(component, payload)) && component.restoreData();\n });\n });\n }\n});\n\nfunction isNotTargetSeries(seriesModel, payload) {\n if (payload) {\n var index = payload.seiresIndex;\n var id = payload.seriesId;\n var name = payload.seriesName;\n return index != null && seriesModel.componentIndex !== index || id != null && seriesModel.id !== id || name != null && seriesModel.name !== name;\n }\n}\n/**\n * @inner\n */\n\n\nfunction mergeTheme(option, theme) {\n // PENDING\n // NOT use `colorLayer` in theme if option has `color`\n var notMergeColorLayer = option.color && !option.colorLayer;\n each(theme, function (themeItem, name) {\n if (name === 'colorLayer' && notMergeColorLayer) {\n return;\n } // 如果有 component model 则把具体的 merge 逻辑交给该 model 处理\n\n\n if (!ComponentModel.hasClass(name)) {\n if (typeof themeItem === 'object') {\n option[name] = !option[name] ? clone(themeItem) : merge(option[name], themeItem, false);\n } else {\n if (option[name] == null) {\n option[name] = themeItem;\n }\n }\n }\n });\n}\n\nfunction initBase(baseOption) {\n baseOption = baseOption; // Using OPTION_INNER_KEY to mark that this option can not be used outside,\n // i.e. `chart.setOption(chart.getModel().option);` is forbiden.\n\n this.option = {};\n this.option[OPTION_INNER_KEY] = 1;\n /**\n * Init with series: [], in case of calling findSeries method\n * before series initialized.\n * @type {Object.>}\n * @private\n */\n\n this._componentsMap = createHashMap({\n series: []\n });\n /**\n * Mapping between filtered series list and raw series list.\n * key: filtered series indices, value: raw series indices.\n * @type {Array.}\n * @private\n */\n\n this._seriesIndices;\n this._seriesIndicesMap;\n mergeTheme(baseOption, this._theme.option); // TODO Needs clone when merging to the unexisted property\n\n merge(baseOption, globalDefault, false);\n this.mergeOption(baseOption);\n}\n/**\n * @inner\n * @param {Array.|string} types model types\n * @return {Object} key: {string} type, value: {Array.} models\n */\n\n\nfunction getComponentsByTypes(componentsMap, types) {\n if (!isArray(types)) {\n types = types ? [types] : [];\n }\n\n var ret = {};\n each(types, function (type) {\n ret[type] = (componentsMap.get(type) || []).slice();\n });\n return ret;\n}\n/**\n * @inner\n */\n\n\nfunction determineSubType(mainType, newCptOption, existComponent) {\n var subType = newCptOption.type ? newCptOption.type : existComponent ? existComponent.subType // Use determineSubType only when there is no existComponent.\n : ComponentModel.determineSubType(mainType, newCptOption); // tooltip, markline, markpoint may always has no subType\n\n return subType;\n}\n/**\n * @inner\n */\n\n\nfunction createSeriesIndices(ecModel, seriesModels) {\n ecModel._seriesIndicesMap = createHashMap(ecModel._seriesIndices = map(seriesModels, function (series) {\n return series.componentIndex;\n }) || []);\n}\n/**\n * @inner\n */\n\n\nfunction filterBySubType(components, condition) {\n // Using hasOwnProperty for restrict. Consider\n // subType is undefined in user payload.\n return condition.hasOwnProperty('subType') ? filter(components, function (cpt) {\n return cpt.subType === condition.subType;\n }) : components;\n}\n/**\n * @inner\n */\n\n\nfunction assertSeriesInitialized(ecModel) {}\n\nmixin(GlobalModel, colorPaletteMixin);\nvar _default = GlobalModel;\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 _util = require(\"zrender/lib/core/util\");\n\nvar isFunction = _util.isFunction;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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, defaultSymbolType, legendSymbol) {\n // Encoding visual for all series include which is filtered for legend drawing\n return {\n seriesType: seriesType,\n // For legend.\n performRawSeries: true,\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var symbolType = seriesModel.get('symbol');\n var symbolSize = seriesModel.get('symbolSize');\n var keepAspect = seriesModel.get('symbolKeepAspect');\n var symbolRotate = seriesModel.get('symbolRotate');\n var hasSymbolTypeCallback = isFunction(symbolType);\n var hasSymbolSizeCallback = isFunction(symbolSize);\n var hasSymbolRotateCallback = isFunction(symbolRotate);\n var hasCallback = hasSymbolTypeCallback || hasSymbolSizeCallback || hasSymbolRotateCallback;\n var seriesSymbol = !hasSymbolTypeCallback && symbolType ? symbolType : defaultSymbolType;\n var seriesSymbolSize = !hasSymbolSizeCallback ? symbolSize : null;\n var seriesSymbolRotate = !hasSymbolRotateCallback ? seriesSymbolRotate : null;\n data.setVisual({\n legendSymbol: legendSymbol || seriesSymbol,\n // If seting callback functions on `symbol` or `symbolSize`, for simplicity and avoiding\n // to bring trouble, we do not pick a reuslt from one of its calling on data item here,\n // but just use the default value. Callback on `symbol` or `symbolSize` is convenient in\n // some cases but generally it is not recommanded.\n symbol: seriesSymbol,\n symbolSize: seriesSymbolSize,\n symbolKeepAspect: keepAspect,\n symbolRotate: symbolRotate\n }); // Only visible series has each data be visual encoded\n\n if (ecModel.isSeriesFiltered(seriesModel)) {\n return;\n }\n\n function dataEach(data, idx) {\n if (hasCallback) {\n var rawValue = seriesModel.getRawValue(idx);\n var params = seriesModel.getDataParams(idx);\n hasSymbolTypeCallback && data.setItemVisual(idx, 'symbol', symbolType(rawValue, params));\n hasSymbolSizeCallback && data.setItemVisual(idx, 'symbolSize', symbolSize(rawValue, params));\n hasSymbolRotateCallback && data.setItemVisual(idx, 'symbolRotate', symbolRotate(rawValue, params));\n }\n\n if (data.hasItemOption) {\n var itemModel = data.getItemModel(idx);\n var itemSymbolType = itemModel.getShallow('symbol', true);\n var itemSymbolSize = itemModel.getShallow('symbolSize', true);\n var itemSymbolRotate = itemModel.getShallow('symbolRotate', true);\n var itemSymbolKeepAspect = itemModel.getShallow('symbolKeepAspect', true); // If has item symbol\n\n if (itemSymbolType != null) {\n data.setItemVisual(idx, 'symbol', itemSymbolType);\n }\n\n if (itemSymbolSize != null) {\n // PENDING Transform symbolSize ?\n data.setItemVisual(idx, 'symbolSize', itemSymbolSize);\n }\n\n if (itemSymbolRotate != null) {\n data.setItemVisual(idx, 'symbolRotate', itemSymbolRotate);\n }\n\n if (itemSymbolKeepAspect != null) {\n data.setItemVisual(idx, 'symbolKeepAspect', itemSymbolKeepAspect);\n }\n }\n }\n\n return {\n dataEach: data.hasItemOption || hasCallback ? dataEach : null\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\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 defaultKeyGetter(item) {\n return item;\n}\n/**\n * @param {Array} oldArr\n * @param {Array} newArr\n * @param {Function} oldKeyGetter\n * @param {Function} newKeyGetter\n * @param {Object} [context] Can be visited by this.context in callback.\n */\n\n\nfunction DataDiffer(oldArr, newArr, oldKeyGetter, newKeyGetter, context) {\n this._old = oldArr;\n this._new = newArr;\n this._oldKeyGetter = oldKeyGetter || defaultKeyGetter;\n this._newKeyGetter = newKeyGetter || defaultKeyGetter;\n this.context = context;\n}\n\nDataDiffer.prototype = {\n constructor: DataDiffer,\n\n /**\n * Callback function when add a data\n */\n add: function (func) {\n this._add = func;\n return this;\n },\n\n /**\n * Callback function when update a data\n */\n update: function (func) {\n this._update = func;\n return this;\n },\n\n /**\n * Callback function when remove a data\n */\n remove: function (func) {\n this._remove = func;\n return this;\n },\n execute: function () {\n var oldArr = this._old;\n var newArr = this._new;\n var oldDataIndexMap = {};\n var newDataIndexMap = {};\n var oldDataKeyArr = [];\n var newDataKeyArr = [];\n var i;\n initIndexMap(oldArr, oldDataIndexMap, oldDataKeyArr, '_oldKeyGetter', this);\n initIndexMap(newArr, newDataIndexMap, newDataKeyArr, '_newKeyGetter', this);\n\n for (i = 0; i < oldArr.length; i++) {\n var key = oldDataKeyArr[i];\n var idx = newDataIndexMap[key]; // idx can never be empty array here. see 'set null' logic below.\n\n if (idx != null) {\n // Consider there is duplicate key (for example, use dataItem.name as key).\n // We should make sure every item in newArr and oldArr can be visited.\n var len = idx.length;\n\n if (len) {\n len === 1 && (newDataIndexMap[key] = null);\n idx = idx.shift();\n } else {\n newDataIndexMap[key] = null;\n }\n\n this._update && this._update(idx, i);\n } else {\n this._remove && this._remove(i);\n }\n }\n\n for (var i = 0; i < newDataKeyArr.length; i++) {\n var key = newDataKeyArr[i];\n\n if (newDataIndexMap.hasOwnProperty(key)) {\n var idx = newDataIndexMap[key];\n\n if (idx == null) {\n continue;\n } // idx can never be empty array here. see 'set null' logic above.\n\n\n if (!idx.length) {\n this._add && this._add(idx);\n } else {\n for (var j = 0, len = idx.length; j < len; j++) {\n this._add && this._add(idx[j]);\n }\n }\n }\n }\n }\n};\n\nfunction initIndexMap(arr, map, keyArr, keyGetterName, dataDiffer) {\n for (var i = 0; i < arr.length; i++) {\n // Add prefix to avoid conflict with Object.prototype.\n var key = '_ec_' + dataDiffer[keyGetterName](arr[i], i);\n var existence = map[key];\n\n if (existence == null) {\n keyArr.push(key);\n map[key] = i;\n } else {\n if (!existence.length) {\n map[key] = existence = [existence];\n }\n\n existence.push(i);\n }\n }\n}\n\nvar _default = DataDiffer;\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 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 echartsAPIList = ['getDom', 'getZr', 'getWidth', 'getHeight', 'getDevicePixelRatio', 'dispatchAction', 'isDisposed', 'on', 'off', 'getDataURL', 'getConnectedDataURL', 'getModel', 'getOption', 'getViewOfComponentModel', 'getViewOfSeriesModel']; // And `getCoordinateSystems` and `getComponentByElement` will be injected in echarts.js\n\nfunction ExtensionAPI(chartInstance) {\n zrUtil.each(echartsAPIList, function (name) {\n this[name] = zrUtil.bind(chartInstance[name], chartInstance);\n }, this);\n}\n\nvar _default = ExtensionAPI;\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 _util = require(\"zrender/lib/core/util\");\n\nvar each = _util.each;\nvar map = _util.map;\n\nvar _number = require(\"../util/number\");\n\nvar linearMap = _number.linearMap;\nvar getPixelPrecision = _number.getPixelPrecision;\nvar round = _number.round;\n\nvar _axisTickLabelBuilder = require(\"./axisTickLabelBuilder\");\n\nvar createAxisTicks = _axisTickLabelBuilder.createAxisTicks;\nvar createAxisLabels = _axisTickLabelBuilder.createAxisLabels;\nvar calculateCategoryInterval = _axisTickLabelBuilder.calculateCategoryInterval;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 NORMALIZED_EXTENT = [0, 1];\n/**\n * Base class of Axis.\n * @constructor\n */\n\nvar Axis = function (dim, scale, extent) {\n /**\n * Axis dimension. Such as 'x', 'y', 'z', 'angle', 'radius'.\n * @type {string}\n */\n this.dim = dim;\n /**\n * Axis scale\n * @type {module:echarts/coord/scale/*}\n */\n\n this.scale = scale;\n /**\n * @type {Array.}\n * @private\n */\n\n this._extent = extent || [0, 0];\n /**\n * @type {boolean}\n */\n\n this.inverse = false;\n /**\n * Usually true when axis has a ordinal scale\n * @type {boolean}\n */\n\n this.onBand = false;\n};\n\nAxis.prototype = {\n constructor: Axis,\n\n /**\n * If axis extent contain given coord\n * @param {number} coord\n * @return {boolean}\n */\n contain: function (coord) {\n var extent = this._extent;\n var min = Math.min(extent[0], extent[1]);\n var max = Math.max(extent[0], extent[1]);\n return coord >= min && coord <= max;\n },\n\n /**\n * If axis extent contain given data\n * @param {number} data\n * @return {boolean}\n */\n containData: function (data) {\n return this.scale.contain(data);\n },\n\n /**\n * Get coord extent.\n * @return {Array.}\n */\n getExtent: function () {\n return this._extent.slice();\n },\n\n /**\n * Get precision used for formatting\n * @param {Array.} [dataExtent]\n * @return {number}\n */\n getPixelPrecision: function (dataExtent) {\n return getPixelPrecision(dataExtent || this.scale.getExtent(), this._extent);\n },\n\n /**\n * Set coord extent\n * @param {number} start\n * @param {number} end\n */\n setExtent: function (start, end) {\n var extent = this._extent;\n extent[0] = start;\n extent[1] = end;\n },\n\n /**\n * Convert data to coord. Data is the rank if it has an ordinal scale\n * @param {number} data\n * @param {boolean} clamp\n * @return {number}\n */\n dataToCoord: function (data, clamp) {\n var extent = this._extent;\n var scale = this.scale;\n data = scale.normalize(data);\n\n if (this.onBand && scale.type === 'ordinal') {\n extent = extent.slice();\n fixExtentWithBands(extent, scale.count());\n }\n\n return linearMap(data, NORMALIZED_EXTENT, extent, clamp);\n },\n\n /**\n * Convert coord to data. Data is the rank if it has an ordinal scale\n * @param {number} coord\n * @param {boolean} clamp\n * @return {number}\n */\n coordToData: function (coord, clamp) {\n var extent = this._extent;\n var scale = this.scale;\n\n if (this.onBand && scale.type === 'ordinal') {\n extent = extent.slice();\n fixExtentWithBands(extent, scale.count());\n }\n\n var t = linearMap(coord, extent, NORMALIZED_EXTENT, clamp);\n return this.scale.scale(t);\n },\n\n /**\n * Convert pixel point to data in axis\n * @param {Array.} point\n * @param {boolean} clamp\n * @return {number} data\n */\n pointToData: function (point, clamp) {// Should be implemented in derived class if necessary.\n },\n\n /**\n * Different from `zrUtil.map(axis.getTicks(), axis.dataToCoord, axis)`,\n * `axis.getTicksCoords` considers `onBand`, which is used by\n * `boundaryGap:true` of category axis and splitLine and splitArea.\n * @param {Object} [opt]\n * @param {Model} [opt.tickModel=axis.model.getModel('axisTick')]\n * @param {boolean} [opt.clamp] If `true`, the first and the last\n * tick must be at the axis end points. Otherwise, clip ticks\n * that outside the axis extent.\n * @return {Array.} [{\n * coord: ...,\n * tickValue: ...\n * }, ...]\n */\n getTicksCoords: function (opt) {\n opt = opt || {};\n var tickModel = opt.tickModel || this.getTickModel();\n var result = createAxisTicks(this, tickModel);\n var ticks = result.ticks;\n var ticksCoords = map(ticks, function (tickValue) {\n return {\n coord: this.dataToCoord(tickValue),\n tickValue: tickValue\n };\n }, this);\n var alignWithLabel = tickModel.get('alignWithLabel');\n fixOnBandTicksCoords(this, ticksCoords, alignWithLabel, opt.clamp);\n return ticksCoords;\n },\n\n /**\n * @return {Array.>} [{ coord: ..., tickValue: ...}]\n */\n getMinorTicksCoords: function () {\n if (this.scale.type === 'ordinal') {\n // Category axis doesn't support minor ticks\n return [];\n }\n\n var minorTickModel = this.model.getModel('minorTick');\n var splitNumber = minorTickModel.get('splitNumber'); // Protection.\n\n if (!(splitNumber > 0 && splitNumber < 100)) {\n splitNumber = 5;\n }\n\n var minorTicks = this.scale.getMinorTicks(splitNumber);\n var minorTicksCoords = map(minorTicks, function (minorTicksGroup) {\n return map(minorTicksGroup, function (minorTick) {\n return {\n coord: this.dataToCoord(minorTick),\n tickValue: minorTick\n };\n }, this);\n }, this);\n return minorTicksCoords;\n },\n\n /**\n * @return {Array.} [{\n * formattedLabel: string,\n * rawLabel: axis.scale.getLabel(tickValue)\n * tickValue: number\n * }, ...]\n */\n getViewLabels: function () {\n return createAxisLabels(this).labels;\n },\n\n /**\n * @return {module:echarts/coord/model/Model}\n */\n getLabelModel: function () {\n return this.model.getModel('axisLabel');\n },\n\n /**\n * Notice here we only get the default tick model. For splitLine\n * or splitArea, we should pass the splitLineModel or splitAreaModel\n * manually when calling `getTicksCoords`.\n * In GL, this method may be overrided to:\n * `axisModel.getModel('axisTick', grid3DModel.getModel('axisTick'));`\n * @return {module:echarts/coord/model/Model}\n */\n getTickModel: function () {\n return this.model.getModel('axisTick');\n },\n\n /**\n * Get width of band\n * @return {number}\n */\n getBandWidth: function () {\n var axisExtent = this._extent;\n var dataExtent = this.scale.getExtent();\n var len = dataExtent[1] - dataExtent[0] + (this.onBand ? 1 : 0); // Fix #2728, avoid NaN when only one data.\n\n len === 0 && (len = 1);\n var size = Math.abs(axisExtent[1] - axisExtent[0]);\n return Math.abs(size) / len;\n },\n\n /**\n * @abstract\n * @return {boolean} Is horizontal\n */\n isHorizontal: null,\n\n /**\n * @abstract\n * @return {number} Get axis rotate, by degree.\n */\n getRotate: null,\n\n /**\n * Only be called in category axis.\n * Can be overrided, consider other axes like in 3D.\n * @return {number} Auto interval for cateogry axis tick and label\n */\n calculateCategoryInterval: function () {\n return calculateCategoryInterval(this);\n }\n};\n\nfunction fixExtentWithBands(extent, nTick) {\n var size = extent[1] - extent[0];\n var len = nTick;\n var margin = size / len / 2;\n extent[0] += margin;\n extent[1] -= margin;\n} // If axis has labels [1, 2, 3, 4]. Bands on the axis are\n// |---1---|---2---|---3---|---4---|.\n// So the displayed ticks and splitLine/splitArea should between\n// each data item, otherwise cause misleading (e.g., split tow bars\n// of a single data item when there are two bar series).\n// Also consider if tickCategoryInterval > 0 and onBand, ticks and\n// splitLine/spliteArea should layout appropriately corresponding\n// to displayed labels. (So we should not use `getBandWidth` in this\n// case).\n\n\nfunction fixOnBandTicksCoords(axis, ticksCoords, alignWithLabel, clamp) {\n var ticksLen = ticksCoords.length;\n\n if (!axis.onBand || alignWithLabel || !ticksLen) {\n return;\n }\n\n var axisExtent = axis.getExtent();\n var last;\n var diffSize;\n\n if (ticksLen === 1) {\n ticksCoords[0].coord = axisExtent[0];\n last = ticksCoords[1] = {\n coord: axisExtent[0]\n };\n } else {\n var crossLen = ticksCoords[ticksLen - 1].tickValue - ticksCoords[0].tickValue;\n var shift = (ticksCoords[ticksLen - 1].coord - ticksCoords[0].coord) / crossLen;\n each(ticksCoords, function (ticksItem) {\n ticksItem.coord -= shift / 2;\n });\n var dataExtent = axis.scale.getExtent();\n diffSize = 1 + dataExtent[1] - ticksCoords[ticksLen - 1].tickValue;\n last = {\n coord: ticksCoords[ticksLen - 1].coord + shift * diffSize\n };\n ticksCoords.push(last);\n }\n\n var inverse = axisExtent[0] > axisExtent[1]; // Handling clamp.\n\n if (littleThan(ticksCoords[0].coord, axisExtent[0])) {\n clamp ? ticksCoords[0].coord = axisExtent[0] : ticksCoords.shift();\n }\n\n if (clamp && littleThan(axisExtent[0], ticksCoords[0].coord)) {\n ticksCoords.unshift({\n coord: axisExtent[0]\n });\n }\n\n if (littleThan(axisExtent[1], last.coord)) {\n clamp ? last.coord = axisExtent[1] : ticksCoords.pop();\n }\n\n if (clamp && littleThan(last.coord, axisExtent[1])) {\n ticksCoords.push({\n coord: axisExtent[1]\n });\n }\n\n function littleThan(a, b) {\n // Avoid rounding error cause calculated tick coord different with extent.\n // It may cause an extra unecessary tick added.\n a = round(a);\n b = round(b);\n return inverse ? a > b : a < b;\n }\n}\n\nvar _default = Axis;\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 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 _util = require(\"zrender/lib/core/util\");\n\nvar createHashMap = _util.createHashMap;\nvar each = _util.each;\nvar isString = _util.isString;\nvar defaults = _util.defaults;\nvar extend = _util.extend;\nvar isObject = _util.isObject;\nvar clone = _util.clone;\n\nvar _model = require(\"../../util/model\");\n\nvar normalizeToArray = _model.normalizeToArray;\n\nvar _sourceHelper = require(\"./sourceHelper\");\n\nvar guessOrdinal = _sourceHelper.guessOrdinal;\nvar BE_ORDINAL = _sourceHelper.BE_ORDINAL;\n\nvar Source = require(\"../Source\");\n\nvar _dimensionHelper = require(\"./dimensionHelper\");\n\nvar OTHER_DIMENSIONS = _dimensionHelper.OTHER_DIMENSIONS;\n\nvar DataDimensionInfo = require(\"../DataDimensionInfo\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * @deprecated\n * Use `echarts/data/helper/createDimensions` instead.\n */\n\n/**\n * @see {module:echarts/test/ut/spec/data/completeDimensions}\n *\n * This method builds the relationship between:\n * + \"what the coord sys or series requires (see `sysDims`)\",\n * + \"what the user defines (in `encode` and `dimensions`, see `opt.dimsDef` and `opt.encodeDef`)\"\n * + \"what the data source provids (see `source`)\".\n *\n * Some guess strategy will be adapted if user does not define something.\n * If no 'value' dimension specified, the first no-named dimension will be\n * named as 'value'.\n *\n * @param {Array.} sysDims Necessary dimensions, like ['x', 'y'], which\n * provides not only dim template, but also default order.\n * properties: 'name', 'type', 'displayName'.\n * `name` of each item provides default coord name.\n * [{dimsDef: [string|Object, ...]}, ...] dimsDef of sysDim item provides default dim name, and\n * provide dims count that the sysDim required.\n * [{ordinalMeta}] can be specified.\n * @param {module:echarts/data/Source|Array|Object} source or data (for compatibal with pervious)\n * @param {Object} [opt]\n * @param {Array.} [opt.dimsDef] option.series.dimensions User defined dimensions\n * For example: ['asdf', {name, type}, ...].\n * @param {Object|HashMap} [opt.encodeDef] option.series.encode {x: 2, y: [3, 1], tooltip: [1, 2], label: 3}\n * @param {Function} [opt.encodeDefaulter] Called if no `opt.encodeDef` exists.\n * If not specified, auto find the next available data dim.\n * param source {module:data/Source}\n * param dimCount {number}\n * return {Object} encode Never be `null/undefined`.\n * @param {string} [opt.generateCoord] Generate coord dim with the given name.\n * If not specified, extra dim names will be:\n * 'value', 'value0', 'value1', ...\n * @param {number} [opt.generateCoordCount] By default, the generated dim name is `generateCoord`.\n * If `generateCoordCount` specified, the generated dim names will be:\n * `generateCoord` + 0, `generateCoord` + 1, ...\n * can be Infinity, indicate that use all of the remain columns.\n * @param {number} [opt.dimCount] If not specified, guess by the first data item.\n * @return {Array.}\n */\nfunction completeDimensions(sysDims, source, opt) {\n if (!Source.isInstance(source)) {\n source = Source.seriesDataToSource(source);\n }\n\n opt = opt || {};\n sysDims = (sysDims || []).slice();\n var dimsDef = (opt.dimsDef || []).slice();\n var dataDimNameMap = createHashMap();\n var coordDimNameMap = createHashMap(); // var valueCandidate;\n\n var result = [];\n var dimCount = getDimCount(source, sysDims, dimsDef, opt.dimCount); // Apply user defined dims (`name` and `type`) and init result.\n\n for (var i = 0; i < dimCount; i++) {\n var dimDefItem = dimsDef[i] = extend({}, isObject(dimsDef[i]) ? dimsDef[i] : {\n name: dimsDef[i]\n });\n var userDimName = dimDefItem.name;\n var resultItem = result[i] = new DataDimensionInfo(); // Name will be applied later for avoiding duplication.\n\n if (userDimName != null && dataDimNameMap.get(userDimName) == null) {\n // Only if `series.dimensions` is defined in option\n // displayName, will be set, and dimension will be diplayed vertically in\n // tooltip by default.\n resultItem.name = resultItem.displayName = userDimName;\n dataDimNameMap.set(userDimName, i);\n }\n\n dimDefItem.type != null && (resultItem.type = dimDefItem.type);\n dimDefItem.displayName != null && (resultItem.displayName = dimDefItem.displayName);\n }\n\n var encodeDef = opt.encodeDef;\n\n if (!encodeDef && opt.encodeDefaulter) {\n encodeDef = opt.encodeDefaulter(source, dimCount);\n }\n\n encodeDef = createHashMap(encodeDef); // Set `coordDim` and `coordDimIndex` by `encodeDef` and normalize `encodeDef`.\n\n encodeDef.each(function (dataDims, coordDim) {\n dataDims = normalizeToArray(dataDims).slice(); // Note: It is allowed that `dataDims.length` is `0`, e.g., options is\n // `{encode: {x: -1, y: 1}}`. Should not filter anything in\n // this case.\n\n if (dataDims.length === 1 && !isString(dataDims[0]) && dataDims[0] < 0) {\n encodeDef.set(coordDim, false);\n return;\n }\n\n var validDataDims = encodeDef.set(coordDim, []);\n each(dataDims, function (resultDimIdx, idx) {\n // The input resultDimIdx can be dim name or index.\n isString(resultDimIdx) && (resultDimIdx = dataDimNameMap.get(resultDimIdx));\n\n if (resultDimIdx != null && resultDimIdx < dimCount) {\n validDataDims[idx] = resultDimIdx;\n applyDim(result[resultDimIdx], coordDim, idx);\n }\n });\n }); // Apply templetes and default order from `sysDims`.\n\n var availDimIdx = 0;\n each(sysDims, function (sysDimItem, sysDimIndex) {\n var coordDim;\n var sysDimItem;\n var sysDimItemDimsDef;\n var sysDimItemOtherDims;\n\n if (isString(sysDimItem)) {\n coordDim = sysDimItem;\n sysDimItem = {};\n } else {\n coordDim = sysDimItem.name;\n var ordinalMeta = sysDimItem.ordinalMeta;\n sysDimItem.ordinalMeta = null;\n sysDimItem = clone(sysDimItem);\n sysDimItem.ordinalMeta = ordinalMeta; // `coordDimIndex` should not be set directly.\n\n sysDimItemDimsDef = sysDimItem.dimsDef;\n sysDimItemOtherDims = sysDimItem.otherDims;\n sysDimItem.name = sysDimItem.coordDim = sysDimItem.coordDimIndex = sysDimItem.dimsDef = sysDimItem.otherDims = null;\n }\n\n var dataDims = encodeDef.get(coordDim); // negative resultDimIdx means no need to mapping.\n\n if (dataDims === false) {\n return;\n }\n\n var dataDims = normalizeToArray(dataDims); // dimensions provides default dim sequences.\n\n if (!dataDims.length) {\n for (var i = 0; i < (sysDimItemDimsDef && sysDimItemDimsDef.length || 1); i++) {\n while (availDimIdx < result.length && result[availDimIdx].coordDim != null) {\n availDimIdx++;\n }\n\n availDimIdx < result.length && dataDims.push(availDimIdx++);\n }\n } // Apply templates.\n\n\n each(dataDims, function (resultDimIdx, coordDimIndex) {\n var resultItem = result[resultDimIdx];\n applyDim(defaults(resultItem, sysDimItem), coordDim, coordDimIndex);\n\n if (resultItem.name == null && sysDimItemDimsDef) {\n var sysDimItemDimsDefItem = sysDimItemDimsDef[coordDimIndex];\n !isObject(sysDimItemDimsDefItem) && (sysDimItemDimsDefItem = {\n name: sysDimItemDimsDefItem\n });\n resultItem.name = resultItem.displayName = sysDimItemDimsDefItem.name;\n resultItem.defaultTooltip = sysDimItemDimsDefItem.defaultTooltip;\n } // FIXME refactor, currently only used in case: {otherDims: {tooltip: false}}\n\n\n sysDimItemOtherDims && defaults(resultItem.otherDims, sysDimItemOtherDims);\n });\n });\n\n function applyDim(resultItem, coordDim, coordDimIndex) {\n if (OTHER_DIMENSIONS.get(coordDim) != null) {\n resultItem.otherDims[coordDim] = coordDimIndex;\n } else {\n resultItem.coordDim = coordDim;\n resultItem.coordDimIndex = coordDimIndex;\n coordDimNameMap.set(coordDim, true);\n }\n } // Make sure the first extra dim is 'value'.\n\n\n var generateCoord = opt.generateCoord;\n var generateCoordCount = opt.generateCoordCount;\n var fromZero = generateCoordCount != null;\n generateCoordCount = generateCoord ? generateCoordCount || 1 : 0;\n var extra = generateCoord || 'value'; // Set dim `name` and other `coordDim` and other props.\n\n for (var resultDimIdx = 0; resultDimIdx < dimCount; resultDimIdx++) {\n var resultItem = result[resultDimIdx] = result[resultDimIdx] || new DataDimensionInfo();\n var coordDim = resultItem.coordDim;\n\n if (coordDim == null) {\n resultItem.coordDim = genName(extra, coordDimNameMap, fromZero);\n resultItem.coordDimIndex = 0;\n\n if (!generateCoord || generateCoordCount <= 0) {\n resultItem.isExtraCoord = true;\n }\n\n generateCoordCount--;\n }\n\n resultItem.name == null && (resultItem.name = genName(resultItem.coordDim, dataDimNameMap));\n\n if (resultItem.type == null && (guessOrdinal(source, resultDimIdx, resultItem.name) === BE_ORDINAL.Must // Consider the case:\n // {\n // dataset: {source: [\n // ['2001', 123],\n // ['2002', 456],\n // ...\n // ['The others', 987],\n // ]},\n // series: {type: 'pie'}\n // }\n // The first colum should better be treated as a \"ordinal\" although it\n // might not able to be detected as an \"ordinal\" by `guessOrdinal`.\n || resultItem.isExtraCoord && (resultItem.otherDims.itemName != null || resultItem.otherDims.seriesName != null))) {\n resultItem.type = 'ordinal';\n }\n }\n\n return result;\n} // ??? TODO\n// Originally detect dimCount by data[0]. Should we\n// optimize it to only by sysDims and dimensions and encode.\n// So only necessary dims will be initialized.\n// But\n// (1) custom series should be considered. where other dims\n// may be visited.\n// (2) sometimes user need to calcualte bubble size or use visualMap\n// on other dimensions besides coordSys needed.\n// So, dims that is not used by system, should be shared in storage?\n\n\nfunction getDimCount(source, sysDims, dimsDef, optDimCount) {\n // Note that the result dimCount should not small than columns count\n // of data, otherwise `dataDimNameMap` checking will be incorrect.\n var dimCount = Math.max(source.dimensionsDetectCount || 1, sysDims.length, dimsDef.length, optDimCount || 0);\n each(sysDims, function (sysDimItem) {\n var sysDimItemDimsDef = sysDimItem.dimsDef;\n sysDimItemDimsDef && (dimCount = Math.max(dimCount, sysDimItemDimsDef.length));\n });\n return dimCount;\n}\n\nfunction genName(name, map, fromZero) {\n if (fromZero || map.get(name) != null) {\n var i = 0;\n\n while (map.get(name + i) != null) {\n i++;\n }\n\n name += i;\n }\n\n map.set(name, true);\n return name;\n}\n\nvar _default = completeDimensions;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nfunction _default(ecModel) {\n ecModel.eachSeriesByType('radar', function (seriesModel) {\n var data = seriesModel.getData();\n var points = [];\n var coordSys = seriesModel.coordinateSystem;\n\n if (!coordSys) {\n return;\n }\n\n var axes = coordSys.getIndicatorAxes();\n zrUtil.each(axes, function (axis, axisIndex) {\n data.each(data.mapDimension(axes[axisIndex].dim), function (val, dataIndex) {\n points[dataIndex] = points[dataIndex] || [];\n var point = coordSys.dataToPoint(val, axisIndex);\n points[dataIndex][axisIndex] = isValidPoint(point) ? point : getValueMissingPoint(coordSys);\n });\n }); // Close polygon\n\n data.each(function (idx) {\n // TODO\n // Is it appropriate to connect to the next data when some data is missing?\n // Or, should trade it like `connectNull` in line chart?\n var firstPoint = zrUtil.find(points[idx], function (point) {\n return isValidPoint(point);\n }) || getValueMissingPoint(coordSys); // Copy the first actual point to the end of the array\n\n points[idx].push(firstPoint.slice());\n data.setItemLayout(idx, points[idx]);\n });\n });\n}\n\nfunction isValidPoint(point) {\n return !isNaN(point[0]) && !isNaN(point[1]);\n}\n\nfunction getValueMissingPoint(coordSys) {\n // It is error-prone to input [NaN, NaN] into polygon, polygon.\n // (probably cause problem when refreshing or animating)\n return [coordSys.cx, coordSys.cy];\n}\n\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar echarts = require(\"../../echarts\");\n\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 _util = require(\"zrender/lib/core/util\");\n\nvar map = _util.map;\n\nvar createRenderPlanner = require(\"../chart/helper/createRenderPlanner\");\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*/\n\n/* global Float32Array */\nfunction _default(seriesType) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeRender = pipelineContext.large;\n\n if (!coordSys) {\n return;\n }\n\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n\n if (isDimensionStacked(data, dims[0]\n /*, dims[1]*/\n )) {\n dims[0] = stackResultDim;\n }\n\n if (isDimensionStacked(data, dims[1]\n /*, dims[0]*/\n )) {\n dims[1] = stackResultDim;\n }\n\n function progress(params, data) {\n var segCount = params.end - params.start;\n var points = isLargeRender && new Float32Array(segCount * dimLen);\n\n for (var i = params.start, offset = 0, tmpIn = [], tmpOut = []; i < params.end; i++) {\n var point;\n\n if (dimLen === 1) {\n var x = data.get(dims[0], i);\n point = !isNaN(x) && coordSys.dataToPoint(x, null, tmpOut);\n } else {\n var x = tmpIn[0] = data.get(dims[0], i);\n var y = tmpIn[1] = data.get(dims[1], i); // Also {Array.}, not undefined to avoid if...else... statement\n\n point = !isNaN(x) && !isNaN(y) && coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n\n if (isLargeRender) {\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n } else {\n data.setItemLayout(i, point && point.slice() || [NaN, NaN]);\n }\n }\n\n isLargeRender && data.setLayout('symbolPoints', points);\n }\n\n return dimLen && {\n progress: progress\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\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 ORIGIN_METHOD = '\\0__throttleOriginMethod';\nvar RATE = '\\0__throttleRate';\nvar THROTTLE_TYPE = '\\0__throttleType';\n/**\n * @public\n * @param {(Function)} fn\n * @param {number} [delay=0] Unit: ms.\n * @param {boolean} [debounce=false]\n * true: If call interval less than `delay`, only the last call works.\n * false: If call interval less than `delay, call works on fixed rate.\n * @return {(Function)} throttled fn.\n */\n\nfunction throttle(fn, delay, debounce) {\n var currCall;\n var lastCall = 0;\n var lastExec = 0;\n var timer = null;\n var diff;\n var scope;\n var args;\n var debounceNextCall;\n delay = delay || 0;\n\n function exec() {\n lastExec = new Date().getTime();\n timer = null;\n fn.apply(scope, args || []);\n }\n\n var cb = function () {\n currCall = new Date().getTime();\n scope = this;\n args = arguments;\n var thisDelay = debounceNextCall || delay;\n var thisDebounce = debounceNextCall || debounce;\n debounceNextCall = null;\n diff = currCall - (thisDebounce ? lastCall : lastExec) - thisDelay;\n clearTimeout(timer); // Here we should make sure that: the `exec` SHOULD NOT be called later\n // than a new call of `cb`, that is, preserving the command order. Consider\n // calculating \"scale rate\" when roaming as an example. When a call of `cb`\n // happens, either the `exec` is called dierectly, or the call is delayed.\n // But the delayed call should never be later than next call of `cb`. Under\n // this assurance, we can simply update view state each time `dispatchAction`\n // triggered by user roaming, but not need to add extra code to avoid the\n // state being \"rolled-back\".\n\n if (thisDebounce) {\n timer = setTimeout(exec, thisDelay);\n } else {\n if (diff >= 0) {\n exec();\n } else {\n timer = setTimeout(exec, -diff);\n }\n }\n\n lastCall = currCall;\n };\n /**\n * Clear throttle.\n * @public\n */\n\n\n cb.clear = function () {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n };\n /**\n * Enable debounce once.\n */\n\n\n cb.debounceNextCall = function (debounceDelay) {\n debounceNextCall = debounceDelay;\n };\n\n return cb;\n}\n/**\n * Create throttle method or update throttle rate.\n *\n * @example\n * ComponentView.prototype.render = function () {\n * ...\n * throttle.createOrUpdate(\n * this,\n * '_dispatchAction',\n * this.model.get('throttle'),\n * 'fixRate'\n * );\n * };\n * ComponentView.prototype.remove = function () {\n * throttle.clear(this, '_dispatchAction');\n * };\n * ComponentView.prototype.dispose = function () {\n * throttle.clear(this, '_dispatchAction');\n * };\n *\n * @public\n * @param {Object} obj\n * @param {string} fnAttr\n * @param {number} [rate]\n * @param {string} [throttleType='fixRate'] 'fixRate' or 'debounce'\n * @return {Function} throttled function.\n */\n\n\nfunction createOrUpdate(obj, fnAttr, rate, throttleType) {\n var fn = obj[fnAttr];\n\n if (!fn) {\n return;\n }\n\n var originFn = fn[ORIGIN_METHOD] || fn;\n var lastThrottleType = fn[THROTTLE_TYPE];\n var lastRate = fn[RATE];\n\n if (lastRate !== rate || lastThrottleType !== throttleType) {\n if (rate == null || !throttleType) {\n return obj[fnAttr] = originFn;\n }\n\n fn = obj[fnAttr] = throttle(originFn, rate, throttleType === 'debounce');\n fn[ORIGIN_METHOD] = originFn;\n fn[THROTTLE_TYPE] = throttleType;\n fn[RATE] = rate;\n }\n\n return fn;\n}\n/**\n * Clear throttle. Example see throttle.createOrUpdate.\n *\n * @public\n * @param {Object} obj\n * @param {string} fnAttr\n */\n\n\nfunction clear(obj, fnAttr) {\n var fn = obj[fnAttr];\n\n if (fn && fn[ORIGIN_METHOD]) {\n obj[fnAttr] = fn[ORIGIN_METHOD];\n }\n}\n\nexports.throttle = throttle;\nexports.createOrUpdate = createOrUpdate;\nexports.clear = clear;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar _clazz = require(\"./clazz\");\n\nvar parseClassType = _clazz.parseClassType;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 base = 0;\n/**\n * @public\n * @param {string} type\n * @return {string}\n */\n\nfunction getUID(type) {\n // Considering the case of crossing js context,\n // use Math.random to make id as unique as possible.\n return [type || '', base++, Math.random().toFixed(5)].join('_');\n}\n/**\n * @inner\n */\n\n\nfunction enableSubTypeDefaulter(entity) {\n var subTypeDefaulters = {};\n\n entity.registerSubTypeDefaulter = function (componentType, defaulter) {\n componentType = parseClassType(componentType);\n subTypeDefaulters[componentType.main] = defaulter;\n };\n\n entity.determineSubType = function (componentType, option) {\n var type = option.type;\n\n if (!type) {\n var componentTypeMain = parseClassType(componentType).main;\n\n if (entity.hasSubTypes(componentType) && subTypeDefaulters[componentTypeMain]) {\n type = subTypeDefaulters[componentTypeMain](option);\n }\n }\n\n return type;\n };\n\n return entity;\n}\n/**\n * Topological travel on Activity Network (Activity On Vertices).\n * Dependencies is defined in Model.prototype.dependencies, like ['xAxis', 'yAxis'].\n *\n * If 'xAxis' or 'yAxis' is absent in componentTypeList, just ignore it in topology.\n *\n * If there is circle dependencey, Error will be thrown.\n *\n */\n\n\nfunction enableTopologicalTravel(entity, dependencyGetter) {\n /**\n * @public\n * @param {Array.} targetNameList Target Component type list.\n * Can be ['aa', 'bb', 'aa.xx']\n * @param {Array.} fullNameList By which we can build dependency graph.\n * @param {Function} callback Params: componentType, dependencies.\n * @param {Object} context Scope of callback.\n */\n entity.topologicalTravel = function (targetNameList, fullNameList, callback, context) {\n if (!targetNameList.length) {\n return;\n }\n\n var result = makeDepndencyGraph(fullNameList);\n var graph = result.graph;\n var stack = result.noEntryList;\n var targetNameSet = {};\n zrUtil.each(targetNameList, function (name) {\n targetNameSet[name] = true;\n });\n\n while (stack.length) {\n var currComponentType = stack.pop();\n var currVertex = graph[currComponentType];\n var isInTargetNameSet = !!targetNameSet[currComponentType];\n\n if (isInTargetNameSet) {\n callback.call(context, currComponentType, currVertex.originalDeps.slice());\n delete targetNameSet[currComponentType];\n }\n\n zrUtil.each(currVertex.successor, isInTargetNameSet ? removeEdgeAndAdd : removeEdge);\n }\n\n zrUtil.each(targetNameSet, function () {\n throw new Error('Circle dependency may exists');\n });\n\n function removeEdge(succComponentType) {\n graph[succComponentType].entryCount--;\n\n if (graph[succComponentType].entryCount === 0) {\n stack.push(succComponentType);\n }\n } // Consider this case: legend depends on series, and we call\n // chart.setOption({series: [...]}), where only series is in option.\n // If we do not have 'removeEdgeAndAdd', legendModel.mergeOption will\n // not be called, but only sereis.mergeOption is called. Thus legend\n // have no chance to update its local record about series (like which\n // name of series is available in legend).\n\n\n function removeEdgeAndAdd(succComponentType) {\n targetNameSet[succComponentType] = true;\n removeEdge(succComponentType);\n }\n };\n /**\n * DepndencyGraph: {Object}\n * key: conponentType,\n * value: {\n * successor: [conponentTypes...],\n * originalDeps: [conponentTypes...],\n * entryCount: {number}\n * }\n */\n\n\n function makeDepndencyGraph(fullNameList) {\n var graph = {};\n var noEntryList = [];\n zrUtil.each(fullNameList, function (name) {\n var thisItem = createDependencyGraphItem(graph, name);\n var originalDeps = thisItem.originalDeps = dependencyGetter(name);\n var availableDeps = getAvailableDependencies(originalDeps, fullNameList);\n thisItem.entryCount = availableDeps.length;\n\n if (thisItem.entryCount === 0) {\n noEntryList.push(name);\n }\n\n zrUtil.each(availableDeps, function (dependentName) {\n if (zrUtil.indexOf(thisItem.predecessor, dependentName) < 0) {\n thisItem.predecessor.push(dependentName);\n }\n\n var thatItem = createDependencyGraphItem(graph, dependentName);\n\n if (zrUtil.indexOf(thatItem.successor, dependentName) < 0) {\n thatItem.successor.push(name);\n }\n });\n });\n return {\n graph: graph,\n noEntryList: noEntryList\n };\n }\n\n function createDependencyGraphItem(graph, name) {\n if (!graph[name]) {\n graph[name] = {\n predecessor: [],\n successor: []\n };\n }\n\n return graph[name];\n }\n\n function getAvailableDependencies(originalDeps, fullNameList) {\n var availableDeps = [];\n zrUtil.each(originalDeps, function (dep) {\n zrUtil.indexOf(fullNameList, dep) >= 0 && availableDeps.push(dep);\n });\n return availableDeps;\n }\n}\n\nexports.getUID = getUID;\nexports.enableSubTypeDefaulter = enableSubTypeDefaulter;\nexports.enableTopologicalTravel = enableTopologicalTravel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 platform = ''; // Navigator not exists in node\n\nif (typeof navigator !== 'undefined') {\n platform = navigator.platform || '';\n}\n\nvar _default = {\n // backgroundColor: 'rgba(0,0,0,0)',\n // https://dribbble.com/shots/1065960-Infographic-Pie-chart-visualization\n // color: ['#5793f3', '#d14a61', '#fd9c35', '#675bba', '#fec42c', '#dd4444', '#d4df5a', '#cd4870'],\n // Light colors:\n // color: ['#bcd3bb', '#e88f70', '#edc1a5', '#9dc5c8', '#e1e8c8', '#7b7c68', '#e5b5b5', '#f0b489', '#928ea8', '#bda29a'],\n // color: ['#cc5664', '#9bd6ec', '#ea946e', '#8acaaa', '#f1ec64', '#ee8686', '#a48dc1', '#5da6bc', '#b9dcae'],\n // Dark colors:\n color: ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'],\n gradientColor: ['#f6efa6', '#d88273', '#bf444c'],\n // If xAxis and yAxis declared, grid is created by default.\n // grid: {},\n textStyle: {\n // color: '#000',\n // decoration: 'none',\n // PENDING\n fontFamily: platform.match(/^Win/) ? 'Microsoft YaHei' : 'sans-serif',\n // fontFamily: 'Arial, Verdana, sans-serif',\n fontSize: 12,\n fontStyle: 'normal',\n fontWeight: 'normal'\n },\n // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/\n // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation\n // Default is source-over\n blendMode: null,\n animation: 'auto',\n animationDuration: 1000,\n animationDurationUpdate: 300,\n animationEasing: 'exponentialOut',\n animationEasingUpdate: 'cubicOut',\n animationThreshold: 2000,\n // Configuration for progressive/incremental rendering\n progressiveThreshold: 3000,\n progressive: 400,\n // Threshold of if use single hover layer to optimize.\n // It is recommended that `hoverLayerThreshold` is equivalent to or less than\n // `progressiveThreshold`, otherwise hover will cause restart of progressive,\n // which is unexpected.\n // see example .\n hoverLayerThreshold: 3000,\n // See: module:echarts/scale/Time\n useUTC: false\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 numberUtil = require(\"../util/number\");\n\nvar formatUtil = require(\"../util/format\");\n\nvar Scale = require(\"./Scale\");\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*/\n\n/**\n * Interval scale\n * @module echarts/scale/Interval\n */\nvar roundNumber = numberUtil.round;\n/**\n * @alias module:echarts/coord/scale/Interval\n * @constructor\n */\n\nvar IntervalScale = Scale.extend({\n type: 'interval',\n _interval: 0,\n _intervalPrecision: 2,\n setExtent: function (start, end) {\n var thisExtent = this._extent; //start,end may be a Number like '25',so...\n\n if (!isNaN(start)) {\n thisExtent[0] = parseFloat(start);\n }\n\n if (!isNaN(end)) {\n thisExtent[1] = parseFloat(end);\n }\n },\n unionExtent: function (other) {\n var extent = this._extent;\n other[0] < extent[0] && (extent[0] = other[0]);\n other[1] > extent[1] && (extent[1] = other[1]); // unionExtent may called by it's sub classes\n\n IntervalScale.prototype.setExtent.call(this, extent[0], extent[1]);\n },\n\n /**\n * Get interval\n */\n getInterval: function () {\n return this._interval;\n },\n\n /**\n * Set interval\n */\n setInterval: function (interval) {\n this._interval = interval; // Dropped auto calculated niceExtent and use user setted extent\n // We assume user wan't to set both interval, min, max to get a better result\n\n this._niceExtent = this._extent.slice();\n this._intervalPrecision = helper.getIntervalPrecision(interval);\n },\n\n /**\n * @param {boolean} [expandToNicedExtent=false] If expand the ticks to niced extent.\n * @return {Array.}\n */\n getTicks: function (expandToNicedExtent) {\n var interval = this._interval;\n var extent = this._extent;\n var niceTickExtent = this._niceExtent;\n var intervalPrecision = this._intervalPrecision;\n var ticks = []; // If interval is 0, return [];\n\n if (!interval) {\n return ticks;\n } // Consider this case: using dataZoom toolbox, zoom and zoom.\n\n\n var safeLimit = 10000;\n\n if (extent[0] < niceTickExtent[0]) {\n if (expandToNicedExtent) {\n ticks.push(roundNumber(niceTickExtent[0] - interval, intervalPrecision));\n } else {\n ticks.push(extent[0]);\n }\n }\n\n var tick = niceTickExtent[0];\n\n while (tick <= niceTickExtent[1]) {\n ticks.push(tick); // Avoid rounding error\n\n tick = roundNumber(tick + interval, intervalPrecision);\n\n if (tick === ticks[ticks.length - 1]) {\n // Consider out of safe float point, e.g.,\n // -3711126.9907707 + 2e-10 === -3711126.9907707\n break;\n }\n\n if (ticks.length > safeLimit) {\n return [];\n }\n } // Consider this case: the last item of ticks is smaller\n // than niceTickExtent[1] and niceTickExtent[1] === extent[1].\n\n\n var lastNiceTick = ticks.length ? ticks[ticks.length - 1] : niceTickExtent[1];\n\n if (extent[1] > lastNiceTick) {\n if (expandToNicedExtent) {\n ticks.push(roundNumber(lastNiceTick + interval, intervalPrecision));\n } else {\n ticks.push(extent[1]);\n }\n }\n\n return ticks;\n },\n\n /**\n * @param {number} [splitNumber=5]\n * @return {Array.>}\n */\n getMinorTicks: function (splitNumber) {\n var ticks = this.getTicks(true);\n var minorTicks = [];\n var extent = this.getExtent();\n\n for (var i = 1; i < ticks.length; i++) {\n var nextTick = ticks[i];\n var prevTick = ticks[i - 1];\n var count = 0;\n var minorTicksGroup = [];\n var interval = nextTick - prevTick;\n var minorInterval = interval / splitNumber;\n\n while (count < splitNumber - 1) {\n var minorTick = numberUtil.round(prevTick + (count + 1) * minorInterval); // For the first and last interval. The count may be less than splitNumber.\n\n if (minorTick > extent[0] && minorTick < extent[1]) {\n minorTicksGroup.push(minorTick);\n }\n\n count++;\n }\n\n minorTicks.push(minorTicksGroup);\n }\n\n return minorTicks;\n },\n\n /**\n * @param {number} data\n * @param {Object} [opt]\n * @param {number|string} [opt.precision] If 'auto', use nice presision.\n * @param {boolean} [opt.pad] returns 1.50 but not 1.5 if precision is 2.\n * @return {string}\n */\n getLabel: function (data, opt) {\n if (data == null) {\n return '';\n }\n\n var precision = opt && opt.precision;\n\n if (precision == null) {\n precision = numberUtil.getPrecisionSafe(data) || 0;\n } else if (precision === 'auto') {\n // Should be more precise then tick.\n precision = this._intervalPrecision;\n } // (1) If `precision` is set, 12.005 should be display as '12.00500'.\n // (2) Use roundNumber (toFixed) to avoid scientific notation like '3.5e-7'.\n\n\n data = roundNumber(data, precision, true);\n return formatUtil.addCommas(data);\n },\n\n /**\n * Update interval and extent of intervals for nice ticks\n *\n * @param {number} [splitNumber = 5] Desired number of ticks\n * @param {number} [minInterval]\n * @param {number} [maxInterval]\n */\n niceTicks: function (splitNumber, minInterval, maxInterval) {\n splitNumber = splitNumber || 5;\n var extent = this._extent;\n var span = extent[1] - extent[0];\n\n if (!isFinite(span)) {\n return;\n } // User may set axis min 0 and data are all negative\n // FIXME If it needs to reverse ?\n\n\n if (span < 0) {\n span = -span;\n extent.reverse();\n }\n\n var result = helper.intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval);\n this._intervalPrecision = result.intervalPrecision;\n this._interval = result.interval;\n this._niceExtent = result.niceTickExtent;\n },\n\n /**\n * Nice extent.\n * @param {Object} opt\n * @param {number} [opt.splitNumber = 5] Given approx tick number\n * @param {boolean} [opt.fixMin=false]\n * @param {boolean} [opt.fixMax=false]\n * @param {boolean} [opt.minInterval]\n * @param {boolean} [opt.maxInterval]\n */\n niceExtent: function (opt) {\n var extent = this._extent; // If extent start and end are same, expand them\n\n if (extent[0] === extent[1]) {\n if (extent[0] !== 0) {\n // Expand extent\n var expandSize = extent[0]; // In the fowllowing case\n // Axis has been fixed max 100\n // Plus data are all 100 and axis extent are [100, 100].\n // Extend to the both side will cause expanded max is larger than fixed max.\n // So only expand to the smaller side.\n\n if (!opt.fixMax) {\n extent[1] += expandSize / 2;\n extent[0] -= expandSize / 2;\n } else {\n extent[0] -= expandSize / 2;\n }\n } else {\n extent[1] = 1;\n }\n }\n\n var span = extent[1] - extent[0]; // If there are no data and extent are [Infinity, -Infinity]\n\n if (!isFinite(span)) {\n extent[0] = 0;\n extent[1] = 1;\n }\n\n this.niceTicks(opt.splitNumber, opt.minInterval, opt.maxInterval); // var extent = this._extent;\n\n var interval = this._interval;\n\n if (!opt.fixMin) {\n extent[0] = roundNumber(Math.floor(extent[0] / interval) * interval);\n }\n\n if (!opt.fixMax) {\n extent[1] = roundNumber(Math.ceil(extent[1] / interval) * interval);\n }\n }\n});\n/**\n * @return {module:echarts/scale/Time}\n */\n\nIntervalScale.create = function () {\n return new IntervalScale();\n};\n\nvar _default = IntervalScale;\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 createHashMap = _util.createHashMap;\nvar retrieve = _util.retrieve;\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 * Helper for model references.\n * There are many manners to refer axis/coordSys.\n */\n// TODO\n// merge relevant logic to this file?\n// check: \"modelHelper\" of tooltip and \"BrushTargetManager\".\n\n/**\n * @class\n * For example:\n * {\n * coordSysName: 'cartesian2d',\n * coordSysDims: ['x', 'y', ...],\n * axisMap: HashMap({\n * x: xAxisModel,\n * y: yAxisModel\n * }),\n * categoryAxisMap: HashMap({\n * x: xAxisModel,\n * y: undefined\n * }),\n * // The index of the first category axis in `coordSysDims`.\n * // `null/undefined` means no category axis exists.\n * firstCategoryDimIndex: 1,\n * // To replace user specified encode.\n * }\n */\nfunction CoordSysInfo(coordSysName) {\n /**\n * @type {string}\n */\n this.coordSysName = coordSysName;\n /**\n * @type {Array.}\n */\n\n this.coordSysDims = [];\n /**\n * @type {module:zrender/core/util#HashMap}\n */\n\n this.axisMap = createHashMap();\n /**\n * @type {module:zrender/core/util#HashMap}\n */\n\n this.categoryAxisMap = createHashMap();\n /**\n * @type {number}\n */\n\n this.firstCategoryDimIndex = null;\n}\n/**\n * @return {module:model/referHelper#CoordSysInfo}\n */\n\n\nfunction getCoordSysInfoBySeries(seriesModel) {\n var coordSysName = seriesModel.get('coordinateSystem');\n var result = new CoordSysInfo(coordSysName);\n var fetch = fetchers[coordSysName];\n\n if (fetch) {\n fetch(seriesModel, result, result.axisMap, result.categoryAxisMap);\n return result;\n }\n}\n\nvar fetchers = {\n cartesian2d: function (seriesModel, result, axisMap, categoryAxisMap) {\n var xAxisModel = seriesModel.getReferringComponents('xAxis')[0];\n var yAxisModel = seriesModel.getReferringComponents('yAxis')[0];\n result.coordSysDims = ['x', 'y'];\n axisMap.set('x', xAxisModel);\n axisMap.set('y', yAxisModel);\n\n if (isCategory(xAxisModel)) {\n categoryAxisMap.set('x', xAxisModel);\n result.firstCategoryDimIndex = 0;\n }\n\n if (isCategory(yAxisModel)) {\n categoryAxisMap.set('y', yAxisModel);\n result.firstCategoryDimIndex == null & (result.firstCategoryDimIndex = 1);\n }\n },\n singleAxis: function (seriesModel, result, axisMap, categoryAxisMap) {\n var singleAxisModel = seriesModel.getReferringComponents('singleAxis')[0];\n result.coordSysDims = ['single'];\n axisMap.set('single', singleAxisModel);\n\n if (isCategory(singleAxisModel)) {\n categoryAxisMap.set('single', singleAxisModel);\n result.firstCategoryDimIndex = 0;\n }\n },\n polar: function (seriesModel, result, axisMap, categoryAxisMap) {\n var polarModel = seriesModel.getReferringComponents('polar')[0];\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n result.coordSysDims = ['radius', 'angle'];\n axisMap.set('radius', radiusAxisModel);\n axisMap.set('angle', angleAxisModel);\n\n if (isCategory(radiusAxisModel)) {\n categoryAxisMap.set('radius', radiusAxisModel);\n result.firstCategoryDimIndex = 0;\n }\n\n if (isCategory(angleAxisModel)) {\n categoryAxisMap.set('angle', angleAxisModel);\n result.firstCategoryDimIndex == null && (result.firstCategoryDimIndex = 1);\n }\n },\n geo: function (seriesModel, result, axisMap, categoryAxisMap) {\n result.coordSysDims = ['lng', 'lat'];\n },\n parallel: function (seriesModel, result, axisMap, categoryAxisMap) {\n var ecModel = seriesModel.ecModel;\n var parallelModel = ecModel.getComponent('parallel', seriesModel.get('parallelIndex'));\n var coordSysDims = result.coordSysDims = parallelModel.dimensions.slice();\n each(parallelModel.parallelAxisIndex, function (axisIndex, index) {\n var axisModel = ecModel.getComponent('parallelAxis', axisIndex);\n var axisDim = coordSysDims[index];\n axisMap.set(axisDim, axisModel);\n\n if (isCategory(axisModel) && result.firstCategoryDimIndex == null) {\n categoryAxisMap.set(axisDim, axisModel);\n result.firstCategoryDimIndex = index;\n }\n });\n }\n};\n\nfunction isCategory(axisModel) {\n return axisModel.get('type') === 'category';\n}\n\nexports.getCoordSysInfoBySeries = getCoordSysInfoBySeries;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 Scale = require(\"./Scale\");\n\nvar numberUtil = require(\"../util/number\");\n\nvar IntervalScale = require(\"./Interval\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * Log scale\n * @module echarts/scale/Log\n */\n// Use some method of IntervalScale\nvar scaleProto = Scale.prototype;\nvar intervalScaleProto = IntervalScale.prototype;\nvar getPrecisionSafe = numberUtil.getPrecisionSafe;\nvar roundingErrorFix = numberUtil.round;\nvar mathFloor = Math.floor;\nvar mathCeil = Math.ceil;\nvar mathPow = Math.pow;\nvar mathLog = Math.log;\nvar LogScale = Scale.extend({\n type: 'log',\n base: 10,\n $constructor: function () {\n Scale.apply(this, arguments);\n this._originalScale = new IntervalScale();\n },\n\n /**\n * @param {boolean} [expandToNicedExtent=false] If expand the ticks to niced extent.\n * @return {Array.}\n */\n getTicks: function (expandToNicedExtent) {\n var originalScale = this._originalScale;\n var extent = this._extent;\n var originalExtent = originalScale.getExtent();\n return zrUtil.map(intervalScaleProto.getTicks.call(this, expandToNicedExtent), function (val) {\n var powVal = numberUtil.round(mathPow(this.base, val)); // Fix #4158\n\n powVal = val === extent[0] && originalScale.__fixMin ? fixRoundingError(powVal, originalExtent[0]) : powVal;\n powVal = val === extent[1] && originalScale.__fixMax ? fixRoundingError(powVal, originalExtent[1]) : powVal;\n return powVal;\n }, this);\n },\n\n /**\n * @param {number} splitNumber\n * @return {Array.>}\n */\n getMinorTicks: intervalScaleProto.getMinorTicks,\n\n /**\n * @param {number} val\n * @return {string}\n */\n getLabel: intervalScaleProto.getLabel,\n\n /**\n * @param {number} val\n * @return {number}\n */\n scale: function (val) {\n val = scaleProto.scale.call(this, val);\n return mathPow(this.base, val);\n },\n\n /**\n * @param {number} start\n * @param {number} end\n */\n setExtent: function (start, end) {\n var base = this.base;\n start = mathLog(start) / mathLog(base);\n end = mathLog(end) / mathLog(base);\n intervalScaleProto.setExtent.call(this, start, end);\n },\n\n /**\n * @return {number} end\n */\n getExtent: function () {\n var base = this.base;\n var extent = scaleProto.getExtent.call(this);\n extent[0] = mathPow(base, extent[0]);\n extent[1] = mathPow(base, extent[1]); // Fix #4158\n\n var originalScale = this._originalScale;\n var originalExtent = originalScale.getExtent();\n originalScale.__fixMin && (extent[0] = fixRoundingError(extent[0], originalExtent[0]));\n originalScale.__fixMax && (extent[1] = fixRoundingError(extent[1], originalExtent[1]));\n return extent;\n },\n\n /**\n * @param {Array.} extent\n */\n unionExtent: function (extent) {\n this._originalScale.unionExtent(extent);\n\n var base = this.base;\n extent[0] = mathLog(extent[0]) / mathLog(base);\n extent[1] = mathLog(extent[1]) / mathLog(base);\n scaleProto.unionExtent.call(this, extent);\n },\n\n /**\n * @override\n */\n unionExtentFromData: function (data, dim) {\n // TODO\n // filter value that <= 0\n this.unionExtent(data.getApproximateExtent(dim));\n },\n\n /**\n * Update interval and extent of intervals for nice ticks\n * @param {number} [approxTickNum = 10] Given approx tick number\n */\n niceTicks: function (approxTickNum) {\n approxTickNum = approxTickNum || 10;\n var extent = this._extent;\n var span = extent[1] - extent[0];\n\n if (span === Infinity || span <= 0) {\n return;\n }\n\n var interval = numberUtil.quantity(span);\n var err = approxTickNum / span * interval; // Filter ticks to get closer to the desired count.\n\n if (err <= 0.5) {\n interval *= 10;\n } // Interval should be integer\n\n\n while (!isNaN(interval) && Math.abs(interval) < 1 && Math.abs(interval) > 0) {\n interval *= 10;\n }\n\n var niceExtent = [numberUtil.round(mathCeil(extent[0] / interval) * interval), numberUtil.round(mathFloor(extent[1] / interval) * interval)];\n this._interval = interval;\n this._niceExtent = niceExtent;\n },\n\n /**\n * Nice extent.\n * @override\n */\n niceExtent: function (opt) {\n intervalScaleProto.niceExtent.call(this, opt);\n var originalScale = this._originalScale;\n originalScale.__fixMin = opt.fixMin;\n originalScale.__fixMax = opt.fixMax;\n }\n});\nzrUtil.each(['contain', 'normalize'], function (methodName) {\n LogScale.prototype[methodName] = function (val) {\n val = mathLog(val) / mathLog(this.base);\n return scaleProto[methodName].call(this, val);\n };\n});\n\nLogScale.create = function () {\n return new LogScale();\n};\n\nfunction fixRoundingError(val, originalVal) {\n return roundingErrorFix(val, getPrecisionSafe(originalVal));\n}\n\nvar _default = LogScale;\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 _util = require(\"zrender/lib/core/util\");\n\nvar createHashMap = _util.createHashMap;\nvar isObject = _util.isObject;\nvar map = _util.map;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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\n * @param {Object} [opt]\n * @param {Object} [opt.categories=[]]\n * @param {Object} [opt.needCollect=false]\n * @param {Object} [opt.deduplication=false]\n */\nfunction OrdinalMeta(opt) {\n /**\n * @readOnly\n * @type {Array.}\n */\n this.categories = opt.categories || [];\n /**\n * @private\n * @type {boolean}\n */\n\n this._needCollect = opt.needCollect;\n /**\n * @private\n * @type {boolean}\n */\n\n this._deduplication = opt.deduplication;\n /**\n * @private\n * @type {boolean}\n */\n\n this._map;\n}\n/**\n * @param {module:echarts/model/Model} axisModel\n * @return {module:echarts/data/OrdinalMeta}\n */\n\n\nOrdinalMeta.createByAxisModel = function (axisModel) {\n var option = axisModel.option;\n var data = option.data;\n var categories = data && map(data, getName);\n return new OrdinalMeta({\n categories: categories,\n needCollect: !categories,\n // deduplication is default in axis.\n deduplication: option.dedplication !== false\n });\n};\n\nvar proto = OrdinalMeta.prototype;\n/**\n * @param {string} category\n * @return {number} ordinal\n */\n\nproto.getOrdinal = function (category) {\n return getOrCreateMap(this).get(category);\n};\n/**\n * @param {*} category\n * @return {number} The ordinal. If not found, return NaN.\n */\n\n\nproto.parseAndCollect = function (category) {\n var index;\n var needCollect = this._needCollect; // The value of category dim can be the index of the given category set.\n // This feature is only supported when !needCollect, because we should\n // consider a common case: a value is 2017, which is a number but is\n // expected to be tread as a category. This case usually happen in dataset,\n // where it happent to be no need of the index feature.\n\n if (typeof category !== 'string' && !needCollect) {\n return category;\n } // Optimize for the scenario:\n // category is ['2012-01-01', '2012-01-02', ...], where the input\n // data has been ensured not duplicate and is large data.\n // Notice, if a dataset dimension provide categroies, usually echarts\n // should remove duplication except user tell echarts dont do that\n // (set axis.deduplication = false), because echarts do not know whether\n // the values in the category dimension has duplication (consider the\n // parallel-aqi example)\n\n\n if (needCollect && !this._deduplication) {\n index = this.categories.length;\n this.categories[index] = category;\n return index;\n }\n\n var map = getOrCreateMap(this);\n index = map.get(category);\n\n if (index == null) {\n if (needCollect) {\n index = this.categories.length;\n this.categories[index] = category;\n map.set(category, index);\n } else {\n index = NaN;\n }\n }\n\n return index;\n}; // Consider big data, do not create map until needed.\n\n\nfunction getOrCreateMap(ordinalMeta) {\n return ordinalMeta._map || (ordinalMeta._map = createHashMap(ordinalMeta.categories));\n}\n\nfunction getName(obj) {\n if (isObject(obj) && obj.value != null) {\n return obj.value;\n } else {\n return obj + '';\n }\n}\n\nvar _default = OrdinalMeta;\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 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;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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(\"./AxisModel\");\n\nvar ComponentModel = 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// Grid 是在有直角坐标系的时候必须要存在的\n// 所以这里也要被 Cartesian2D 依赖\nvar _default = ComponentModel.extend({\n type: 'grid',\n dependencies: ['xAxis', 'yAxis'],\n layoutMode: 'box',\n\n /**\n * @type {module:echarts/coord/cartesian/Grid}\n */\n coordinateSystem: null,\n defaultOption: {\n show: false,\n zlevel: 0,\n z: 0,\n left: '10%',\n top: 60,\n right: '10%',\n bottom: 60,\n // If grid size contain label\n containLabel: false,\n // width: {totalWidth} - left - right,\n // height: {totalHeight} - top - bottom,\n backgroundColor: 'rgba(0,0,0,0)',\n borderWidth: 1,\n borderColor: '#ccc'\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 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 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 RadiusAxis(scale, radiusExtent) {\n Axis.call(this, 'radius', scale, radiusExtent);\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n\n this.type = 'category';\n}\n\nRadiusAxis.prototype = {\n constructor: RadiusAxis,\n\n /**\n * @override\n */\n pointToData: function (point, clamp) {\n return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];\n },\n dataToRadius: Axis.prototype.dataToCoord,\n radiusToData: Axis.prototype.coordToData\n};\nzrUtil.inherits(RadiusAxis, Axis);\nvar _default = RadiusAxis;\nmodule.exports = _default;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar SeriesModel = require(\"../../model/Series\");\n\nvar Tree = require(\"../../data/Tree\");\n\nvar Model = require(\"../../model/Model\");\n\nvar _format = require(\"../../util/format\");\n\nvar encodeHTML = _format.encodeHTML;\nvar addCommas = _format.addCommas;\n\nvar _treeHelper = require(\"../helper/treeHelper\");\n\nvar wrapTreePathInfo = _treeHelper.wrapTreePathInfo;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nvar _default = SeriesModel.extend({\n type: 'series.treemap',\n layoutMode: 'box',\n dependencies: ['grid', 'polar'],\n preventUsingHoverLayer: true,\n\n /**\n * @type {module:echarts/data/Tree~Node}\n */\n _viewRoot: null,\n defaultOption: {\n // Disable progressive rendering\n progressive: 0,\n // center: ['50%', '50%'], // not supported in ec3.\n // size: ['80%', '80%'], // deprecated, compatible with ec2.\n left: 'center',\n top: 'middle',\n right: null,\n bottom: null,\n width: '80%',\n height: '80%',\n sort: true,\n // Can be null or false or true\n // (order by desc default, asc not supported yet (strange effect))\n clipWindow: 'origin',\n // Size of clipped window when zooming. 'origin' or 'fullscreen'\n squareRatio: 0.5 * (1 + Math.sqrt(5)),\n // golden ratio\n leafDepth: null,\n // Nodes on depth from root are regarded as leaves.\n // Count from zero (zero represents only view root).\n drillDownIcon: '▶',\n // Use html character temporarily because it is complicated\n // to align specialized icon. ▷▶❒❐▼✚\n zoomToNodeRatio: 0.32 * 0.32,\n // Be effective when using zoomToNode. Specify the proportion of the\n // target node area in the view area.\n roam: true,\n // true, false, 'scale' or 'zoom', 'move'.\n nodeClick: 'zoomToNode',\n // Leaf node click behaviour: 'zoomToNode', 'link', false.\n // If leafDepth is set and clicking a node which has children but\n // be on left depth, the behaviour would be changing root. Otherwise\n // use behavious defined above.\n animation: true,\n animationDurationUpdate: 900,\n animationEasing: 'quinticInOut',\n breadcrumb: {\n show: true,\n height: 22,\n left: 'center',\n top: 'bottom',\n // right\n // bottom\n emptyItemWidth: 25,\n // Width of empty node.\n itemStyle: {\n color: 'rgba(0,0,0,0.7)',\n //'#5793f3',\n borderColor: 'rgba(255,255,255,0.7)',\n borderWidth: 1,\n shadowColor: 'rgba(150,150,150,1)',\n shadowBlur: 3,\n shadowOffsetX: 0,\n shadowOffsetY: 0,\n textStyle: {\n color: '#fff'\n }\n },\n emphasis: {\n textStyle: {}\n }\n },\n label: {\n show: true,\n // Do not use textDistance, for ellipsis rect just the same as treemap node rect.\n distance: 0,\n padding: 5,\n position: 'inside',\n // Can be [5, '5%'] or position stirng like 'insideTopLeft', ...\n // formatter: null,\n color: '#fff',\n ellipsis: true // align\n // verticalAlign\n\n },\n upperLabel: {\n // Label when node is parent.\n show: false,\n position: [0, '50%'],\n height: 20,\n // formatter: null,\n color: '#fff',\n ellipsis: true,\n // align: null,\n verticalAlign: 'middle'\n },\n itemStyle: {\n color: null,\n // Can be 'none' if not necessary.\n colorAlpha: null,\n // Can be 'none' if not necessary.\n colorSaturation: null,\n // Can be 'none' if not necessary.\n borderWidth: 0,\n gapWidth: 0,\n borderColor: '#fff',\n borderColorSaturation: null // If specified, borderColor will be ineffective, and the\n // border color is evaluated by color of current node and\n // borderColorSaturation.\n\n },\n emphasis: {\n upperLabel: {\n show: true,\n position: [0, '50%'],\n color: '#fff',\n ellipsis: true,\n verticalAlign: 'middle'\n }\n },\n visualDimension: 0,\n // Can be 0, 1, 2, 3.\n visualMin: null,\n visualMax: null,\n color: [],\n // + treemapSeries.color should not be modified. Please only modified\n // level[n].color (if necessary).\n // + Specify color list of each level. level[0].color would be global\n // color list if not specified. (see method `setDefault`).\n // + But set as a empty array to forbid fetch color from global palette\n // when using nodeModel.get('color'), otherwise nodes on deep level\n // will always has color palette set and are not able to inherit color\n // from parent node.\n // + TreemapSeries.color can not be set as 'none', otherwise effect\n // legend color fetching (see seriesColor.js).\n colorAlpha: null,\n // Array. Specify color alpha range of each level, like [0.2, 0.8]\n colorSaturation: null,\n // Array. Specify color saturation of each level, like [0.2, 0.5]\n colorMappingBy: 'index',\n // 'value' or 'index' or 'id'.\n visibleMin: 10,\n // If area less than this threshold (unit: pixel^2), node will not\n // be rendered. Only works when sort is 'asc' or 'desc'.\n childrenVisibleMin: null,\n // If area of a node less than this threshold (unit: pixel^2),\n // grandchildren will not show.\n // Why grandchildren? If not grandchildren but children,\n // some siblings show children and some not,\n // the appearance may be mess and not consistent,\n levels: [] // Each item: {\n // visibleMin, itemStyle, visualDimension, label\n // }\n // data: {\n // value: [],\n // children: [],\n // link: 'http://xxx.xxx.xxx',\n // target: 'blank' or 'self'\n // }\n\n },\n\n /**\n * @override\n */\n getInitialData: function (option, ecModel) {\n // Create a virtual root.\n var root = {\n name: option.name,\n children: option.data\n };\n completeTreeValue(root);\n var levels = option.levels || []; // 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\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Avoid typo.\nvar SOURCE_FORMAT_ORIGINAL = 'original';\nvar SOURCE_FORMAT_ARRAY_ROWS = 'arrayRows';\nvar SOURCE_FORMAT_OBJECT_ROWS = 'objectRows';\nvar SOURCE_FORMAT_KEYED_COLUMNS = 'keyedColumns';\nvar SOURCE_FORMAT_UNKNOWN = 'unknown'; // ??? CHANGE A NAME\n\nvar SOURCE_FORMAT_TYPED_ARRAY = 'typedArray';\nvar SERIES_LAYOUT_BY_COLUMN = 'column';\nvar SERIES_LAYOUT_BY_ROW = 'row';\nexports.SOURCE_FORMAT_ORIGINAL = SOURCE_FORMAT_ORIGINAL;\nexports.SOURCE_FORMAT_ARRAY_ROWS = SOURCE_FORMAT_ARRAY_ROWS;\nexports.SOURCE_FORMAT_OBJECT_ROWS = SOURCE_FORMAT_OBJECT_ROWS;\nexports.SOURCE_FORMAT_KEYED_COLUMNS = SOURCE_FORMAT_KEYED_COLUMNS;\nexports.SOURCE_FORMAT_UNKNOWN = SOURCE_FORMAT_UNKNOWN;\nexports.SOURCE_FORMAT_TYPED_ARRAY = SOURCE_FORMAT_TYPED_ARRAY;\nexports.SERIES_LAYOUT_BY_COLUMN = SERIES_LAYOUT_BY_COLUMN;\nexports.SERIES_LAYOUT_BY_ROW = SERIES_LAYOUT_BY_ROW;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 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\n/**\n * For testable.\n */\nvar roundNumber = numberUtil.round;\n/**\n * @param {Array.} extent Both extent[0] and extent[1] should be valid number.\n * Should be extent[0] < extent[1].\n * @param {number} splitNumber splitNumber should be >= 1.\n * @param {number} [minInterval]\n * @param {number} [maxInterval]\n * @return {Object} {interval, intervalPrecision, niceTickExtent}\n */\n\nfunction intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval) {\n var result = {};\n var span = extent[1] - extent[0];\n var interval = result.interval = numberUtil.nice(span / splitNumber, true);\n\n if (minInterval != null && interval < minInterval) {\n interval = result.interval = minInterval;\n }\n\n if (maxInterval != null && interval > maxInterval) {\n interval = result.interval = maxInterval;\n } // Tow more digital for tick.\n\n\n var precision = result.intervalPrecision = getIntervalPrecision(interval); // Niced extent inside original extent\n\n var niceTickExtent = result.niceTickExtent = [roundNumber(Math.ceil(extent[0] / interval) * interval, precision), roundNumber(Math.floor(extent[1] / interval) * interval, precision)];\n fixExtent(niceTickExtent, extent);\n return result;\n}\n/**\n * @param {number} interval\n * @return {number} interval precision\n */\n\n\nfunction getIntervalPrecision(interval) {\n // Tow more digital for tick.\n return numberUtil.getPrecisionSafe(interval) + 2;\n}\n\nfunction clamp(niceTickExtent, idx, extent) {\n niceTickExtent[idx] = Math.max(Math.min(niceTickExtent[idx], extent[1]), extent[0]);\n} // In some cases (e.g., splitNumber is 1), niceTickExtent may be out of extent.\n\n\nfunction fixExtent(niceTickExtent, extent) {\n !isFinite(niceTickExtent[0]) && (niceTickExtent[0] = extent[0]);\n !isFinite(niceTickExtent[1]) && (niceTickExtent[1] = extent[1]);\n clamp(niceTickExtent, 0, extent);\n clamp(niceTickExtent, 1, extent);\n\n if (niceTickExtent[0] > niceTickExtent[1]) {\n niceTickExtent[0] = niceTickExtent[1];\n }\n}\n\nexports.intervalScaleNiceTicks = intervalScaleNiceTicks;\nexports.getIntervalPrecision = getIntervalPrecision;\nexports.fixExtent = fixExtent;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 graphic = require(\"../util/graphic\");\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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;\n/**\n * @param {module:echarts/ExtensionAPI} api\n * @param {Object} [opts]\n * @param {string} [opts.text]\n * @param {string} [opts.color]\n * @param {string} [opts.textColor]\n * @return {module:zrender/Element}\n */\n\nfunction _default(api, opts) {\n opts = opts || {};\n zrUtil.defaults(opts, {\n text: 'loading',\n textColor: '#000',\n fontSize: '12px',\n maskColor: 'rgba(255, 255, 255, 0.8)',\n showSpinner: true,\n color: '#c23531',\n spinnerRadius: 10,\n lineWidth: 5,\n zlevel: 0\n });\n var group = new graphic.Group();\n var mask = new graphic.Rect({\n style: {\n fill: opts.maskColor\n },\n zlevel: opts.zlevel,\n z: 10000\n });\n group.add(mask);\n var font = opts.fontSize + ' sans-serif';\n var labelRect = new graphic.Rect({\n style: {\n fill: 'none',\n text: opts.text,\n font: font,\n textPosition: 'right',\n textDistance: 10,\n textFill: opts.textColor\n },\n zlevel: opts.zlevel,\n z: 10001\n });\n group.add(labelRect);\n\n if (opts.showSpinner) {\n var arc = new graphic.Arc({\n shape: {\n startAngle: -PI / 2,\n endAngle: -PI / 2 + 0.1,\n r: opts.spinnerRadius\n },\n style: {\n stroke: opts.color,\n lineCap: 'round',\n lineWidth: opts.lineWidth\n },\n zlevel: opts.zlevel,\n z: 10001\n });\n arc.animateShape(true).when(1000, {\n endAngle: PI * 3 / 2\n }).start('circularInOut');\n arc.animateShape(true).when(1000, {\n startAngle: PI * 3 / 2\n }).delay(300).start('circularInOut');\n group.add(arc);\n } // Inject resize\n\n\n group.resize = function () {\n var textWidth = textContain.getWidth(opts.text, font);\n var r = opts.showSpinner ? opts.spinnerRadius : 0; // cx = (containerWidth - arcDiameter - textDistance - textWidth) / 2\n // textDistance needs to be calculated when both animation and text exist\n\n var cx = (api.getWidth() - r * 2 - (opts.showSpinner && textWidth ? 10 : 0) - textWidth) / 2 // only show the text\n - (opts.showSpinner ? 0 : textWidth / 2);\n var cy = api.getHeight() / 2;\n opts.showSpinner && arc.setShape({\n cx: cx,\n cy: cy\n });\n labelRect.setShape({\n x: cx - r,\n y: cy - r,\n width: r * 2,\n height: r * 2\n });\n mask.setShape({\n x: 0,\n y: 0,\n width: api.getWidth(),\n height: api.getHeight()\n });\n };\n\n group.resize();\n return group;\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(\"./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 getAreaStyle = makeStyleMapper([['fill', 'color'], ['shadowBlur'], ['shadowOffsetX'], ['shadowOffsetY'], ['opacity'], ['shadowColor']]);\nvar _default = {\n getAreaStyle: function (excludes, includes) {\n return getAreaStyle(this, excludes, includes);\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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar _number = require(\"../util/number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar _dataStackHelper = require(\"../data/helper/dataStackHelper\");\n\nvar isDimensionStacked = _dataStackHelper.isDimensionStacked;\n\nvar createRenderPlanner = require(\"../chart/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 STACK_PREFIX = '__ec_stack_';\nvar LARGE_BAR_MIN_WIDTH = 0.5;\nvar LargeArr = typeof Float32Array !== 'undefined' ? Float32Array : Array;\n\nfunction getSeriesStackId(seriesModel) {\n return seriesModel.get('stack') || STACK_PREFIX + seriesModel.seriesIndex;\n}\n\nfunction getAxisKey(axis) {\n return axis.dim + axis.index;\n}\n/**\n * @param {Object} opt\n * @param {module:echarts/coord/Axis} opt.axis Only support category axis currently.\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} If axis.type is not 'category', return undefined.\n */\n\n\nfunction getLayoutOnAxis(opt) {\n var params = [];\n var baseAxis = opt.axis;\n var axisKey = 'axis0';\n\n if (baseAxis.type !== 'category') {\n return;\n }\n\n var bandWidth = baseAxis.getBandWidth();\n\n for (var i = 0; i < opt.count || 0; i++) {\n params.push(zrUtil.defaults({\n bandWidth: bandWidth,\n axisKey: axisKey,\n stackId: STACK_PREFIX + i\n }, opt));\n }\n\n var widthAndOffsets = doCalBarWidthAndOffset(params);\n var result = [];\n\n for (var i = 0; i < opt.count; i++) {\n var item = widthAndOffsets[axisKey][STACK_PREFIX + i];\n item.offsetCenter = item.offset + item.width / 2;\n result.push(item);\n }\n\n return result;\n}\n\nfunction prepareLayoutBarSeries(seriesType, ecModel) {\n var seriesModels = [];\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n // Check series coordinate, do layout for cartesian2d only\n if (isOnCartesian(seriesModel) && !isInLargeMode(seriesModel)) {\n seriesModels.push(seriesModel);\n }\n });\n return seriesModels;\n}\n/**\n * Map from (baseAxis.dim + '_' + baseAxis.index) to min gap of two adjacent\n * values.\n * This works for time axes, value axes, and log axes.\n * For a single time axis, return value is in the form like\n * {'x_0': [1000000]}.\n * The value of 1000000 is in milliseconds.\n */\n\n\nfunction getValueAxesMinGaps(barSeries) {\n /**\n * Map from axis.index to values.\n * For a single time axis, axisValues is in the form like\n * {'x_0': [1495555200000, 1495641600000, 1495728000000]}.\n * Items in axisValues[x], e.g. 1495555200000, are time values of all\n * series.\n */\n var axisValues = {};\n zrUtil.each(barSeries, function (seriesModel) {\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n\n if (baseAxis.type !== 'time' && baseAxis.type !== 'value') {\n return;\n }\n\n var data = seriesModel.getData();\n var key = baseAxis.dim + '_' + baseAxis.index;\n var dim = data.mapDimension(baseAxis.dim);\n\n for (var i = 0, cnt = data.count(); i < cnt; ++i) {\n var value = data.get(dim, i);\n\n if (!axisValues[key]) {\n // No previous data for the axis\n axisValues[key] = [value];\n } else {\n // No value in previous series\n axisValues[key].push(value);\n } // Ignore duplicated time values in the same axis\n\n }\n });\n var axisMinGaps = [];\n\n for (var key in axisValues) {\n if (axisValues.hasOwnProperty(key)) {\n var valuesInAxis = axisValues[key];\n\n if (valuesInAxis) {\n // Sort axis values into ascending order to calculate gaps\n valuesInAxis.sort(function (a, b) {\n return a - b;\n });\n var min = null;\n\n for (var j = 1; j < valuesInAxis.length; ++j) {\n var delta = valuesInAxis[j] - valuesInAxis[j - 1];\n\n if (delta > 0) {\n // Ignore 0 delta because they are of the same axis value\n min = min === null ? delta : Math.min(min, delta);\n }\n } // Set to null if only have one data\n\n\n axisMinGaps[key] = min;\n }\n }\n }\n\n return axisMinGaps;\n}\n\nfunction makeColumnLayout(barSeries) {\n var axisMinGaps = getValueAxesMinGaps(barSeries);\n var seriesInfoList = [];\n zrUtil.each(barSeries, function (seriesModel) {\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n var axisExtent = baseAxis.getExtent();\n var bandWidth;\n\n if (baseAxis.type === 'category') {\n bandWidth = baseAxis.getBandWidth();\n } else if (baseAxis.type === 'value' || baseAxis.type === 'time') {\n var key = baseAxis.dim + '_' + baseAxis.index;\n var minGap = axisMinGaps[key];\n var extentSpan = Math.abs(axisExtent[1] - axisExtent[0]);\n var scale = baseAxis.scale.getExtent();\n var scaleSpan = Math.abs(scale[1] - scale[0]);\n bandWidth = minGap ? extentSpan / scaleSpan * minGap : extentSpan; // When there is only one data value\n } else {\n var data = seriesModel.getData();\n bandWidth = Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n }\n\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barMinWidth = parsePercent( // barMinWidth by default is 1 in cartesian. Because in value axis,\n // the auto-calculated bar width might be less than 1.\n seriesModel.get('barMinWidth') || 1, bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n seriesInfoList.push({\n bandWidth: bandWidth,\n barWidth: barWidth,\n barMaxWidth: barMaxWidth,\n barMinWidth: barMinWidth,\n barGap: barGap,\n barCategoryGap: barCategoryGap,\n axisKey: getAxisKey(baseAxis),\n stackId: getSeriesStackId(seriesModel)\n });\n });\n return doCalBarWidthAndOffset(seriesInfoList);\n}\n\nfunction doCalBarWidthAndOffset(seriesInfoList) {\n // Columns info on each category axis. Key is cartesian name\n var columnsMap = {};\n zrUtil.each(seriesInfoList, function (seriesInfo, idx) {\n var axisKey = seriesInfo.axisKey;\n var bandWidth = seriesInfo.bandWidth;\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = seriesInfo.stackId;\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n }; // Caution: In a single coordinate system, these barGrid attributes\n // will be shared by series. Consider that they have default values,\n // only the attributes set on the last series will work.\n // Do not change this fact unless there will be a break change.\n\n var barWidth = seriesInfo.barWidth;\n\n if (barWidth && !stacks[stackId].width) {\n // See #6312, do not restrict width.\n stacks[stackId].width = barWidth;\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n columnsOnAxis.remainedWidth -= barWidth;\n }\n\n var barMaxWidth = seriesInfo.barMaxWidth;\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n var barMinWidth = seriesInfo.barMinWidth;\n barMinWidth && (stacks[stackId].minWidth = barMinWidth);\n var barGap = seriesInfo.barGap;\n barGap != null && (columnsOnAxis.gap = barGap);\n var barCategoryGap = seriesInfo.barCategoryGap;\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\n zrUtil.each(stacks, function (column) {\n var maxWidth = column.maxWidth;\n var minWidth = column.minWidth;\n\n if (!column.width) {\n var finalWidth = autoWidth;\n\n if (maxWidth && maxWidth < finalWidth) {\n finalWidth = Math.min(maxWidth, remainedWidth);\n } // `minWidth` has higher priority. `minWidth` decide that wheter the\n // bar is able to be visible. So `minWidth` should not be restricted\n // by `maxWidth` or `remainedWidth` (which is from `bandWidth`). In\n // the extreme cases for `value` axis, bars are allowed to overlap\n // with each other if `minWidth` specified.\n\n\n if (minWidth && minWidth > finalWidth) {\n finalWidth = minWidth;\n }\n\n if (finalWidth !== autoWidth) {\n column.width = finalWidth;\n remainedWidth -= finalWidth + barGapPercent * finalWidth;\n autoWidthCount--;\n }\n } else {\n // `barMinWidth/barMaxWidth` has higher priority than `barWidth`, as\n // CSS does. Becuase barWidth can be a percent value, where\n // `barMaxWidth` can be used to restrict the final width.\n var finalWidth = column.width;\n\n if (maxWidth) {\n finalWidth = Math.min(finalWidth, maxWidth);\n } // `minWidth` has higher priority, as described above\n\n\n if (minWidth) {\n finalWidth = Math.max(finalWidth, minWidth);\n }\n\n column.width = finalWidth;\n remainedWidth -= finalWidth + barGapPercent * finalWidth;\n autoWidthCount--;\n }\n }); // Recalculate width again\n\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n bandWidth: bandWidth,\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}\n/**\n * @param {Object} barWidthAndOffset The result of makeColumnLayout\n * @param {module:echarts/coord/Axis} axis\n * @param {module:echarts/model/Series} [seriesModel] If not provided, return all.\n * @return {Object} {stackId: {offset, width}} or {offset, width} if seriesModel provided.\n */\n\n\nfunction retrieveColumnLayout(barWidthAndOffset, axis, seriesModel) {\n if (barWidthAndOffset && axis) {\n var result = barWidthAndOffset[getAxisKey(axis)];\n\n if (result != null && seriesModel != null) {\n result = result[getSeriesStackId(seriesModel)];\n }\n\n return result;\n }\n}\n/**\n * @param {string} seriesType\n * @param {module:echarts/model/Global} ecModel\n */\n\n\nfunction layout(seriesType, ecModel) {\n var seriesModels = prepareLayoutBarSeries(seriesType, ecModel);\n var barWidthAndOffset = makeColumnLayout(seriesModels);\n var lastStackCoords = {};\n var lastStackCoordsOrigin = {};\n zrUtil.each(seriesModels, function (seriesModel) {\n var data = seriesModel.getData();\n var cartesian = seriesModel.coordinateSystem;\n var baseAxis = cartesian.getBaseAxis();\n var stackId = getSeriesStackId(seriesModel);\n var columnLayoutInfo = barWidthAndOffset[getAxisKey(baseAxis)][stackId];\n var columnOffset = columnLayoutInfo.offset;\n var columnWidth = columnLayoutInfo.width;\n var valueAxis = cartesian.getOtherAxis(baseAxis);\n var barMinHeight = seriesModel.get('barMinHeight') || 0;\n lastStackCoords[stackId] = lastStackCoords[stackId] || [];\n lastStackCoordsOrigin[stackId] = lastStackCoordsOrigin[stackId] || []; // Fix #4243\n\n data.setLayout({\n bandWidth: columnLayoutInfo.bandWidth,\n offset: columnOffset,\n size: columnWidth\n });\n var valueDim = data.mapDimension(valueAxis.dim);\n var baseDim = data.mapDimension(baseAxis.dim);\n var stacked = isDimensionStacked(data, valueDim\n /*, baseDim*/\n );\n var isValueAxisH = valueAxis.isHorizontal();\n var valueAxisStart = getValueAxisStart(baseAxis, valueAxis, stacked);\n\n for (var idx = 0, len = data.count(); idx < len; idx++) {\n var value = data.get(valueDim, idx);\n var baseValue = data.get(baseDim, idx);\n var sign = value >= 0 ? 'p' : 'n';\n var baseCoord = valueAxisStart; // Because of the barMinHeight, we can not use the value in\n // stackResultDimension directly.\n\n if (stacked) {\n // Only ordinal axis can be stacked.\n if (!lastStackCoords[stackId][baseValue]) {\n lastStackCoords[stackId][baseValue] = {\n p: valueAxisStart,\n // Positive stack\n n: valueAxisStart // Negative stack\n\n };\n } // Should also consider #4243\n\n\n baseCoord = lastStackCoords[stackId][baseValue][sign];\n }\n\n var x;\n var y;\n var width;\n var height;\n\n if (isValueAxisH) {\n var coord = cartesian.dataToPoint([value, baseValue]);\n x = baseCoord;\n y = coord[1] + columnOffset;\n width = coord[0] - valueAxisStart;\n height = columnWidth;\n\n if (Math.abs(width) < barMinHeight) {\n width = (width < 0 ? -1 : 1) * barMinHeight;\n } // Ignore stack from NaN value\n\n\n if (!isNaN(width)) {\n stacked && (lastStackCoords[stackId][baseValue][sign] += width);\n }\n } else {\n var coord = cartesian.dataToPoint([baseValue, value]);\n x = coord[0] + columnOffset;\n y = baseCoord;\n width = columnWidth;\n height = coord[1] - valueAxisStart;\n\n if (Math.abs(height) < barMinHeight) {\n // Include zero to has a positive bar\n height = (height <= 0 ? -1 : 1) * barMinHeight;\n } // Ignore stack from NaN value\n\n\n if (!isNaN(height)) {\n stacked && (lastStackCoords[stackId][baseValue][sign] += height);\n }\n }\n\n data.setItemLayout(idx, {\n x: x,\n y: y,\n width: width,\n height: height\n });\n }\n }, this);\n} // TODO: Do not support stack in large mode yet.\n\n\nvar largeLayout = {\n seriesType: 'bar',\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n if (!isOnCartesian(seriesModel) || !isInLargeMode(seriesModel)) {\n return;\n }\n\n var data = seriesModel.getData();\n var cartesian = seriesModel.coordinateSystem;\n var coordLayout = cartesian.grid.getRect();\n var baseAxis = cartesian.getBaseAxis();\n var valueAxis = cartesian.getOtherAxis(baseAxis);\n var valueDim = data.mapDimension(valueAxis.dim);\n var baseDim = data.mapDimension(baseAxis.dim);\n var valueAxisHorizontal = valueAxis.isHorizontal();\n var valueDimIdx = valueAxisHorizontal ? 0 : 1;\n var barWidth = retrieveColumnLayout(makeColumnLayout([seriesModel]), baseAxis, seriesModel).width;\n\n if (!(barWidth > LARGE_BAR_MIN_WIDTH)) {\n // jshint ignore:line\n barWidth = LARGE_BAR_MIN_WIDTH;\n }\n\n return {\n progress: progress\n };\n\n function progress(params, data) {\n var count = params.count;\n var largePoints = new LargeArr(count * 2);\n var largeBackgroundPoints = new LargeArr(count * 2);\n var largeDataIndices = new LargeArr(count);\n var dataIndex;\n var coord = [];\n var valuePair = [];\n var pointsOffset = 0;\n var idxOffset = 0;\n\n while ((dataIndex = params.next()) != null) {\n valuePair[valueDimIdx] = data.get(valueDim, dataIndex);\n valuePair[1 - valueDimIdx] = data.get(baseDim, dataIndex);\n coord = cartesian.dataToPoint(valuePair, null, coord); // Data index might not be in order, depends on `progressiveChunkMode`.\n\n largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coordLayout.x + coordLayout.width : coord[0];\n largePoints[pointsOffset++] = coord[0];\n largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coord[1] : coordLayout.y + coordLayout.height;\n largePoints[pointsOffset++] = coord[1];\n largeDataIndices[idxOffset++] = dataIndex;\n }\n\n data.setLayout({\n largePoints: largePoints,\n largeDataIndices: largeDataIndices,\n largeBackgroundPoints: largeBackgroundPoints,\n barWidth: barWidth,\n valueAxisStart: getValueAxisStart(baseAxis, valueAxis, false),\n backgroundStart: valueAxisHorizontal ? coordLayout.x : coordLayout.y,\n valueAxisHorizontal: valueAxisHorizontal\n });\n }\n }\n};\n\nfunction isOnCartesian(seriesModel) {\n return seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'cartesian2d';\n}\n\nfunction isInLargeMode(seriesModel) {\n return seriesModel.pipelineContext && seriesModel.pipelineContext.large;\n} // See cases in `test/bar-start.html` and `#7412`, `#8747`.\n\n\nfunction getValueAxisStart(baseAxis, valueAxis, stacked) {\n return valueAxis.toGlobalCoord(valueAxis.dataToCoord(valueAxis.type === 'log' ? 1 : 0));\n}\n\nexports.getLayoutOnAxis = getLayoutOnAxis;\nexports.prepareLayoutBarSeries = prepareLayoutBarSeries;\nexports.makeColumnLayout = makeColumnLayout;\nexports.retrieveColumnLayout = retrieveColumnLayout;\nexports.layout = layout;\nexports.largeLayout = largeLayout;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 axisDefault = require(\"./axisDefault\");\n\nvar ComponentModel = require(\"../model/Component\");\n\nvar _layout = require(\"../util/layout\");\n\nvar getLayoutParams = _layout.getLayoutParams;\nvar mergeLayoutParam = _layout.mergeLayoutParam;\n\nvar OrdinalMeta = require(\"../data/OrdinalMeta\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 axisType is fixed ?\nvar AXIS_TYPES = ['value', 'category', 'time', 'log'];\n/**\n * Generate sub axis model class\n * @param {string} axisName 'x' 'y' 'radius' 'angle' 'parallel'\n * @param {module:echarts/model/Component} BaseAxisModelClass\n * @param {Function} axisTypeDefaulter\n * @param {Object} [extraDefaultOption]\n */\n\nfunction _default(axisName, BaseAxisModelClass, axisTypeDefaulter, extraDefaultOption) {\n zrUtil.each(AXIS_TYPES, function (axisType) {\n BaseAxisModelClass.extend({\n /**\n * @readOnly\n */\n type: axisName + 'Axis.' + axisType,\n mergeDefaultAndTheme: function (option, ecModel) {\n var layoutMode = this.layoutMode;\n var inputPositionParams = layoutMode ? getLayoutParams(option) : {};\n var themeModel = ecModel.getTheme();\n zrUtil.merge(option, themeModel.get(axisType + 'Axis'));\n zrUtil.merge(option, this.getDefaultOption());\n option.type = axisTypeDefaulter(axisName, option);\n\n if (layoutMode) {\n mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n },\n\n /**\n * @override\n */\n optionUpdated: function () {\n var thisOption = this.option;\n\n if (thisOption.type === 'category') {\n this.__ordinalMeta = OrdinalMeta.createByAxisModel(this);\n }\n },\n\n /**\n * Should not be called before all of 'getInitailData' finished.\n * Because categories are collected during initializing data.\n */\n getCategories: function (rawData) {\n var option = this.option; // FIXME\n // warning if called before all of 'getInitailData' finished.\n\n if (option.type === 'category') {\n if (rawData) {\n return option.data;\n }\n\n return this.__ordinalMeta.categories;\n }\n },\n getOrdinalMeta: function () {\n return this.__ordinalMeta;\n },\n defaultOption: zrUtil.mergeAll([{}, axisDefault[axisType + 'Axis'], extraDefaultOption], true)\n });\n });\n ComponentModel.registerSubTypeDefaulter(axisName + 'Axis', zrUtil.curry(axisTypeDefaulter, axisName));\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});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar _dataStackHelper = require(\"../../data/helper/dataStackHelper\");\n\nvar isDimensionStacked = _dataStackHelper.isDimensionStacked;\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar map = _util.map;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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} coordSys\n * @param {module:echarts/data/List} data\n * @param {string} valueOrigin lineSeries.option.areaStyle.origin\n */\nfunction prepareDataCoordInfo(coordSys, data, valueOrigin) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueStart = getValueStart(valueAxis, valueOrigin);\n var baseAxisDim = baseAxis.dim;\n var valueAxisDim = valueAxis.dim;\n var valueDim = data.mapDimension(valueAxisDim);\n var baseDim = data.mapDimension(baseAxisDim);\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var dims = map(coordSys.dimensions, function (coordDim) {\n return data.mapDimension(coordDim);\n });\n var stacked;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n\n if (stacked |= isDimensionStacked(data, dims[0]\n /*, dims[1]*/\n )) {\n // jshint ignore:line\n dims[0] = stackResultDim;\n }\n\n if (stacked |= isDimensionStacked(data, dims[1]\n /*, dims[0]*/\n )) {\n // jshint ignore:line\n dims[1] = stackResultDim;\n }\n\n return {\n dataDimsForPoint: dims,\n valueStart: valueStart,\n valueAxisDim: valueAxisDim,\n baseAxisDim: baseAxisDim,\n stacked: !!stacked,\n valueDim: valueDim,\n baseDim: baseDim,\n baseDataOffset: baseDataOffset,\n stackedOverDimension: data.getCalculationInfo('stackedOverDimension')\n };\n}\n\nfunction getValueStart(valueAxis, valueOrigin) {\n var valueStart = 0;\n var extent = valueAxis.scale.getExtent();\n\n if (valueOrigin === 'start') {\n valueStart = extent[0];\n } else if (valueOrigin === 'end') {\n valueStart = extent[1];\n } // auto\n else {\n // Both positive\n if (extent[0] > 0) {\n valueStart = extent[0];\n } // Both negative\n else if (extent[1] < 0) {\n valueStart = extent[1];\n } // If is one positive, and one negative, onZero shall be true\n\n }\n\n return valueStart;\n}\n\nfunction getStackedOnPoint(dataCoordInfo, coordSys, data, idx) {\n var value = NaN;\n\n if (dataCoordInfo.stacked) {\n value = data.get(data.getCalculationInfo('stackedOverDimension'), idx);\n }\n\n if (isNaN(value)) {\n value = dataCoordInfo.valueStart;\n }\n\n var baseDataOffset = dataCoordInfo.baseDataOffset;\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(dataCoordInfo.baseDim, idx);\n stackedData[1 - baseDataOffset] = value;\n return coordSys.dataToPoint(stackedData);\n}\n\nexports.prepareDataCoordInfo = prepareDataCoordInfo;\nexports.getStackedOnPoint = getStackedOnPoint;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"./graphic\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar _text = require(\"zrender/lib/contain/text\");\n\nvar calculateTextPosition = _text.calculateTextPosition;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Symbol factory\n\n/**\n * Triangle shape\n * @inner\n */\nvar Triangle = graphic.extendShape({\n type: 'triangle',\n shape: {\n cx: 0,\n cy: 0,\n width: 0,\n height: 0\n },\n buildPath: function (path, shape) {\n var cx = shape.cx;\n var cy = shape.cy;\n var width = shape.width / 2;\n var height = shape.height / 2;\n path.moveTo(cx, cy - height);\n path.lineTo(cx + width, cy + height);\n path.lineTo(cx - width, cy + height);\n path.closePath();\n }\n});\n/**\n * Diamond shape\n * @inner\n */\n\nvar Diamond = graphic.extendShape({\n type: 'diamond',\n shape: {\n cx: 0,\n cy: 0,\n width: 0,\n height: 0\n },\n buildPath: function (path, shape) {\n var cx = shape.cx;\n var cy = shape.cy;\n var width = shape.width / 2;\n var height = shape.height / 2;\n path.moveTo(cx, cy - height);\n path.lineTo(cx + width, cy);\n path.lineTo(cx, cy + height);\n path.lineTo(cx - width, cy);\n path.closePath();\n }\n});\n/**\n * Pin shape\n * @inner\n */\n\nvar Pin = graphic.extendShape({\n type: 'pin',\n shape: {\n // x, y on the cusp\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\n buildPath: function (path, shape) {\n var x = shape.x;\n var y = shape.y;\n var w = shape.width / 5 * 3; // Height must be larger than width\n\n var h = Math.max(w, shape.height);\n var r = w / 2; // Dist on y with tangent point and circle center\n\n var dy = r * r / (h - r);\n var cy = y - h + r + dy;\n var angle = Math.asin(dy / r); // Dist on x with tangent point and circle center\n\n var dx = Math.cos(angle) * r;\n var tanX = Math.sin(angle);\n var tanY = Math.cos(angle);\n var cpLen = r * 0.6;\n var cpLen2 = r * 0.7;\n path.moveTo(x - dx, cy + dy);\n path.arc(x, cy, r, Math.PI - angle, Math.PI * 2 + angle);\n path.bezierCurveTo(x + dx - tanX * cpLen, cy + dy + tanY * cpLen, x, y - cpLen2, x, y);\n path.bezierCurveTo(x, y - cpLen2, x - dx + tanX * cpLen, cy + dy + tanY * cpLen, x - dx, cy + dy);\n path.closePath();\n }\n});\n/**\n * Arrow shape\n * @inner\n */\n\nvar Arrow = graphic.extendShape({\n type: 'arrow',\n shape: {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\n buildPath: function (ctx, shape) {\n var height = shape.height;\n var width = shape.width;\n var x = shape.x;\n var y = shape.y;\n var dx = width / 3 * 2;\n ctx.moveTo(x, y);\n ctx.lineTo(x + dx, y + height);\n ctx.lineTo(x, y + height / 4 * 3);\n ctx.lineTo(x - dx, y + height);\n ctx.lineTo(x, y);\n ctx.closePath();\n }\n});\n/**\n * Map of path contructors\n * @type {Object.}\n */\n\nvar symbolCtors = {\n line: graphic.Line,\n rect: graphic.Rect,\n roundRect: graphic.Rect,\n square: graphic.Rect,\n circle: graphic.Circle,\n diamond: Diamond,\n pin: Pin,\n arrow: Arrow,\n triangle: Triangle\n};\nvar symbolShapeMakers = {\n line: function (x, y, w, h, shape) {\n // FIXME\n shape.x1 = x;\n shape.y1 = y + h / 2;\n shape.x2 = x + w;\n shape.y2 = y + h / 2;\n },\n rect: function (x, y, w, h, shape) {\n shape.x = x;\n shape.y = y;\n shape.width = w;\n shape.height = h;\n },\n roundRect: function (x, y, w, h, shape) {\n shape.x = x;\n shape.y = y;\n shape.width = w;\n shape.height = h;\n shape.r = Math.min(w, h) / 4;\n },\n square: function (x, y, w, h, shape) {\n var size = Math.min(w, h);\n shape.x = x;\n shape.y = y;\n shape.width = size;\n shape.height = size;\n },\n circle: function (x, y, w, h, shape) {\n // Put circle in the center of square\n shape.cx = x + w / 2;\n shape.cy = y + h / 2;\n shape.r = Math.min(w, h) / 2;\n },\n diamond: function (x, y, w, h, shape) {\n shape.cx = x + w / 2;\n shape.cy = y + h / 2;\n shape.width = w;\n shape.height = h;\n },\n pin: function (x, y, w, h, shape) {\n shape.x = x + w / 2;\n shape.y = y + h / 2;\n shape.width = w;\n shape.height = h;\n },\n arrow: function (x, y, w, h, shape) {\n shape.x = x + w / 2;\n shape.y = y + h / 2;\n shape.width = w;\n shape.height = h;\n },\n triangle: function (x, y, w, h, shape) {\n shape.cx = x + w / 2;\n shape.cy = y + h / 2;\n shape.width = w;\n shape.height = h;\n }\n};\nvar symbolBuildProxies = {};\nzrUtil.each(symbolCtors, function (Ctor, name) {\n symbolBuildProxies[name] = new Ctor();\n});\nvar SymbolClz = graphic.extendShape({\n type: 'symbol',\n shape: {\n symbolType: '',\n x: 0,\n y: 0,\n width: 0,\n height: 0\n },\n calculateTextPosition: function (out, style, rect) {\n var res = calculateTextPosition(out, style, rect);\n var shape = this.shape;\n\n if (shape && shape.symbolType === 'pin' && style.textPosition === 'inside') {\n res.y = rect.y + rect.height * 0.4;\n }\n\n return res;\n },\n buildPath: function (ctx, shape, inBundle) {\n var symbolType = shape.symbolType;\n\n if (symbolType !== 'none') {\n var proxySymbol = symbolBuildProxies[symbolType];\n\n if (!proxySymbol) {\n // Default rect\n symbolType = 'rect';\n proxySymbol = symbolBuildProxies[symbolType];\n }\n\n symbolShapeMakers[symbolType](shape.x, shape.y, shape.width, shape.height, proxySymbol.shape);\n proxySymbol.buildPath(ctx, proxySymbol.shape, inBundle);\n }\n }\n}); // Provide setColor helper method to avoid determine if set the fill or stroke outside\n\nfunction symbolPathSetColor(color, innerColor) {\n if (this.type !== 'image') {\n var symbolStyle = this.style;\n var symbolShape = this.shape;\n\n if (symbolShape && symbolShape.symbolType === 'line') {\n symbolStyle.stroke = color;\n } else if (this.__isEmptyBrush) {\n symbolStyle.stroke = color;\n symbolStyle.fill = innerColor || '#fff';\n } else {\n // FIXME 判断图形默认是填充还是描边,使用 onlyStroke ?\n symbolStyle.fill && (symbolStyle.fill = color);\n symbolStyle.stroke && (symbolStyle.stroke = color);\n }\n\n this.dirty(false);\n }\n}\n/**\n * Create a symbol element with given symbol configuration: shape, x, y, width, height, color\n * @param {string} symbolType\n * @param {number} x\n * @param {number} y\n * @param {number} w\n * @param {number} h\n * @param {string} color\n * @param {boolean} [keepAspect=false] whether to keep the ratio of w/h,\n * for path and image only.\n */\n\n\nfunction createSymbol(symbolType, x, y, w, h, color, keepAspect) {\n // TODO Support image object, DynamicImage.\n var isEmpty = symbolType.indexOf('empty') === 0;\n\n if (isEmpty) {\n symbolType = symbolType.substr(5, 1).toLowerCase() + symbolType.substr(6);\n }\n\n var symbolPath;\n\n if (symbolType.indexOf('image://') === 0) {\n symbolPath = graphic.makeImage(symbolType.slice(8), new BoundingRect(x, y, w, h), keepAspect ? 'center' : 'cover');\n } else if (symbolType.indexOf('path://') === 0) {\n symbolPath = graphic.makePath(symbolType.slice(7), {}, new BoundingRect(x, y, w, h), keepAspect ? 'center' : 'cover');\n } else {\n symbolPath = new SymbolClz({\n shape: {\n symbolType: symbolType,\n x: x,\n y: y,\n width: w,\n height: h\n }\n });\n }\n\n symbolPath.__isEmptyBrush = isEmpty;\n symbolPath.setColor = symbolPathSetColor;\n symbolPath.setColor(color);\n return symbolPath;\n}\n\nexports.createSymbol = createSymbol;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 textContain = require(\"zrender/lib/contain/text\");\n\nvar Axis = require(\"../Axis\");\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();\n\nfunction AngleAxis(scale, angleExtent) {\n angleExtent = angleExtent || [0, 360];\n Axis.call(this, 'angle', scale, angleExtent);\n /**\n * Axis type\n * - 'category'\n * - 'value'\n * - 'time'\n * - 'log'\n * @type {string}\n */\n\n this.type = 'category';\n}\n\nAngleAxis.prototype = {\n constructor: AngleAxis,\n\n /**\n * @override\n */\n pointToData: function (point, clamp) {\n return this.polar.pointToData(point, clamp)[this.dim === 'radius' ? 0 : 1];\n },\n dataToAngle: Axis.prototype.dataToCoord,\n angleToData: Axis.prototype.coordToData,\n\n /**\n * Only be called in category axis.\n * Angle axis uses text height to decide interval\n *\n * @override\n * @return {number} Auto interval for cateogry axis tick and label\n */\n calculateCategoryInterval: function () {\n var axis = this;\n var labelModel = axis.getLabelModel();\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent(); // Providing this method is for optimization:\n // avoid generating a long array by `getTicks`\n // in large category data case.\n\n var tickCount = ordinalScale.count();\n\n if (ordinalExtent[1] - ordinalExtent[0] < 1) {\n return 0;\n }\n\n var tickValue = ordinalExtent[0];\n var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue);\n var unitH = Math.abs(unitSpan); // Not precise, just use height as text width\n // and each distance from axis line yet.\n\n var rect = textContain.getBoundingRect(tickValue, labelModel.getFont(), 'center', 'top');\n var maxH = Math.max(rect.height, 7);\n var dh = maxH / unitH; // 0/0 is NaN, 1/0 is Infinity.\n\n isNaN(dh) && (dh = Infinity);\n var interval = Math.max(0, Math.floor(dh));\n var cache = inner(axis.model);\n var lastAutoInterval = cache.lastAutoInterval;\n var lastTickCount = cache.lastTickCount; // Use cache to keep interval stable while moving zoom window,\n // otherwise the calculated interval might jitter when the zoom\n // window size is close to the interval-changing size.\n\n if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1 // Always choose the bigger one, otherwise the critical\n // point is not the same when zooming in or zooming out.\n && lastAutoInterval > interval) {\n interval = lastAutoInterval;\n } // Only update cache if cache not used, otherwise the\n // changing of interval is too insensitive.\n else {\n cache.lastTickCount = tickCount;\n cache.lastAutoInterval = interval;\n }\n\n return interval;\n }\n};\nzrUtil.inherits(AngleAxis, Axis);\nvar _default = AngleAxis;\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\nrequire(\"../coord/cartesian/AxisModel\");\n\nrequire(\"./axis/CartesianAxisView\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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\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*/\nfunction createGridClipPath(cartesian, hasAnimation, seriesModel) {\n var rect = cartesian.getArea();\n var isHorizontal = cartesian.getBaseAxis().isHorizontal();\n var x = rect.x;\n var y = rect.y;\n var width = rect.width;\n var height = rect.height;\n var lineWidth = seriesModel.get('lineStyle.width') || 2; // Expand the clip path a bit to avoid the border is clipped and looks thinner\n\n x -= lineWidth / 2;\n y -= lineWidth / 2;\n width += lineWidth;\n height += lineWidth; // fix: https://github.com/apache/incubator-echarts/issues/11369\n\n x = Math.floor(x);\n width = Math.round(width);\n var clipPath = new graphic.Rect({\n shape: {\n x: x,\n y: y,\n width: width,\n height: height\n }\n });\n\n if (hasAnimation) {\n clipPath.shape[isHorizontal ? 'width' : 'height'] = 0;\n graphic.initProps(clipPath, {\n shape: {\n width: width,\n height: height\n }\n }, seriesModel);\n }\n\n return clipPath;\n}\n\nfunction createPolarClipPath(polar, hasAnimation, seriesModel) {\n var sectorArea = polar.getArea(); // Avoid float number rounding error for symbol on the edge of axis extent.\n\n var clipPath = new graphic.Sector({\n shape: {\n cx: round(polar.cx, 1),\n cy: round(polar.cy, 1),\n r0: round(sectorArea.r0, 1),\n r: round(sectorArea.r, 1),\n startAngle: sectorArea.startAngle,\n endAngle: sectorArea.endAngle,\n clockwise: sectorArea.clockwise\n }\n });\n\n if (hasAnimation) {\n clipPath.shape.endAngle = sectorArea.startAngle;\n graphic.initProps(clipPath, {\n shape: {\n endAngle: sectorArea.endAngle\n }\n }, seriesModel);\n }\n\n return clipPath;\n}\n\nfunction createClipPath(coordSys, hasAnimation, seriesModel) {\n if (!coordSys) {\n return null;\n } else if (coordSys.type === 'polar') {\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n } else if (coordSys.type === 'cartesian2d') {\n return createGridClipPath(coordSys, hasAnimation, seriesModel);\n }\n\n return null;\n}\n\nexports.createGridClipPath = createGridClipPath;\nexports.createPolarClipPath = createPolarClipPath;\nexports.createClipPath = createClipPath;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\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\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar Group = require(\"zrender/lib/container/Group\");\n\nvar componentUtil = require(\"../util/component\");\n\nvar clazzUtil = require(\"../util/clazz\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 Component = function () {\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n this.group = new Group();\n /**\n * @type {string}\n * @readOnly\n */\n\n this.uid = componentUtil.getUID('viewComponent');\n};\n\nComponent.prototype = {\n constructor: Component,\n init: function (ecModel, api) {},\n render: function (componentModel, ecModel, api, payload) {},\n dispose: function () {},\n\n /**\n * @param {string} eventType\n * @param {Object} query\n * @param {module:zrender/Element} targetEl\n * @param {Object} packedEvent\n * @return {boolen} Pass only when return `true`.\n */\n filterForExposedEvent: null\n};\nvar componentProto = Component.prototype;\n\ncomponentProto.updateView = componentProto.updateLayout = componentProto.updateVisual = function (seriesModel, ecModel, api, payload) {// Do nothing;\n}; // Enable Component.extend.\n\n\nclazzUtil.enableClassExtend(Component); // Enable capability of registerClass, getClass, hasClass, registerSubTypeDefaulter and so on.\n\nclazzUtil.enableClassManagement(Component, {\n registerWhenExtend: true\n});\nvar _default = Component;\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 completeDimensions = require(\"./completeDimensions\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * Substitute `completeDimensions`.\n * `completeDimensions` is to be deprecated.\n */\n\n/**\n * @param {module:echarts/data/Source|module:echarts/data/List} source or data.\n * @param {Object|Array} [opt]\n * @param {Array.} [opt.coordDimensions=[]]\n * @param {number} [opt.dimensionsCount]\n * @param {string} [opt.generateCoord]\n * @param {string} [opt.generateCoordCount]\n * @param {Array.} [opt.dimensionsDefine=source.dimensionsDefine] Overwrite source define.\n * @param {Object|HashMap} [opt.encodeDefine=source.encodeDefine] Overwrite source define.\n * @param {Function} [opt.encodeDefaulter] Make default encode if user not specified.\n * @return {Array.} dimensionsInfo\n */\nfunction _default(source, opt) {\n opt = opt || {};\n return completeDimensions(opt.coordDimensions || [], source, {\n dimsDef: opt.dimensionsDefine || source.dimensionsDefine,\n encodeDef: opt.encodeDefine || source.encodeDefine,\n dimCount: opt.dimensionsCount,\n encodeDefaulter: opt.encodeDefaulter,\n generateCoord: opt.generateCoord,\n generateCoordCount: opt.generateCoordCount\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*/\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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar Model = require(\"../../model/Model\");\n\nvar AxisView = require(\"./AxisView\");\n\nvar AxisBuilder = require(\"./AxisBuilder\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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', 'axisLabel', 'axisTick', 'minorTick', 'splitLine', 'minorSplitLine', 'splitArea'];\n\nfunction getAxisLineShape(polar, rExtent, angle) {\n rExtent[1] > rExtent[0] && (rExtent = rExtent.slice().reverse());\n var start = polar.coordToPoint([rExtent[0], angle]);\n var end = polar.coordToPoint([rExtent[1], angle]);\n return {\n x1: start[0],\n y1: start[1],\n x2: end[0],\n y2: end[1]\n };\n}\n\nfunction getRadiusIdx(polar) {\n var radiusAxis = polar.getRadiusAxis();\n return radiusAxis.inverse ? 0 : 1;\n} // Remove the last tick which will overlap the first tick\n\n\nfunction fixAngleOverlap(list) {\n var firstItem = list[0];\n var lastItem = list[list.length - 1];\n\n if (firstItem && lastItem && Math.abs(Math.abs(firstItem.coord - lastItem.coord) - 360) < 1e-4) {\n list.pop();\n }\n}\n\nvar _default = AxisView.extend({\n type: 'angleAxis',\n axisPointerClass: 'PolarAxisPointer',\n render: function (angleAxisModel, ecModel) {\n this.group.removeAll();\n\n if (!angleAxisModel.get('show')) {\n return;\n }\n\n var angleAxis = angleAxisModel.axis;\n var polar = angleAxis.polar;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var ticksAngles = angleAxis.getTicksCoords();\n var minorTickAngles = angleAxis.getMinorTicksCoords();\n var labels = zrUtil.map(angleAxis.getViewLabels(), function (labelItem) {\n var labelItem = zrUtil.clone(labelItem);\n labelItem.coord = angleAxis.dataToCoord(labelItem.tickValue);\n return labelItem;\n });\n fixAngleOverlap(labels);\n fixAngleOverlap(ticksAngles);\n zrUtil.each(elementList, function (name) {\n if (angleAxisModel.get(name + '.show') && (!angleAxis.scale.isBlank() || name === 'axisLine')) {\n this['_' + name](angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels);\n }\n }, this);\n },\n\n /**\n * @private\n */\n _axisLine: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var lineStyleModel = angleAxisModel.getModel('axisLine.lineStyle'); // extent id of the axis radius (r0 and r)\n\n var rId = getRadiusIdx(polar);\n var r0Id = rId ? 0 : 1;\n var shape;\n\n if (radiusExtent[r0Id] === 0) {\n shape = new graphic.Circle({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: radiusExtent[rId]\n },\n style: lineStyleModel.getLineStyle(),\n z2: 1,\n silent: true\n });\n } else {\n shape = new graphic.Ring({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: radiusExtent[rId],\n r0: radiusExtent[r0Id]\n },\n style: lineStyleModel.getLineStyle(),\n z2: 1,\n silent: true\n });\n }\n\n shape.style.fill = null;\n this.group.add(shape);\n },\n\n /**\n * @private\n */\n _axisTick: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var tickModel = angleAxisModel.getModel('axisTick');\n var tickLen = (tickModel.get('inside') ? -1 : 1) * tickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n var lines = zrUtil.map(ticksAngles, function (tickAngleItem) {\n return new graphic.Line({\n shape: getAxisLineShape(polar, [radius, radius + tickLen], tickAngleItem.coord)\n });\n });\n this.group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults(tickModel.getModel('lineStyle').getLineStyle(), {\n stroke: angleAxisModel.get('axisLine.lineStyle.color')\n })\n }));\n },\n\n /**\n * @private\n */\n _minorTick: function (angleAxisModel, polar, tickAngles, minorTickAngles, radiusExtent) {\n if (!minorTickAngles.length) {\n return;\n }\n\n var tickModel = angleAxisModel.getModel('axisTick');\n var minorTickModel = angleAxisModel.getModel('minorTick');\n var tickLen = (tickModel.get('inside') ? -1 : 1) * minorTickModel.get('length');\n var radius = radiusExtent[getRadiusIdx(polar)];\n var lines = [];\n\n for (var i = 0; i < minorTickAngles.length; i++) {\n for (var k = 0; k < minorTickAngles[i].length; k++) {\n lines.push(new graphic.Line({\n shape: getAxisLineShape(polar, [radius, radius + tickLen], minorTickAngles[i][k].coord)\n }));\n }\n }\n\n this.group.add(graphic.mergePath(lines, {\n style: zrUtil.defaults(minorTickModel.getModel('lineStyle').getLineStyle(), zrUtil.defaults(tickModel.getLineStyle(), {\n stroke: angleAxisModel.get('axisLine.lineStyle.color')\n }))\n }));\n },\n\n /**\n * @private\n */\n _axisLabel: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent, labels) {\n var rawCategoryData = angleAxisModel.getCategories(true);\n var commonLabelModel = angleAxisModel.getModel('axisLabel');\n var labelMargin = commonLabelModel.get('margin');\n var triggerEvent = angleAxisModel.get('triggerEvent'); // Use length of ticksAngles because it may remove the last tick to avoid overlapping\n\n zrUtil.each(labels, function (labelItem, idx) {\n var labelModel = commonLabelModel;\n var tickValue = labelItem.tickValue;\n var r = radiusExtent[getRadiusIdx(polar)];\n var p = polar.coordToPoint([r + labelMargin, labelItem.coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n var labelTextAlign = Math.abs(p[0] - cx) / r < 0.3 ? 'center' : p[0] > cx ? 'left' : 'right';\n var labelTextVerticalAlign = Math.abs(p[1] - cy) / r < 0.3 ? 'middle' : p[1] > cy ? 'top' : 'bottom';\n\n if (rawCategoryData && rawCategoryData[tickValue] && rawCategoryData[tickValue].textStyle) {\n labelModel = new Model(rawCategoryData[tickValue].textStyle, commonLabelModel, commonLabelModel.ecModel);\n }\n\n var textEl = new graphic.Text({\n silent: AxisBuilder.isLabelSilent(angleAxisModel)\n });\n this.group.add(textEl);\n graphic.setTextStyle(textEl.style, labelModel, {\n x: p[0],\n y: p[1],\n textFill: labelModel.getTextColor() || angleAxisModel.get('axisLine.lineStyle.color'),\n text: labelItem.formattedLabel,\n textAlign: labelTextAlign,\n textVerticalAlign: labelTextVerticalAlign\n }); // Pack data for mouse event\n\n if (triggerEvent) {\n textEl.eventData = AxisBuilder.makeAxisEventDataBase(angleAxisModel);\n textEl.eventData.targetType = 'axisLabel';\n textEl.eventData.value = labelItem.rawLabel;\n }\n }, this);\n },\n\n /**\n * @private\n */\n _splitLine: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n var splitLineModel = angleAxisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n var lineCount = 0;\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var splitLines = [];\n\n for (var i = 0; i < ticksAngles.length; i++) {\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic.Line({\n shape: getAxisLineShape(polar, radiusExtent, ticksAngles[i].coord)\n }));\n } // Simple optimization\n // Batching the lines if color are the same\n\n\n for (var i = 0; i < splitLines.length; i++) {\n this.group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length]\n }, lineStyleModel.getLineStyle()),\n silent: true,\n z: angleAxisModel.get('z')\n }));\n }\n },\n\n /**\n * @private\n */\n _minorSplitLine: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n if (!minorTickAngles.length) {\n return;\n }\n\n var minorSplitLineModel = angleAxisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var lines = [];\n\n for (var i = 0; i < minorTickAngles.length; i++) {\n for (var k = 0; k < minorTickAngles[i].length; k++) {\n lines.push(new graphic.Line({\n shape: getAxisLineShape(polar, radiusExtent, minorTickAngles[i][k].coord)\n }));\n }\n }\n\n this.group.add(graphic.mergePath(lines, {\n style: lineStyleModel.getLineStyle(),\n silent: true,\n z: angleAxisModel.get('z')\n }));\n },\n\n /**\n * @private\n */\n _splitArea: function (angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) {\n if (!ticksAngles.length) {\n return;\n }\n\n var splitAreaModel = angleAxisModel.getModel('splitArea');\n var areaStyleModel = splitAreaModel.getModel('areaStyle');\n var areaColors = areaStyleModel.get('color');\n var lineCount = 0;\n areaColors = areaColors instanceof Array ? areaColors : [areaColors];\n var splitAreas = [];\n var RADIAN = Math.PI / 180;\n var prevAngle = -ticksAngles[0].coord * RADIAN;\n var r0 = Math.min(radiusExtent[0], radiusExtent[1]);\n var r1 = Math.max(radiusExtent[0], radiusExtent[1]);\n var clockwise = angleAxisModel.get('clockwise');\n\n for (var i = 1; i < ticksAngles.length; i++) {\n var colorIndex = lineCount++ % areaColors.length;\n splitAreas[colorIndex] = splitAreas[colorIndex] || [];\n splitAreas[colorIndex].push(new graphic.Sector({\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r0: r0,\n r: r1,\n startAngle: prevAngle,\n endAngle: -ticksAngles[i].coord * RADIAN,\n clockwise: clockwise\n },\n silent: true\n }));\n prevAngle = -ticksAngles[i].coord * RADIAN;\n } // Simple optimization\n // Batching the lines if color are the same\n\n\n for (var i = 0; i < splitAreas.length; i++) {\n this.group.add(graphic.mergePath(splitAreas[i], {\n style: zrUtil.defaults({\n fill: areaColors[i % areaColors.length]\n }, areaStyleModel.getAreaStyle()),\n silent: 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 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 zrender = require(\"zrender/lib/zrender\");\n\nexports.zrender = zrender;\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nexports.matrix = matrix;\n\nvar vector = require(\"zrender/lib/core/vector\");\n\nexports.vector = vector;\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar colorTool = require(\"zrender/lib/tool/color\");\n\nexports.color = colorTool;\n\nvar graphicUtil = require(\"./util/graphic\");\n\nvar numberUtil = require(\"./util/number\");\n\nexports.number = numberUtil;\n\nvar formatUtil = require(\"./util/format\");\n\nexports.format = formatUtil;\n\nvar _throttle = require(\"./util/throttle\");\n\nvar throttle = _throttle.throttle;\nexports.throttle = _throttle.throttle;\n\nvar ecHelper = require(\"./helper\");\n\nexports.helper = ecHelper;\n\nvar parseGeoJSON = require(\"./coord/geo/parseGeoJson\");\n\nexports.parseGeoJSON = parseGeoJSON;\n\nvar _List = require(\"./data/List\");\n\nexports.List = _List;\n\nvar _Model = require(\"./model/Model\");\n\nexports.Model = _Model;\n\nvar _Axis = require(\"./coord/Axis\");\n\nexports.Axis = _Axis;\n\nvar _env = require(\"zrender/lib/core/env\");\n\nexports.env = _env;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * Do not mount those modules on 'src/echarts' for better tree shaking.\n */\nvar parseGeoJson = parseGeoJSON;\nvar ecUtil = {};\nzrUtil.each(['map', 'each', 'filter', 'indexOf', 'inherits', 'reduce', 'filter', 'bind', 'curry', 'isArray', 'isString', 'isObject', 'isFunction', 'extend', 'defaults', 'clone', 'merge'], function (name) {\n ecUtil[name] = zrUtil[name];\n});\nvar graphic = {};\nzrUtil.each(['extendShape', 'extendPath', 'makePath', 'makeImage', 'mergePath', 'resizePath', 'createIcon', 'setHoverStyle', 'setLabelStyle', 'setTextStyle', 'setText', 'getFont', 'updateProps', 'initProps', 'getTransform', 'clipPointsByRect', 'clipRectByRect', 'registerShape', 'getShapeClass', 'Group', 'Image', 'Text', 'Circle', 'Sector', 'Ring', 'Polygon', 'Polyline', 'Rect', 'Line', 'BezierCurve', 'Arc', 'IncrementalDisplayable', 'CompoundPath', 'LinearGradient', 'RadialGradient', 'BoundingRect'], function (name) {\n graphic[name] = graphicUtil[name];\n});\nexports.parseGeoJson = parseGeoJson;\nexports.util = ecUtil;\nexports.graphic = graphic;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 lang = require(\"../lang\");\n\nvar _dataProvider = require(\"../data/helper/dataProvider\");\n\nvar retrieveRawValue = _dataProvider.retrieveRawValue;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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(dom, ecModel) {\n var ariaModel = ecModel.getModel('aria');\n\n if (!ariaModel.get('show')) {\n return;\n } else if (ariaModel.get('description')) {\n dom.setAttribute('aria-label', ariaModel.get('description'));\n return;\n }\n\n var seriesCnt = 0;\n ecModel.eachSeries(function (seriesModel, idx) {\n ++seriesCnt;\n }, this);\n var maxDataCnt = ariaModel.get('data.maxCount') || 10;\n var maxSeriesCnt = ariaModel.get('series.maxCount') || 10;\n var displaySeriesCnt = Math.min(seriesCnt, maxSeriesCnt);\n var ariaLabel;\n\n if (seriesCnt < 1) {\n // No series, no aria label\n return;\n } else {\n var title = getTitle();\n\n if (title) {\n ariaLabel = replace(getConfig('general.withTitle'), {\n title: title\n });\n } else {\n ariaLabel = getConfig('general.withoutTitle');\n }\n\n var seriesLabels = [];\n var prefix = seriesCnt > 1 ? 'series.multiple.prefix' : 'series.single.prefix';\n ariaLabel += replace(getConfig(prefix), {\n seriesCount: seriesCnt\n });\n ecModel.eachSeries(function (seriesModel, idx) {\n if (idx < displaySeriesCnt) {\n var seriesLabel;\n var seriesName = seriesModel.get('name');\n var seriesTpl = 'series.' + (seriesCnt > 1 ? 'multiple' : 'single') + '.';\n seriesLabel = getConfig(seriesName ? seriesTpl + 'withName' : seriesTpl + 'withoutName');\n seriesLabel = replace(seriesLabel, {\n seriesId: seriesModel.seriesIndex,\n seriesName: seriesModel.get('name'),\n seriesType: getSeriesTypeName(seriesModel.subType)\n });\n var data = seriesModel.getData();\n window.data = data;\n\n if (data.count() > maxDataCnt) {\n // Show part of data\n seriesLabel += replace(getConfig('data.partialData'), {\n displayCnt: maxDataCnt\n });\n } else {\n seriesLabel += getConfig('data.allData');\n }\n\n var dataLabels = [];\n\n for (var i = 0; i < data.count(); i++) {\n if (i < maxDataCnt) {\n var name = data.getName(i);\n var value = retrieveRawValue(data, i);\n dataLabels.push(replace(name ? getConfig('data.withName') : getConfig('data.withoutName'), {\n name: name,\n value: value\n }));\n }\n }\n\n seriesLabel += dataLabels.join(getConfig('data.separator.middle')) + getConfig('data.separator.end');\n seriesLabels.push(seriesLabel);\n }\n });\n ariaLabel += seriesLabels.join(getConfig('series.multiple.separator.middle')) + getConfig('series.multiple.separator.end');\n dom.setAttribute('aria-label', ariaLabel);\n }\n\n function replace(str, keyValues) {\n if (typeof str !== 'string') {\n return str;\n }\n\n var result = str;\n zrUtil.each(keyValues, function (value, key) {\n result = result.replace(new RegExp('\\\\{\\\\s*' + key + '\\\\s*\\\\}', 'g'), value);\n });\n return result;\n }\n\n function getConfig(path) {\n var userConfig = ariaModel.get(path);\n\n if (userConfig == null) {\n var pathArr = path.split('.');\n var result = lang.aria;\n\n for (var i = 0; i < pathArr.length; ++i) {\n result = result[pathArr[i]];\n }\n\n return result;\n } else {\n return userConfig;\n }\n }\n\n function getTitle() {\n var title = ecModel.getModel('title').option;\n\n if (title && title.length) {\n title = title[0];\n }\n\n return title && title.text;\n }\n\n function getSeriesTypeName(type) {\n return lang.series.typeNames[type] || '自定义图';\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 * 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});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 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\n/**\n * Parse and decode geo json\n * @module echarts/coord/geo/parseGeoJson\n */\nfunction decode(json) {\n if (!json.UTF8Encoding) {\n return json;\n }\n\n var encodeScale = json.UTF8Scale;\n\n if (encodeScale == null) {\n encodeScale = 1024;\n }\n\n var features = json.features;\n\n for (var f = 0; f < features.length; f++) {\n var feature = features[f];\n var geometry = feature.geometry;\n var coordinates = geometry.coordinates;\n var encodeOffsets = geometry.encodeOffsets;\n\n for (var c = 0; c < coordinates.length; c++) {\n var coordinate = coordinates[c];\n\n if (geometry.type === 'Polygon') {\n coordinates[c] = decodePolygon(coordinate, encodeOffsets[c], encodeScale);\n } else if (geometry.type === 'MultiPolygon') {\n for (var c2 = 0; c2 < coordinate.length; c2++) {\n var polygon = coordinate[c2];\n coordinate[c2] = decodePolygon(polygon, encodeOffsets[c][c2], encodeScale);\n }\n }\n }\n } // Has been decoded\n\n\n json.UTF8Encoding = false;\n return json;\n}\n\nfunction decodePolygon(coordinate, encodeOffsets, encodeScale) {\n var result = [];\n var prevX = encodeOffsets[0];\n var prevY = encodeOffsets[1];\n\n for (var i = 0; i < coordinate.length; i += 2) {\n var x = coordinate.charCodeAt(i) - 64;\n var y = coordinate.charCodeAt(i + 1) - 64; // ZigZag decoding\n\n x = x >> 1 ^ -(x & 1);\n y = y >> 1 ^ -(y & 1); // Delta deocding\n\n x += prevX;\n y += prevY;\n prevX = x;\n prevY = y; // Dequantize\n\n result.push([x / encodeScale, y / encodeScale]);\n }\n\n return result;\n}\n/**\n * @alias module:echarts/coord/geo/parseGeoJson\n * @param {Object} geoJson\n * @param {string} nameProperty\n * @return {module:zrender/container/Group}\n */\n\n\nfunction _default(geoJson, nameProperty) {\n decode(geoJson);\n return zrUtil.map(zrUtil.filter(geoJson.features, function (featureObj) {\n // Output of mapshaper may have geometry null\n return featureObj.geometry && featureObj.properties && featureObj.geometry.coordinates.length > 0;\n }), function (featureObj) {\n var properties = featureObj.properties;\n var geo = featureObj.geometry;\n var coordinates = geo.coordinates;\n var geometries = [];\n\n if (geo.type === 'Polygon') {\n geometries.push({\n type: 'polygon',\n // According to the GeoJSON specification.\n // First must be exterior, and the rest are all interior(holes).\n exterior: coordinates[0],\n interiors: coordinates.slice(1)\n });\n }\n\n if (geo.type === 'MultiPolygon') {\n zrUtil.each(coordinates, function (item) {\n if (item[0]) {\n geometries.push({\n type: 'polygon',\n exterior: item[0],\n interiors: item.slice(1)\n });\n }\n });\n }\n\n var region = new Region(properties[nameProperty || 'name'], geometries, properties.cp);\n region.properties = properties;\n return region;\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(\"../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\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 colorAll = ['#37A2DA', '#32C5E9', '#67E0E3', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#E062AE', '#E690D1', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF'];\nvar _default = {\n color: colorAll,\n colorLayer: [['#37A2DA', '#ffd85c', '#fd7b5f'], ['#37A2DA', '#67E0E3', '#FFDB5C', '#ff9f7f', '#E062AE', '#9d96f5'], ['#37A2DA', '#32C5E9', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#e7bcf3', '#8378EA', '#96BFFF'], colorAll]\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 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 _dataProvider = require(\"../../data/helper/dataProvider\");\n\nvar retrieveRawValue = _dataProvider.retrieveRawValue;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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/data/List} data\n * @param {number} dataIndex\n * @return {string} label string. Not null/undefined\n */\nfunction getDefaultLabel(data, dataIndex) {\n var labelDims = data.mapDimension('defaultedLabel', true);\n var len = labelDims.length; // Simple optimization (in lots of cases, label dims length is 1)\n\n if (len === 1) {\n return retrieveRawValue(data, dataIndex, labelDims[0]);\n } else if (len) {\n var vals = [];\n\n for (var i = 0; i < labelDims.length; i++) {\n var val = retrieveRawValue(data, dataIndex, labelDims[i]);\n vals.push(val);\n }\n\n return vals.join(' ');\n }\n}\n\nexports.getDefaultLabel = getDefaultLabel;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar modelUtil = require(\"../util/model\");\n\nvar ComponentModel = require(\"./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\n/**\n * ECharts option manager\n *\n * @module {echarts/model/OptionManager}\n */\nvar each = zrUtil.each;\nvar clone = zrUtil.clone;\nvar map = zrUtil.map;\nvar merge = zrUtil.merge;\nvar QUERY_REG = /^(min|max)?(.+)$/;\n/**\n * TERM EXPLANATIONS:\n *\n * [option]:\n *\n * An object that contains definitions of components. For example:\n * var option = {\n * title: {...},\n * legend: {...},\n * visualMap: {...},\n * series: [\n * {data: [...]},\n * {data: [...]},\n * ...\n * ]\n * };\n *\n * [rawOption]:\n *\n * An object input to echarts.setOption. 'rawOption' may be an\n * 'option', or may be an object contains multi-options. For example:\n * var option = {\n * baseOption: {\n * title: {...},\n * legend: {...},\n * series: [\n * {data: [...]},\n * {data: [...]},\n * ...\n * ]\n * },\n * timeline: {...},\n * options: [\n * {title: {...}, series: {data: [...]}},\n * {title: {...}, series: {data: [...]}},\n * ...\n * ],\n * media: [\n * {\n * query: {maxWidth: 320},\n * option: {series: {x: 20}, visualMap: {show: false}}\n * },\n * {\n * query: {minWidth: 320, maxWidth: 720},\n * option: {series: {x: 500}, visualMap: {show: true}}\n * },\n * {\n * option: {series: {x: 1200}, visualMap: {show: true}}\n * }\n * ]\n * };\n *\n * @alias module:echarts/model/OptionManager\n * @param {module:echarts/ExtensionAPI} api\n */\n\nfunction OptionManager(api) {\n /**\n * @private\n * @type {module:echarts/ExtensionAPI}\n */\n this._api = api;\n /**\n * @private\n * @type {Array.}\n */\n\n this._timelineOptions = [];\n /**\n * @private\n * @type {Array.}\n */\n\n this._mediaList = [];\n /**\n * @private\n * @type {Object}\n */\n\n this._mediaDefault;\n /**\n * -1, means default.\n * empty means no media.\n * @private\n * @type {Array.}\n */\n\n this._currentMediaIndices = [];\n /**\n * @private\n * @type {Object}\n */\n\n this._optionBackup;\n /**\n * @private\n * @type {Object}\n */\n\n this._newBaseOption;\n} // timeline.notMerge is not supported in ec3. Firstly there is rearly\n// case that notMerge is needed. Secondly supporting 'notMerge' requires\n// rawOption cloned and backuped when timeline changed, which does no\n// good to performance. What's more, that both timeline and setOption\n// method supply 'notMerge' brings complex and some problems.\n// Consider this case:\n// (step1) chart.setOption({timeline: {notMerge: false}, ...}, false);\n// (step2) chart.setOption({timeline: {notMerge: true}, ...}, false);\n\n\nOptionManager.prototype = {\n constructor: OptionManager,\n\n /**\n * @public\n * @param {Object} rawOption Raw option.\n * @param {module:echarts/model/Global} ecModel\n * @param {Array.} optionPreprocessorFuncs\n * @return {Object} Init option\n */\n setOption: function (rawOption, optionPreprocessorFuncs) {\n if (rawOption) {\n // That set dat primitive is dangerous if user reuse the data when setOption again.\n zrUtil.each(modelUtil.normalizeToArray(rawOption.series), function (series) {\n series && series.data && zrUtil.isTypedArray(series.data) && zrUtil.setAsPrimitive(series.data);\n });\n } // Caution: some series modify option data, if do not clone,\n // it should ensure that the repeat modify correctly\n // (create a new object when modify itself).\n\n\n rawOption = clone(rawOption); // FIXME\n // 如果 timeline options 或者 media 中设置了某个属性,而baseOption中没有设置,则进行警告。\n\n var oldOptionBackup = this._optionBackup;\n var newParsedOption = parseRawOption.call(this, rawOption, optionPreprocessorFuncs, !oldOptionBackup);\n this._newBaseOption = newParsedOption.baseOption; // For setOption at second time (using merge mode);\n\n if (oldOptionBackup) {\n // Only baseOption can be merged.\n mergeOption(oldOptionBackup.baseOption, newParsedOption.baseOption); // For simplicity, timeline options and media options do not support merge,\n // that is, if you `setOption` twice and both has timeline options, the latter\n // timeline opitons will not be merged to the formers, but just substitude them.\n\n if (newParsedOption.timelineOptions.length) {\n oldOptionBackup.timelineOptions = newParsedOption.timelineOptions;\n }\n\n if (newParsedOption.mediaList.length) {\n oldOptionBackup.mediaList = newParsedOption.mediaList;\n }\n\n if (newParsedOption.mediaDefault) {\n oldOptionBackup.mediaDefault = newParsedOption.mediaDefault;\n }\n } else {\n this._optionBackup = newParsedOption;\n }\n },\n\n /**\n * @param {boolean} isRecreate\n * @return {Object}\n */\n mountOption: function (isRecreate) {\n var optionBackup = this._optionBackup; // TODO\n // 如果没有reset功能则不clone。\n\n this._timelineOptions = map(optionBackup.timelineOptions, clone);\n this._mediaList = map(optionBackup.mediaList, clone);\n this._mediaDefault = clone(optionBackup.mediaDefault);\n this._currentMediaIndices = [];\n return clone(isRecreate // this._optionBackup.baseOption, which is created at the first `setOption`\n // called, and is merged into every new option by inner method `mergeOption`\n // each time `setOption` called, can be only used in `isRecreate`, because\n // its reliability is under suspicion. In other cases option merge is\n // performed by `model.mergeOption`.\n ? optionBackup.baseOption : this._newBaseOption);\n },\n\n /**\n * @param {module:echarts/model/Global} ecModel\n * @return {Object}\n */\n getTimelineOption: function (ecModel) {\n var option;\n var timelineOptions = this._timelineOptions;\n\n if (timelineOptions.length) {\n // getTimelineOption can only be called after ecModel inited,\n // so we can get currentIndex from timelineModel.\n var timelineModel = ecModel.getComponent('timeline');\n\n if (timelineModel) {\n option = clone(timelineOptions[timelineModel.getCurrentIndex()], true);\n }\n }\n\n return option;\n },\n\n /**\n * @param {module:echarts/model/Global} ecModel\n * @return {Array.}\n */\n getMediaOption: function (ecModel) {\n var ecWidth = this._api.getWidth();\n\n var ecHeight = this._api.getHeight();\n\n var mediaList = this._mediaList;\n var mediaDefault = this._mediaDefault;\n var indices = [];\n var result = []; // No media defined.\n\n if (!mediaList.length && !mediaDefault) {\n return result;\n } // Multi media may be applied, the latter defined media has higher priority.\n\n\n for (var i = 0, len = mediaList.length; i < len; i++) {\n if (applyMediaQuery(mediaList[i].query, ecWidth, ecHeight)) {\n indices.push(i);\n }\n } // FIXME\n // 是否mediaDefault应该强制用户设置,否则可能修改不能回归。\n\n\n if (!indices.length && mediaDefault) {\n indices = [-1];\n }\n\n if (indices.length && !indicesEquals(indices, this._currentMediaIndices)) {\n result = map(indices, function (index) {\n return clone(index === -1 ? mediaDefault.option : mediaList[index].option);\n });\n } // Otherwise return nothing.\n\n\n this._currentMediaIndices = indices;\n return result;\n }\n};\n\nfunction parseRawOption(rawOption, optionPreprocessorFuncs, isNew) {\n var timelineOptions = [];\n var mediaList = [];\n var mediaDefault;\n var baseOption; // Compatible with ec2.\n\n var timelineOpt = rawOption.timeline;\n\n if (rawOption.baseOption) {\n baseOption = rawOption.baseOption;\n } // For timeline\n\n\n if (timelineOpt || rawOption.options) {\n baseOption = baseOption || {};\n timelineOptions = (rawOption.options || []).slice();\n } // For media query\n\n\n if (rawOption.media) {\n baseOption = baseOption || {};\n var media = rawOption.media;\n each(media, function (singleMedia) {\n if (singleMedia && singleMedia.option) {\n if (singleMedia.query) {\n mediaList.push(singleMedia);\n } else if (!mediaDefault) {\n // Use the first media default.\n mediaDefault = singleMedia;\n }\n }\n });\n } // For normal option\n\n\n if (!baseOption) {\n baseOption = rawOption;\n } // Set timelineOpt to baseOption in ec3,\n // which is convenient for merge option.\n\n\n if (!baseOption.timeline) {\n baseOption.timeline = timelineOpt;\n } // Preprocess.\n\n\n each([baseOption].concat(timelineOptions).concat(zrUtil.map(mediaList, function (media) {\n return media.option;\n })), function (option) {\n each(optionPreprocessorFuncs, function (preProcess) {\n preProcess(option, isNew);\n });\n });\n return {\n baseOption: baseOption,\n timelineOptions: timelineOptions,\n mediaDefault: mediaDefault,\n mediaList: mediaList\n };\n}\n/**\n * @see \n * Support: width, height, aspectRatio\n * Can use max or min as prefix.\n */\n\n\nfunction applyMediaQuery(query, ecWidth, ecHeight) {\n var realMap = {\n width: ecWidth,\n height: ecHeight,\n aspectratio: ecWidth / ecHeight // lowser case for convenientce.\n\n };\n var applicatable = true;\n zrUtil.each(query, function (value, attr) {\n var matched = attr.match(QUERY_REG);\n\n if (!matched || !matched[1] || !matched[2]) {\n return;\n }\n\n var operator = matched[1];\n var realAttr = matched[2].toLowerCase();\n\n if (!compare(realMap[realAttr], value, operator)) {\n applicatable = false;\n }\n });\n return applicatable;\n}\n\nfunction compare(real, expect, operator) {\n if (operator === 'min') {\n return real >= expect;\n } else if (operator === 'max') {\n return real <= expect;\n } else {\n // Equals\n return real === expect;\n }\n}\n\nfunction indicesEquals(indices1, indices2) {\n // indices is always order by asc and has only finite number.\n return indices1.join(',') === indices2.join(',');\n}\n/**\n * Consider case:\n * `chart.setOption(opt1);`\n * Then user do some interaction like dataZoom, dataView changing.\n * `chart.setOption(opt2);`\n * Then user press 'reset button' in toolbox.\n *\n * After doing that all of the interaction effects should be reset, the\n * chart should be the same as the result of invoke\n * `chart.setOption(opt1); chart.setOption(opt2);`.\n *\n * Although it is not able ensure that\n * `chart.setOption(opt1); chart.setOption(opt2);` is equivalents to\n * `chart.setOption(merge(opt1, opt2));` exactly,\n * this might be the only simple way to implement that feature.\n *\n * MEMO: We've considered some other approaches:\n * 1. Each model handle its self restoration but not uniform treatment.\n * (Too complex in logic and error-prone)\n * 2. Use a shadow ecModel. (Performace expensive)\n */\n\n\nfunction mergeOption(oldOption, newOption) {\n newOption = newOption || {};\n each(newOption, function (newCptOpt, mainType) {\n if (newCptOpt == null) {\n return;\n }\n\n var oldCptOpt = oldOption[mainType];\n\n if (!ComponentModel.hasClass(mainType)) {\n oldOption[mainType] = merge(oldCptOpt, newCptOpt, true);\n } else {\n newCptOpt = modelUtil.normalizeToArray(newCptOpt);\n oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);\n var mapResult = modelUtil.mappingToExists(oldCptOpt, newCptOpt);\n oldOption[mainType] = map(mapResult, function (item) {\n return item.option && item.exist ? merge(item.exist, item.option, true) : item.exist || item.option;\n });\n }\n });\n}\n\nvar _default = OptionManager;\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 echarts = require(\"../echarts\");\n\nvar zrUtil = require(\"zrender/lib/core/util\");\n\nvar axisPointerModelHelper = require(\"./axisPointer/modelHelper\");\n\nvar axisTrigger = require(\"./axisPointer/axisTrigger\");\n\nrequire(\"./axisPointer/AxisPointerModel\");\n\nrequire(\"./axisPointer/AxisPointerView\");\n\nrequire(\"./axisPointer/CartesianAxisPointer\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// CartesianAxisPointer is not supposed to be required here. But consider\n// echarts.simple.js and online build tooltip, which only require gridSimple,\n// CartesianAxisPointer should be able to required somewhere.\necharts.registerPreprocessor(function (option) {\n // Always has a global axisPointerModel for default setting.\n if (option) {\n (!option.axisPointer || option.axisPointer.length === 0) && (option.axisPointer = {});\n var link = option.axisPointer.link; // Normalize to array to avoid object mergin. But if link\n // is not set, remain null/undefined, otherwise it will\n // override existent link setting.\n\n if (link && !zrUtil.isArray(link)) {\n option.axisPointer.link = [link];\n }\n }\n}); // This process should proformed after coordinate systems created\n// and series data processed. So put it on statistic processing stage.\n\necharts.registerProcessor(echarts.PRIORITY.PROCESSOR.STATISTIC, function (ecModel, api) {\n // Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n // allAxesInfo should be updated when setOption performed.\n ecModel.getComponent('axisPointer').coordSysAxesInfo = axisPointerModelHelper.collect(ecModel, api);\n}); // Broadcast to all views.\n\necharts.registerAction({\n type: 'updateAxisPointer',\n event: 'updateAxisPointer',\n update: ':updateAxisPointer'\n}, axisTrigger);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar Cartesian = require(\"./Cartesian\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 Cartesian2D(name) {\n Cartesian.call(this, name);\n}\n\nCartesian2D.prototype = {\n constructor: Cartesian2D,\n type: 'cartesian2d',\n\n /**\n * @type {Array.}\n * @readOnly\n */\n dimensions: ['x', 'y'],\n\n /**\n * Base axis will be used on stacking.\n *\n * @return {module:echarts/coord/cartesian/Axis2D}\n */\n getBaseAxis: function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAxis('x');\n },\n\n /**\n * If contain point\n * @param {Array.} point\n * @return {boolean}\n */\n containPoint: function (point) {\n var axisX = this.getAxis('x');\n var axisY = this.getAxis('y');\n return axisX.contain(axisX.toLocalCoord(point[0])) && axisY.contain(axisY.toLocalCoord(point[1]));\n },\n\n /**\n * If contain data\n * @param {Array.} data\n * @return {boolean}\n */\n containData: function (data) {\n return this.getAxis('x').containData(data[0]) && this.getAxis('y').containData(data[1]);\n },\n\n /**\n * @param {Array.} data\n * @param {Array.} out\n * @return {Array.}\n */\n dataToPoint: function (data, reserved, out) {\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out = out || [];\n out[0] = xAxis.toGlobalCoord(xAxis.dataToCoord(data[0]));\n out[1] = yAxis.toGlobalCoord(yAxis.dataToCoord(data[1]));\n return out;\n },\n\n /**\n * @param {Array.} data\n * @param {Array.} out\n * @return {Array.}\n */\n clampData: function (data, out) {\n var xScale = this.getAxis('x').scale;\n var yScale = this.getAxis('y').scale;\n var xAxisExtent = xScale.getExtent();\n var yAxisExtent = yScale.getExtent();\n var x = xScale.parse(data[0]);\n var y = yScale.parse(data[1]);\n out = out || [];\n out[0] = Math.min(Math.max(Math.min(xAxisExtent[0], xAxisExtent[1]), x), Math.max(xAxisExtent[0], xAxisExtent[1]));\n out[1] = Math.min(Math.max(Math.min(yAxisExtent[0], yAxisExtent[1]), y), Math.max(yAxisExtent[0], yAxisExtent[1]));\n return out;\n },\n\n /**\n * @param {Array.} point\n * @param {Array.} out\n * @return {Array.}\n */\n pointToData: function (point, out) {\n var xAxis = this.getAxis('x');\n var yAxis = this.getAxis('y');\n out = out || [];\n out[0] = xAxis.coordToData(xAxis.toLocalCoord(point[0]));\n out[1] = yAxis.coordToData(yAxis.toLocalCoord(point[1]));\n return out;\n },\n\n /**\n * Get other axis\n * @param {module:echarts/coord/cartesian/Axis2D} axis\n */\n getOtherAxis: function (axis) {\n return this.getAxis(axis.dim === 'x' ? 'y' : 'x');\n },\n\n /**\n * Get rect area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n * @return {BoundingRect}\n */\n getArea: function () {\n var xExtent = this.getAxis('x').getGlobalExtent();\n var yExtent = this.getAxis('y').getGlobalExtent();\n var x = Math.min(xExtent[0], xExtent[1]);\n var y = Math.min(yExtent[0], yExtent[1]);\n var width = Math.max(xExtent[0], xExtent[1]) - x;\n var height = Math.max(yExtent[0], yExtent[1]) - y;\n var rect = new BoundingRect(x, y, width, height);\n return rect;\n }\n};\nzrUtil.inherits(Cartesian2D, Cartesian);\nvar _default = Cartesian2D;\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 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\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*/\n\n/**\n * @return {string} If large mode changed, return string 'reset';\n */\nfunction _default() {\n var inner = makeInner();\n return function (seriesModel) {\n var fields = inner(seriesModel);\n var pipelineContext = seriesModel.pipelineContext;\n var originalLarge = fields.large;\n var originalProgressive = fields.progressiveRender; // FIXME: if the planner works on a filtered series, `pipelineContext` does not\n // exists. See #11611 . Probably we need to modify this structure, see the comment\n // on `performRawSeries` in `Schedular.js`.\n\n var large = fields.large = pipelineContext && pipelineContext.large;\n var progressive = fields.progressiveRender = pipelineContext && pipelineContext.progressiveRender;\n return !!(originalLarge ^ large || originalProgressive ^ progressive) && 'reset';\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(\"./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\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 each = zrUtil.each;\nvar curry = zrUtil.curry; // Build axisPointerModel, mergin tooltip.axisPointer model for each axis.\n// allAxesInfo should be updated when setOption performed.\n\nfunction collect(ecModel, api) {\n var result = {\n /**\n * key: makeKey(axis.model)\n * value: {\n * axis,\n * coordSys,\n * axisPointerModel,\n * triggerTooltip,\n * involveSeries,\n * snap,\n * seriesModels,\n * seriesDataCount\n * }\n */\n axesInfo: {},\n seriesInvolved: false,\n\n /**\n * key: makeKey(coordSys.model)\n * value: Object: key makeKey(axis.model), value: axisInfo\n */\n coordSysAxesInfo: {},\n coordSysMap: {}\n };\n collectAxesInfo(result, ecModel, api); // Check seriesInvolved for performance, in case too many series in some chart.\n\n result.seriesInvolved && collectSeriesInfo(result, ecModel);\n return result;\n}\n\nfunction collectAxesInfo(result, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var globalAxisPointerModel = ecModel.getComponent('axisPointer'); // links can only be set on global.\n\n var linksOption = globalAxisPointerModel.get('link', true) || [];\n var linkGroups = []; // Collect axes info.\n\n each(api.getCoordinateSystems(), function (coordSys) {\n // Some coordinate system do not support axes, like geo.\n if (!coordSys.axisPointerEnabled) {\n return;\n }\n\n var coordSysKey = makeKey(coordSys.model);\n var axesInfoInCoordSys = result.coordSysAxesInfo[coordSysKey] = {};\n result.coordSysMap[coordSysKey] = coordSys; // Set tooltip (like 'cross') is a convienent way to show axisPointer\n // for user. So we enable seting tooltip on coordSys model.\n\n var coordSysModel = coordSys.model;\n var baseTooltipModel = coordSysModel.getModel('tooltip', globalTooltipModel);\n each(coordSys.getAxes(), curry(saveTooltipAxisInfo, false, null)); // If axis tooltip used, choose tooltip axis for each coordSys.\n // Notice this case: coordSys is `grid` but not `cartesian2D` here.\n\n if (coordSys.getTooltipAxes && globalTooltipModel // If tooltip.showContent is set as false, tooltip will not\n // show but axisPointer will show as normal.\n && baseTooltipModel.get('show')) {\n // Compatible with previous logic. But series.tooltip.trigger: 'axis'\n // or series.data[n].tooltip.trigger: 'axis' are not support any more.\n var triggerAxis = baseTooltipModel.get('trigger') === 'axis';\n var cross = baseTooltipModel.get('axisPointer.type') === 'cross';\n var tooltipAxes = coordSys.getTooltipAxes(baseTooltipModel.get('axisPointer.axis'));\n\n if (triggerAxis || cross) {\n each(tooltipAxes.baseAxes, curry(saveTooltipAxisInfo, cross ? 'cross' : true, triggerAxis));\n }\n\n if (cross) {\n each(tooltipAxes.otherAxes, curry(saveTooltipAxisInfo, 'cross', false));\n }\n } // fromTooltip: true | false | 'cross'\n // triggerTooltip: true | false | null\n\n\n function saveTooltipAxisInfo(fromTooltip, triggerTooltip, axis) {\n var axisPointerModel = axis.model.getModel('axisPointer', globalAxisPointerModel);\n var axisPointerShow = axisPointerModel.get('show');\n\n if (!axisPointerShow || axisPointerShow === 'auto' && !fromTooltip && !isHandleTrigger(axisPointerModel)) {\n return;\n }\n\n if (triggerTooltip == null) {\n triggerTooltip = axisPointerModel.get('triggerTooltip');\n }\n\n axisPointerModel = fromTooltip ? makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) : axisPointerModel;\n var snap = axisPointerModel.get('snap');\n var key = makeKey(axis.model);\n var involveSeries = triggerTooltip || snap || axis.type === 'category'; // If result.axesInfo[key] exist, override it (tooltip has higher priority).\n\n var axisInfo = result.axesInfo[key] = {\n key: key,\n axis: axis,\n coordSys: coordSys,\n axisPointerModel: axisPointerModel,\n triggerTooltip: triggerTooltip,\n involveSeries: involveSeries,\n snap: snap,\n useHandle: isHandleTrigger(axisPointerModel),\n seriesModels: []\n };\n axesInfoInCoordSys[key] = axisInfo;\n result.seriesInvolved |= involveSeries;\n var groupIndex = getLinkGroupIndex(linksOption, axis);\n\n if (groupIndex != null) {\n var linkGroup = linkGroups[groupIndex] || (linkGroups[groupIndex] = {\n axesInfo: {}\n });\n linkGroup.axesInfo[key] = axisInfo;\n linkGroup.mapper = linksOption[groupIndex].mapper;\n axisInfo.linkGroup = linkGroup;\n }\n }\n });\n}\n\nfunction makeAxisPointerModel(axis, baseTooltipModel, globalAxisPointerModel, ecModel, fromTooltip, triggerTooltip) {\n var tooltipAxisPointerModel = baseTooltipModel.getModel('axisPointer');\n var volatileOption = {};\n each(['type', 'snap', 'lineStyle', 'shadowStyle', 'label', 'animation', 'animationDurationUpdate', 'animationEasingUpdate', 'z'], function (field) {\n volatileOption[field] = zrUtil.clone(tooltipAxisPointerModel.get(field));\n }); // category axis do not auto snap, otherwise some tick that do not\n // has value can not be hovered. value/time/log axis default snap if\n // triggered from tooltip and trigger tooltip.\n\n volatileOption.snap = axis.type !== 'category' && !!triggerTooltip; // Compatibel with previous behavior, tooltip axis do not show label by default.\n // Only these properties can be overrided from tooltip to axisPointer.\n\n if (tooltipAxisPointerModel.get('type') === 'cross') {\n volatileOption.type = 'line';\n }\n\n var labelOption = volatileOption.label || (volatileOption.label = {}); // Follow the convention, do not show label when triggered by tooltip by default.\n\n labelOption.show == null && (labelOption.show = false);\n\n if (fromTooltip === 'cross') {\n // When 'cross', both axes show labels.\n var tooltipAxisPointerLabelShow = tooltipAxisPointerModel.get('label.show');\n labelOption.show = tooltipAxisPointerLabelShow != null ? tooltipAxisPointerLabelShow : true; // If triggerTooltip, this is a base axis, which should better not use cross style\n // (cross style is dashed by default)\n\n if (!triggerTooltip) {\n var crossStyle = volatileOption.lineStyle = tooltipAxisPointerModel.get('crossStyle');\n crossStyle && zrUtil.defaults(labelOption, crossStyle.textStyle);\n }\n }\n\n return axis.model.getModel('axisPointer', new Model(volatileOption, globalAxisPointerModel, ecModel));\n}\n\nfunction collectSeriesInfo(result, ecModel) {\n // Prepare data for axis trigger\n ecModel.eachSeries(function (seriesModel) {\n // Notice this case: this coordSys is `cartesian2D` but not `grid`.\n var coordSys = seriesModel.coordinateSystem;\n var seriesTooltipTrigger = seriesModel.get('tooltip.trigger', true);\n var seriesTooltipShow = seriesModel.get('tooltip.show', true);\n\n if (!coordSys || seriesTooltipTrigger === 'none' || seriesTooltipTrigger === false || seriesTooltipTrigger === 'item' || seriesTooltipShow === false || seriesModel.get('axisPointer.show', true) === false) {\n return;\n }\n\n each(result.coordSysAxesInfo[makeKey(coordSys.model)], function (axisInfo) {\n var axis = axisInfo.axis;\n\n if (coordSys.getAxis(axis.dim) === axis) {\n axisInfo.seriesModels.push(seriesModel);\n axisInfo.seriesDataCount == null && (axisInfo.seriesDataCount = 0);\n axisInfo.seriesDataCount += seriesModel.getData().count();\n }\n });\n }, this);\n}\n/**\n * For example:\n * {\n * axisPointer: {\n * links: [{\n * xAxisIndex: [2, 4],\n * yAxisIndex: 'all'\n * }, {\n * xAxisId: ['a5', 'a7'],\n * xAxisName: 'xxx'\n * }]\n * }\n * }\n */\n\n\nfunction getLinkGroupIndex(linksOption, axis) {\n var axisModel = axis.model;\n var dim = axis.dim;\n\n for (var i = 0; i < linksOption.length; i++) {\n var linkOption = linksOption[i] || {};\n\n if (checkPropInLink(linkOption[dim + 'AxisId'], axisModel.id) || checkPropInLink(linkOption[dim + 'AxisIndex'], axisModel.componentIndex) || checkPropInLink(linkOption[dim + 'AxisName'], axisModel.name)) {\n return i;\n }\n }\n}\n\nfunction checkPropInLink(linkPropValue, axisPropValue) {\n return linkPropValue === 'all' || zrUtil.isArray(linkPropValue) && zrUtil.indexOf(linkPropValue, axisPropValue) >= 0 || linkPropValue === axisPropValue;\n}\n\nfunction fixValue(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n\n if (!axisInfo) {\n return;\n }\n\n var axisPointerModel = axisInfo.axisPointerModel;\n var scale = axisInfo.axis.scale;\n var option = axisPointerModel.option;\n var status = axisPointerModel.get('status');\n var value = axisPointerModel.get('value'); // Parse init value for category and time axis.\n\n if (value != null) {\n value = scale.parse(value);\n }\n\n var useHandle = isHandleTrigger(axisPointerModel); // If `handle` used, `axisPointer` will always be displayed, so value\n // and status should be initialized.\n\n if (status == null) {\n option.status = useHandle ? 'show' : 'hide';\n }\n\n var extent = scale.getExtent().slice();\n extent[0] > extent[1] && extent.reverse();\n\n if ( // Pick a value on axis when initializing.\n value == null // If both `handle` and `dataZoom` are used, value may be out of axis extent,\n // where we should re-pick a value to keep `handle` displaying normally.\n || value > extent[1]) {\n // Make handle displayed on the end of the axis when init, which looks better.\n value = extent[1];\n }\n\n if (value < extent[0]) {\n value = extent[0];\n }\n\n option.value = value;\n\n if (useHandle) {\n option.status = axisInfo.axis.scale.isBlank() ? 'hide' : 'show';\n }\n}\n\nfunction getAxisInfo(axisModel) {\n var coordSysAxesInfo = (axisModel.ecModel.getComponent('axisPointer') || {}).coordSysAxesInfo;\n return coordSysAxesInfo && coordSysAxesInfo.axesInfo[makeKey(axisModel)];\n}\n\nfunction getAxisPointerModel(axisModel) {\n var axisInfo = getAxisInfo(axisModel);\n return axisInfo && axisInfo.axisPointerModel;\n}\n\nfunction isHandleTrigger(axisPointerModel) {\n return !!axisPointerModel.get('handle.show');\n}\n/**\n * @param {module:echarts/model/Model} model\n * @return {string} unique key\n */\n\n\nfunction makeKey(model) {\n return model.type + '||' + model.id;\n}\n\nexports.collect = collect;\nexports.fixValue = fixValue;\nexports.getAxisInfo = getAxisInfo;\nexports.getAxisPointerModel = getAxisPointerModel;\nexports.makeKey = makeKey;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 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 * Cartesian coordinate system\n * @module echarts/coord/Cartesian\n *\n */\nfunction dimAxisMapper(dim) {\n return this._axes[dim];\n}\n/**\n * @alias module:echarts/coord/Cartesian\n * @constructor\n */\n\n\nvar Cartesian = function (name) {\n this._axes = {};\n this._dimList = [];\n /**\n * @type {string}\n */\n\n this.name = name || '';\n};\n\nCartesian.prototype = {\n constructor: Cartesian,\n type: 'cartesian',\n\n /**\n * Get axis\n * @param {number|string} dim\n * @return {module:echarts/coord/Cartesian~Axis}\n */\n getAxis: function (dim) {\n return this._axes[dim];\n },\n\n /**\n * Get axes list\n * @return {Array.}\n */\n getAxes: function () {\n return zrUtil.map(this._dimList, dimAxisMapper, this);\n },\n\n /**\n * Get axes list by given scale type\n */\n getAxesByScale: function (scaleType) {\n scaleType = scaleType.toLowerCase();\n return zrUtil.filter(this.getAxes(), function (axis) {\n return axis.scale.type === scaleType;\n });\n },\n\n /**\n * Add axis\n * @param {module:echarts/coord/Cartesian.Axis}\n */\n addAxis: function (axis) {\n var dim = axis.dim;\n this._axes[dim] = axis;\n\n this._dimList.push(dim);\n },\n\n /**\n * Convert data to coord in nd space\n * @param {Array.|Object.} val\n * @return {Array.|Object.}\n */\n dataToCoord: function (val) {\n return this._dataCoordConvert(val, 'dataToCoord');\n },\n\n /**\n * Convert coord in nd space to data\n * @param {Array.|Object.} val\n * @return {Array.|Object.}\n */\n coordToData: function (val) {\n return this._dataCoordConvert(val, 'coordToData');\n },\n _dataCoordConvert: function (input, method) {\n var dimList = this._dimList;\n var output = input instanceof Array ? [] : {};\n\n for (var i = 0; i < dimList.length; i++) {\n var dim = dimList[i];\n var axis = this._axes[dim];\n output[dim] = axis[method](input[dim]);\n }\n\n return output;\n }\n};\nvar _default = Cartesian;\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 _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*/\n// (1) [Caution]: the logic is correct based on the premises:\n// data processing stage is blocked in stream.\n// See \n// (2) Only register once when import repeatly.\n// Should be executed after series filtered and before stack calculation.\nfunction _default(ecModel) {\n var stackInfoMap = createHashMap();\n ecModel.eachSeries(function (seriesModel) {\n var stack = seriesModel.get('stack'); // Compatibal: when `stack` is set as '', do not stack.\n\n if (stack) {\n var stackInfoList = stackInfoMap.get(stack) || stackInfoMap.set(stack, []);\n var data = seriesModel.getData();\n var stackInfo = {\n // Used for calculate axis extent automatically.\n stackResultDimension: data.getCalculationInfo('stackResultDimension'),\n stackedOverDimension: data.getCalculationInfo('stackedOverDimension'),\n stackedDimension: data.getCalculationInfo('stackedDimension'),\n stackedByDimension: data.getCalculationInfo('stackedByDimension'),\n isStackedByIndex: data.getCalculationInfo('isStackedByIndex'),\n data: data,\n seriesModel: seriesModel\n }; // If stacked on axis that do not support data stack.\n\n if (!stackInfo.stackedDimension || !(stackInfo.isStackedByIndex || stackInfo.stackedByDimension)) {\n return;\n }\n\n stackInfoList.length && data.setCalculationInfo('stackedOnSeries', stackInfoList[stackInfoList.length - 1].seriesModel);\n stackInfoList.push(stackInfo);\n }\n });\n stackInfoMap.each(calculateStack);\n}\n\nfunction calculateStack(stackInfoList) {\n each(stackInfoList, function (targetStackInfo, idxInStack) {\n var resultVal = [];\n var resultNaN = [NaN, NaN];\n var dims = [targetStackInfo.stackResultDimension, targetStackInfo.stackedOverDimension];\n var targetData = targetStackInfo.data;\n var isStackedByIndex = targetStackInfo.isStackedByIndex; // Should not write on raw data, because stack series model list changes\n // depending on legend selection.\n\n var newData = targetData.map(dims, function (v0, v1, dataIndex) {\n var sum = targetData.get(targetStackInfo.stackedDimension, dataIndex); // Consider `connectNulls` of line area, if value is NaN, stackedOver\n // should also be NaN, to draw a appropriate belt area.\n\n if (isNaN(sum)) {\n return resultNaN;\n }\n\n var byValue;\n var stackedDataRawIndex;\n\n if (isStackedByIndex) {\n stackedDataRawIndex = targetData.getRawIndex(dataIndex);\n } else {\n byValue = targetData.get(targetStackInfo.stackedByDimension, dataIndex);\n } // If stackOver is NaN, chart view will render point on value start.\n\n\n var stackedOver = NaN;\n\n for (var j = idxInStack - 1; j >= 0; j--) {\n var stackInfo = stackInfoList[j]; // Has been optimized by inverted indices on `stackedByDimension`.\n\n if (!isStackedByIndex) {\n stackedDataRawIndex = stackInfo.data.rawIndexOf(stackInfo.stackedByDimension, byValue);\n }\n\n if (stackedDataRawIndex >= 0) {\n var val = stackInfo.data.getByRawIndex(stackInfo.stackResultDimension, stackedDataRawIndex); // Considering positive stack, negative stack and empty data\n\n if (sum >= 0 && val > 0 || // Positive stack\n sum <= 0 && val < 0 // Negative stack\n ) {\n sum += val;\n stackedOver = val;\n break;\n }\n }\n }\n\n resultVal[0] = sum;\n resultVal[1] = stackedOver;\n return resultVal;\n });\n targetData.hostModel.setData(newData); // Update for consequent calculation\n\n targetStackInfo.data = newData;\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(\"./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;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 echarts = require(\"../../echarts\");\n\nvar globalListener = require(\"./globalListener\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 AxisPointerView = echarts.extendComponentView({\n type: 'axisPointer',\n render: function (globalAxisPointerModel, ecModel, api) {\n var globalTooltipModel = ecModel.getComponent('tooltip');\n var triggerOn = globalAxisPointerModel.get('triggerOn') || globalTooltipModel && globalTooltipModel.get('triggerOn') || 'mousemove|click'; // Register global listener in AxisPointerView to enable\n // AxisPointerView to be independent to Tooltip.\n\n globalListener.register('axisPointer', api, function (currTrigger, e, dispatchAction) {\n // If 'none', it is not controlled by mouse totally.\n if (triggerOn !== 'none' && (currTrigger === 'leave' || triggerOn.indexOf(currTrigger) >= 0)) {\n dispatchAction({\n type: 'updateAxisPointer',\n currTrigger: currTrigger,\n x: e && e.offsetX,\n y: e && e.offsetY\n });\n }\n });\n },\n\n /**\n * @override\n */\n remove: function (ecModel, api) {\n globalListener.unregister(api.getZr(), 'axisPointer');\n AxisPointerView.superApply(this._model, 'remove', arguments);\n },\n\n /**\n * @override\n */\n dispose: function (ecModel, api) {\n globalListener.unregister('axisPointer', api);\n AxisPointerView.superApply(this._model, 'dispose', arguments);\n }\n});\nvar _default = AxisPointerView;\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 Path = require(\"zrender/lib/graphic/Path\");\n\nvar vec2 = require(\"zrender/lib/core/vector\");\n\nvar fixClipWithShadow = require(\"zrender/lib/graphic/helper/fixClipWithShadow\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Poly path support NaN point\nvar vec2Min = vec2.min;\nvar vec2Max = vec2.max;\nvar scaleAndAdd = vec2.scaleAndAdd;\nvar v2Copy = vec2.copy; // Temporary variable\n\nvar v = [];\nvar cp0 = [];\nvar cp1 = [];\n\nfunction isPointNull(p) {\n return isNaN(p[0]) || isNaN(p[1]);\n}\n\nfunction drawSegment(ctx, points, start, segLen, allLen, dir, smoothMin, smoothMax, smooth, smoothMonotone, connectNulls) {\n // if (smoothMonotone == null) {\n // if (isMono(points, 'x')) {\n // return drawMono(ctx, points, start, segLen, allLen,\n // dir, smoothMin, smoothMax, smooth, 'x', connectNulls);\n // }\n // else if (isMono(points, 'y')) {\n // return drawMono(ctx, points, start, segLen, allLen,\n // dir, smoothMin, smoothMax, smooth, 'y', connectNulls);\n // }\n // else {\n // return drawNonMono.apply(this, arguments);\n // }\n // }\n // else if (smoothMonotone !== 'none' && isMono(points, smoothMonotone)) {\n // return drawMono.apply(this, arguments);\n // }\n // else {\n // return drawNonMono.apply(this, arguments);\n // }\n if (smoothMonotone === 'none' || !smoothMonotone) {\n return drawNonMono.apply(this, arguments);\n } else {\n return drawMono.apply(this, arguments);\n }\n}\n/**\n * Check if points is in monotone.\n *\n * @param {number[][]} points Array of points which is in [x, y] form\n * @param {string} smoothMonotone 'x', 'y', or 'none', stating for which\n * dimension that is checking.\n * If is 'none', `drawNonMono` should be\n * called.\n * If is undefined, either being monotone\n * in 'x' or 'y' will call `drawMono`.\n */\n// function isMono(points, smoothMonotone) {\n// if (points.length <= 1) {\n// return true;\n// }\n// var dim = smoothMonotone === 'x' ? 0 : 1;\n// var last = points[0][dim];\n// var lastDiff = 0;\n// for (var i = 1; i < points.length; ++i) {\n// var diff = points[i][dim] - last;\n// if (!isNaN(diff) && !isNaN(lastDiff)\n// && diff !== 0 && lastDiff !== 0\n// && ((diff >= 0) !== (lastDiff >= 0))\n// ) {\n// return false;\n// }\n// if (!isNaN(diff) && diff !== 0) {\n// lastDiff = diff;\n// last = points[i][dim];\n// }\n// }\n// return true;\n// }\n\n/**\n * Draw smoothed line in monotone, in which only vertical or horizontal bezier\n * control points will be used. This should be used when points are monotone\n * either in x or y dimension.\n */\n\n\nfunction drawMono(ctx, points, start, segLen, allLen, dir, smoothMin, smoothMax, smooth, smoothMonotone, connectNulls) {\n var prevIdx = 0;\n var idx = start;\n\n for (var k = 0; k < segLen; k++) {\n var p = points[idx];\n\n if (idx >= allLen || idx < 0) {\n break;\n }\n\n if (isPointNull(p)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n\n break;\n }\n\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](p[0], p[1]);\n } else {\n if (smooth > 0) {\n var prevP = points[prevIdx];\n var dim = smoothMonotone === 'y' ? 1 : 0; // Length of control point to p, either in x or y, but not both\n\n var ctrlLen = (p[dim] - prevP[dim]) * smooth;\n v2Copy(cp0, prevP);\n cp0[dim] = prevP[dim] + ctrlLen;\n v2Copy(cp1, p);\n cp1[dim] = p[dim] - ctrlLen;\n ctx.bezierCurveTo(cp0[0], cp0[1], cp1[0], cp1[1], p[0], p[1]);\n } else {\n ctx.lineTo(p[0], p[1]);\n }\n }\n\n prevIdx = idx;\n idx += dir;\n }\n\n return k;\n}\n/**\n * Draw smoothed line in non-monotone, in may cause undesired curve in extreme\n * situations. This should be used when points are non-monotone neither in x or\n * y dimension.\n */\n\n\nfunction drawNonMono(ctx, points, start, segLen, allLen, dir, smoothMin, smoothMax, smooth, smoothMonotone, connectNulls) {\n var prevIdx = 0;\n var idx = start;\n\n for (var k = 0; k < segLen; k++) {\n var p = points[idx];\n\n if (idx >= allLen || idx < 0) {\n break;\n }\n\n if (isPointNull(p)) {\n if (connectNulls) {\n idx += dir;\n continue;\n }\n\n break;\n }\n\n if (idx === start) {\n ctx[dir > 0 ? 'moveTo' : 'lineTo'](p[0], p[1]);\n v2Copy(cp0, p);\n } else {\n if (smooth > 0) {\n var nextIdx = idx + dir;\n var nextP = points[nextIdx];\n\n if (connectNulls) {\n // Find next point not null\n while (nextP && isPointNull(points[nextIdx])) {\n nextIdx += dir;\n nextP = points[nextIdx];\n }\n }\n\n var ratioNextSeg = 0.5;\n var prevP = points[prevIdx];\n var nextP = points[nextIdx]; // Last point\n\n if (!nextP || isPointNull(nextP)) {\n v2Copy(cp1, p);\n } else {\n // If next data is null in not connect case\n if (isPointNull(nextP) && !connectNulls) {\n nextP = p;\n }\n\n vec2.sub(v, nextP, prevP);\n var lenPrevSeg;\n var lenNextSeg;\n\n if (smoothMonotone === 'x' || smoothMonotone === 'y') {\n var dim = smoothMonotone === 'x' ? 0 : 1;\n lenPrevSeg = Math.abs(p[dim] - prevP[dim]);\n lenNextSeg = Math.abs(p[dim] - nextP[dim]);\n } else {\n lenPrevSeg = vec2.dist(p, prevP);\n lenNextSeg = vec2.dist(p, nextP);\n } // Use ratio of seg length\n\n\n ratioNextSeg = lenNextSeg / (lenNextSeg + lenPrevSeg);\n scaleAndAdd(cp1, p, v, -smooth * (1 - ratioNextSeg));\n } // Smooth constraint\n\n\n vec2Min(cp0, cp0, smoothMax);\n vec2Max(cp0, cp0, smoothMin);\n vec2Min(cp1, cp1, smoothMax);\n vec2Max(cp1, cp1, smoothMin);\n ctx.bezierCurveTo(cp0[0], cp0[1], cp1[0], cp1[1], p[0], p[1]); // cp0 of next segment\n\n scaleAndAdd(cp0, p, v, smooth * ratioNextSeg);\n } else {\n ctx.lineTo(p[0], p[1]);\n }\n }\n\n prevIdx = idx;\n idx += dir;\n }\n\n return k;\n}\n\nfunction getBoundingBox(points, smoothConstraint) {\n var ptMin = [Infinity, Infinity];\n var ptMax = [-Infinity, -Infinity];\n\n if (smoothConstraint) {\n for (var i = 0; i < points.length; i++) {\n var pt = points[i];\n\n if (pt[0] < ptMin[0]) {\n ptMin[0] = pt[0];\n }\n\n if (pt[1] < ptMin[1]) {\n ptMin[1] = pt[1];\n }\n\n if (pt[0] > ptMax[0]) {\n ptMax[0] = pt[0];\n }\n\n if (pt[1] > ptMax[1]) {\n ptMax[1] = pt[1];\n }\n }\n }\n\n return {\n min: smoothConstraint ? ptMin : ptMax,\n max: smoothConstraint ? ptMax : ptMin\n };\n}\n\nvar Polyline = Path.extend({\n type: 'ec-polyline',\n shape: {\n points: [],\n smooth: 0,\n smoothConstraint: true,\n smoothMonotone: null,\n connectNulls: false\n },\n style: {\n fill: null,\n stroke: '#000'\n },\n brush: fixClipWithShadow(Path.prototype.brush),\n buildPath: function (ctx, shape) {\n var points = shape.points;\n var i = 0;\n var len = points.length;\n var result = getBoundingBox(points, shape.smoothConstraint);\n\n if (shape.connectNulls) {\n // Must remove first and last null values avoid draw error in polygon\n for (; len > 0; len--) {\n if (!isPointNull(points[len - 1])) {\n break;\n }\n }\n\n for (; i < len; i++) {\n if (!isPointNull(points[i])) {\n break;\n }\n }\n }\n\n while (i < len) {\n i += drawSegment(ctx, points, i, len, len, 1, result.min, result.max, shape.smooth, shape.smoothMonotone, shape.connectNulls) + 1;\n }\n }\n});\nvar Polygon = Path.extend({\n type: 'ec-polygon',\n shape: {\n points: [],\n // Offset between stacked base points and points\n stackedOnPoints: [],\n smooth: 0,\n stackedOnSmooth: 0,\n smoothConstraint: true,\n smoothMonotone: null,\n connectNulls: false\n },\n brush: fixClipWithShadow(Path.prototype.brush),\n buildPath: function (ctx, shape) {\n var points = shape.points;\n var stackedOnPoints = shape.stackedOnPoints;\n var i = 0;\n var len = points.length;\n var smoothMonotone = shape.smoothMonotone;\n var bbox = getBoundingBox(points, shape.smoothConstraint);\n var stackedOnBBox = getBoundingBox(stackedOnPoints, shape.smoothConstraint);\n\n if (shape.connectNulls) {\n // Must remove first and last null values avoid draw error in polygon\n for (; len > 0; len--) {\n if (!isPointNull(points[len - 1])) {\n break;\n }\n }\n\n for (; i < len; i++) {\n if (!isPointNull(points[i])) {\n break;\n }\n }\n }\n\n while (i < len) {\n var k = drawSegment(ctx, points, i, len, len, 1, bbox.min, bbox.max, shape.smooth, smoothMonotone, shape.connectNulls);\n drawSegment(ctx, stackedOnPoints, i + k - 1, k, len, -1, stackedOnBBox.min, stackedOnBBox.max, shape.stackedOnSmooth, smoothMonotone, shape.connectNulls);\n i += k + 1;\n ctx.closePath();\n }\n }\n});\nexports.Polyline = Polyline;\nexports.Polygon = Polygon;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 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 PolarAxisModel = ComponentModel.extend({\n type: 'polarAxis',\n\n /**\n * @type {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n */\n axis: null,\n\n /**\n * @override\n */\n getCoordSysModel: function () {\n return this.ecModel.queryComponents({\n mainType: 'polar',\n index: this.option.polarIndex,\n id: this.option.polarId\n })[0];\n }\n});\nzrUtil.merge(PolarAxisModel.prototype, axisModelCommonMixin);\nvar polarAxisDefaultExtendedOption = {\n angle: {\n // polarIndex: 0,\n // polarId: '',\n startAngle: 90,\n clockwise: true,\n splitNumber: 12,\n axisLabel: {\n rotate: false\n }\n },\n radius: {\n // polarIndex: 0,\n // polarId: '',\n splitNumber: 5\n }\n};\n\nfunction getAxisType(axisDim, option) {\n // Default axis with data is category axis\n return option.type || (option.data ? 'category' : 'value');\n}\n\naxisModelCreator('angle', PolarAxisModel, getAxisType, polarAxisDefaultExtendedOption.angle);\naxisModelCreator('radius', PolarAxisModel, getAxisType, polarAxisDefaultExtendedOption.radius);","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 clazzUtil = require(\"../../util/clazz\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar axisPointerModelHelper = require(\"./modelHelper\");\n\nvar eventTool = require(\"zrender/lib/core/event\");\n\nvar throttleUtil = require(\"../../util/throttle\");\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 clone = zrUtil.clone;\nvar bind = zrUtil.bind;\n/**\n * Base axis pointer class in 2D.\n * Implemenents {module:echarts/component/axis/IAxisPointer}.\n */\n\nfunction BaseAxisPointer() {}\n\nBaseAxisPointer.prototype = {\n /**\n * @private\n */\n _group: null,\n\n /**\n * @private\n */\n _lastGraphicKey: null,\n\n /**\n * @private\n */\n _handle: null,\n\n /**\n * @private\n */\n _dragging: false,\n\n /**\n * @private\n */\n _lastValue: null,\n\n /**\n * @private\n */\n _lastStatus: null,\n\n /**\n * @private\n */\n _payloadInfo: null,\n\n /**\n * In px, arbitrary value. Do not set too small,\n * no animation is ok for most cases.\n * @protected\n */\n animationThreshold: 15,\n\n /**\n * @implement\n */\n render: function (axisModel, axisPointerModel, api, forceRender) {\n var value = axisPointerModel.get('value');\n var status = axisPointerModel.get('status'); // Bind them to `this`, not in closure, otherwise they will not\n // be replaced when user calling setOption in not merge mode.\n\n this._axisModel = axisModel;\n this._axisPointerModel = axisPointerModel;\n this._api = api; // Optimize: `render` will be called repeatly during mouse move.\n // So it is power consuming if performing `render` each time,\n // especially on mobile device.\n\n if (!forceRender && this._lastValue === value && this._lastStatus === status) {\n return;\n }\n\n this._lastValue = value;\n this._lastStatus = status;\n var group = this._group;\n var handle = this._handle;\n\n if (!status || status === 'hide') {\n // Do not clear here, for animation better.\n group && group.hide();\n handle && handle.hide();\n return;\n }\n\n group && group.show();\n handle && handle.show(); // Otherwise status is 'show'\n\n var elOption = {};\n this.makeElOption(elOption, value, axisModel, axisPointerModel, api); // Enable change axis pointer type.\n\n var graphicKey = elOption.graphicKey;\n\n if (graphicKey !== this._lastGraphicKey) {\n this.clear(api);\n }\n\n this._lastGraphicKey = graphicKey;\n var moveAnimation = this._moveAnimation = this.determineAnimation(axisModel, axisPointerModel);\n\n if (!group) {\n group = this._group = new graphic.Group();\n this.createPointerEl(group, elOption, axisModel, axisPointerModel);\n this.createLabelEl(group, elOption, axisModel, axisPointerModel);\n api.getZr().add(group);\n } else {\n var doUpdateProps = zrUtil.curry(updateProps, axisPointerModel, moveAnimation);\n this.updatePointerEl(group, elOption, doUpdateProps, axisPointerModel);\n this.updateLabelEl(group, elOption, doUpdateProps, axisPointerModel);\n }\n\n updateMandatoryProps(group, axisPointerModel, true);\n\n this._renderHandle(value);\n },\n\n /**\n * @implement\n */\n remove: function (api) {\n this.clear(api);\n },\n\n /**\n * @implement\n */\n dispose: function (api) {\n this.clear(api);\n },\n\n /**\n * @protected\n */\n determineAnimation: function (axisModel, axisPointerModel) {\n var animation = axisPointerModel.get('animation');\n var axis = axisModel.axis;\n var isCategoryAxis = axis.type === 'category';\n var useSnap = axisPointerModel.get('snap'); // Value axis without snap always do not snap.\n\n if (!useSnap && !isCategoryAxis) {\n return false;\n }\n\n if (animation === 'auto' || animation == null) {\n var animationThreshold = this.animationThreshold;\n\n if (isCategoryAxis && axis.getBandWidth() > animationThreshold) {\n return true;\n } // It is important to auto animation when snap used. Consider if there is\n // a dataZoom, animation will be disabled when too many points exist, while\n // it will be enabled for better visual effect when little points exist.\n\n\n if (useSnap) {\n var seriesDataCount = axisPointerModelHelper.getAxisInfo(axisModel).seriesDataCount;\n var axisExtent = axis.getExtent(); // Approximate band width\n\n return Math.abs(axisExtent[0] - axisExtent[1]) / seriesDataCount > animationThreshold;\n }\n\n return false;\n }\n\n return animation === true;\n },\n\n /**\n * add {pointer, label, graphicKey} to elOption\n * @protected\n */\n makeElOption: function (elOption, value, axisModel, axisPointerModel, api) {// Shoule be implemenented by sub-class.\n },\n\n /**\n * @protected\n */\n createPointerEl: function (group, elOption, axisModel, axisPointerModel) {\n var pointerOption = elOption.pointer;\n\n if (pointerOption) {\n var pointerEl = inner(group).pointerEl = new graphic[pointerOption.type](clone(elOption.pointer));\n group.add(pointerEl);\n }\n },\n\n /**\n * @protected\n */\n createLabelEl: function (group, elOption, axisModel, axisPointerModel) {\n if (elOption.label) {\n var labelEl = inner(group).labelEl = new graphic.Rect(clone(elOption.label));\n group.add(labelEl);\n updateLabelShowHide(labelEl, axisPointerModel);\n }\n },\n\n /**\n * @protected\n */\n updatePointerEl: function (group, elOption, updateProps) {\n var pointerEl = inner(group).pointerEl;\n\n if (pointerEl && elOption.pointer) {\n pointerEl.setStyle(elOption.pointer.style);\n updateProps(pointerEl, {\n shape: elOption.pointer.shape\n });\n }\n },\n\n /**\n * @protected\n */\n updateLabelEl: function (group, elOption, updateProps, axisPointerModel) {\n var labelEl = inner(group).labelEl;\n\n if (labelEl) {\n labelEl.setStyle(elOption.label.style);\n updateProps(labelEl, {\n // Consider text length change in vertical axis, animation should\n // be used on shape, otherwise the effect will be weird.\n shape: elOption.label.shape,\n position: elOption.label.position\n });\n updateLabelShowHide(labelEl, axisPointerModel);\n }\n },\n\n /**\n * @private\n */\n _renderHandle: function (value) {\n if (this._dragging || !this.updateHandleTransform) {\n return;\n }\n\n var axisPointerModel = this._axisPointerModel;\n\n var zr = this._api.getZr();\n\n var handle = this._handle;\n var handleModel = axisPointerModel.getModel('handle');\n var status = axisPointerModel.get('status');\n\n if (!handleModel.get('show') || !status || status === 'hide') {\n handle && zr.remove(handle);\n this._handle = null;\n return;\n }\n\n var isInit;\n\n if (!this._handle) {\n isInit = true;\n handle = this._handle = graphic.createIcon(handleModel.get('icon'), {\n cursor: 'move',\n draggable: true,\n onmousemove: function (e) {\n // Fot mobile devicem, prevent screen slider on the button.\n eventTool.stop(e.event);\n },\n onmousedown: bind(this._onHandleDragMove, this, 0, 0),\n drift: bind(this._onHandleDragMove, this),\n ondragend: bind(this._onHandleDragEnd, this)\n });\n zr.add(handle);\n }\n\n updateMandatoryProps(handle, axisPointerModel, false); // update style\n\n var includeStyles = ['color', 'borderColor', 'borderWidth', 'opacity', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY'];\n handle.setStyle(handleModel.getItemStyle(null, includeStyles)); // update position\n\n var handleSize = handleModel.get('size');\n\n if (!zrUtil.isArray(handleSize)) {\n handleSize = [handleSize, handleSize];\n }\n\n handle.attr('scale', [handleSize[0] / 2, handleSize[1] / 2]);\n throttleUtil.createOrUpdate(this, '_doDispatchAxisPointer', handleModel.get('throttle') || 0, 'fixRate');\n\n this._moveHandleToValue(value, isInit);\n },\n\n /**\n * @private\n */\n _moveHandleToValue: function (value, isInit) {\n updateProps(this._axisPointerModel, !isInit && this._moveAnimation, this._handle, getHandleTransProps(this.getHandleTransform(value, this._axisModel, this._axisPointerModel)));\n },\n\n /**\n * @private\n */\n _onHandleDragMove: function (dx, dy) {\n var handle = this._handle;\n\n if (!handle) {\n return;\n }\n\n this._dragging = true; // Persistent for throttle.\n\n var trans = this.updateHandleTransform(getHandleTransProps(handle), [dx, dy], this._axisModel, this._axisPointerModel);\n this._payloadInfo = trans;\n handle.stopAnimation();\n handle.attr(getHandleTransProps(trans));\n inner(handle).lastProp = null;\n\n this._doDispatchAxisPointer();\n },\n\n /**\n * Throttled method.\n * @private\n */\n _doDispatchAxisPointer: function () {\n var handle = this._handle;\n\n if (!handle) {\n return;\n }\n\n var payloadInfo = this._payloadInfo;\n var axisModel = this._axisModel;\n\n this._api.dispatchAction({\n type: 'updateAxisPointer',\n x: payloadInfo.cursorPoint[0],\n y: payloadInfo.cursorPoint[1],\n tooltipOption: payloadInfo.tooltipOption,\n axesInfo: [{\n axisDim: axisModel.axis.dim,\n axisIndex: axisModel.componentIndex\n }]\n });\n },\n\n /**\n * @private\n */\n _onHandleDragEnd: function (moveAnimation) {\n this._dragging = false;\n var handle = this._handle;\n\n if (!handle) {\n return;\n }\n\n var value = this._axisPointerModel.get('value'); // Consider snap or categroy axis, handle may be not consistent with\n // axisPointer. So move handle to align the exact value position when\n // drag ended.\n\n\n this._moveHandleToValue(value); // For the effect: tooltip will be shown when finger holding on handle\n // button, and will be hidden after finger left handle button.\n\n\n this._api.dispatchAction({\n type: 'hideTip'\n });\n },\n\n /**\n * Should be implemenented by sub-class if support `handle`.\n * @protected\n * @param {number} value\n * @param {module:echarts/model/Model} axisModel\n * @param {module:echarts/model/Model} axisPointerModel\n * @return {Object} {position: [x, y], rotation: 0}\n */\n getHandleTransform: null,\n\n /**\n * * Should be implemenented by sub-class if support `handle`.\n * @protected\n * @param {Object} transform {position, rotation}\n * @param {Array.} delta [dx, dy]\n * @param {module:echarts/model/Model} axisModel\n * @param {module:echarts/model/Model} axisPointerModel\n * @return {Object} {position: [x, y], rotation: 0, cursorPoint: [x, y]}\n */\n updateHandleTransform: null,\n\n /**\n * @private\n */\n clear: function (api) {\n this._lastValue = null;\n this._lastStatus = null;\n var zr = api.getZr();\n var group = this._group;\n var handle = this._handle;\n\n if (zr && group) {\n this._lastGraphicKey = null;\n group && zr.remove(group);\n handle && zr.remove(handle);\n this._group = null;\n this._handle = null;\n this._payloadInfo = null;\n }\n },\n\n /**\n * @protected\n */\n doClear: function () {// Implemented by sub-class if necessary.\n },\n\n /**\n * @protected\n * @param {Array.} xy\n * @param {Array.} wh\n * @param {number} [xDimIndex=0] or 1\n */\n buildLabel: function (xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n }\n};\nBaseAxisPointer.prototype.constructor = BaseAxisPointer;\n\nfunction updateProps(animationModel, moveAnimation, el, props) {\n // Animation optimize.\n if (!propsEqual(inner(el).lastProp, props)) {\n inner(el).lastProp = props;\n moveAnimation ? graphic.updateProps(el, props, animationModel) : (el.stopAnimation(), el.attr(props));\n }\n}\n\nfunction propsEqual(lastProps, newProps) {\n if (zrUtil.isObject(lastProps) && zrUtil.isObject(newProps)) {\n var equals = true;\n zrUtil.each(newProps, function (item, key) {\n equals = equals && propsEqual(lastProps[key], item);\n });\n return !!equals;\n } else {\n return lastProps === newProps;\n }\n}\n\nfunction updateLabelShowHide(labelEl, axisPointerModel) {\n labelEl[axisPointerModel.get('label.show') ? 'show' : 'hide']();\n}\n\nfunction getHandleTransProps(trans) {\n return {\n position: trans.position.slice(),\n rotation: trans.rotation || 0\n };\n}\n\nfunction updateMandatoryProps(group, axisPointerModel, silent) {\n var z = axisPointerModel.get('z');\n var zlevel = axisPointerModel.get('zlevel');\n group && group.traverse(function (el) {\n if (el.type !== 'group') {\n z != null && (el.z = z);\n zlevel != null && (el.zlevel = zlevel);\n el.silent = silent;\n }\n });\n}\n\nclazzUtil.enableClassExtend(BaseAxisPointer);\nvar _default = BaseAxisPointer;\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*/\nvar _default = {\n getBoxLayoutParams: function () {\n return {\n left: this.get('left'),\n top: this.get('top'),\n right: this.get('right'),\n bottom: this.get('bottom'),\n width: this.get('width'),\n height: this.get('height')\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 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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar textContain = require(\"zrender/lib/contain/text\");\n\nvar _model = require(\"../util/model\");\n\nvar makeInner = _model.makeInner;\n\nvar _axisHelper = require(\"./axisHelper\");\n\nvar makeLabelFormatter = _axisHelper.makeLabelFormatter;\nvar getOptionCategoryInterval = _axisHelper.getOptionCategoryInterval;\nvar shouldShowAllLabels = _axisHelper.shouldShowAllLabels;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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();\n/**\n * @param {module:echats/coord/Axis} axis\n * @return {Object} {\n * labels: [{\n * formattedLabel: string,\n * rawLabel: string,\n * tickValue: number\n * }, ...],\n * labelCategoryInterval: number\n * }\n */\n\nfunction createAxisLabels(axis) {\n // Only ordinal scale support tick interval\n return axis.type === 'category' ? makeCategoryLabels(axis) : makeRealNumberLabels(axis);\n}\n/**\n * @param {module:echats/coord/Axis} axis\n * @param {module:echarts/model/Model} tickModel For example, can be axisTick, splitLine, splitArea.\n * @return {Object} {\n * ticks: Array.\n * tickCategoryInterval: number\n * }\n */\n\n\nfunction createAxisTicks(axis, tickModel) {\n // Only ordinal scale support tick interval\n return axis.type === 'category' ? makeCategoryTicks(axis, tickModel) : {\n ticks: axis.scale.getTicks()\n };\n}\n\nfunction makeCategoryLabels(axis) {\n var labelModel = axis.getLabelModel();\n var result = makeCategoryLabelsActually(axis, labelModel);\n return !labelModel.get('show') || axis.scale.isBlank() ? {\n labels: [],\n labelCategoryInterval: result.labelCategoryInterval\n } : result;\n}\n\nfunction makeCategoryLabelsActually(axis, labelModel) {\n var labelsCache = getListCache(axis, 'labels');\n var optionLabelInterval = getOptionCategoryInterval(labelModel);\n var result = listCacheGet(labelsCache, optionLabelInterval);\n\n if (result) {\n return result;\n }\n\n var labels;\n var numericLabelInterval;\n\n if (zrUtil.isFunction(optionLabelInterval)) {\n labels = makeLabelsByCustomizedCategoryInterval(axis, optionLabelInterval);\n } else {\n numericLabelInterval = optionLabelInterval === 'auto' ? makeAutoCategoryInterval(axis) : optionLabelInterval;\n labels = makeLabelsByNumericCategoryInterval(axis, numericLabelInterval);\n } // Cache to avoid calling interval function repeatly.\n\n\n return listCacheSet(labelsCache, optionLabelInterval, {\n labels: labels,\n labelCategoryInterval: numericLabelInterval\n });\n}\n\nfunction makeCategoryTicks(axis, tickModel) {\n var ticksCache = getListCache(axis, 'ticks');\n var optionTickInterval = getOptionCategoryInterval(tickModel);\n var result = listCacheGet(ticksCache, optionTickInterval);\n\n if (result) {\n return result;\n }\n\n var ticks;\n var tickCategoryInterval; // Optimize for the case that large category data and no label displayed,\n // we should not return all ticks.\n\n if (!tickModel.get('show') || axis.scale.isBlank()) {\n ticks = [];\n }\n\n if (zrUtil.isFunction(optionTickInterval)) {\n ticks = makeLabelsByCustomizedCategoryInterval(axis, optionTickInterval, true);\n } // Always use label interval by default despite label show. Consider this\n // scenario, Use multiple grid with the xAxis sync, and only one xAxis shows\n // labels. `splitLine` and `axisTick` should be consistent in this case.\n else if (optionTickInterval === 'auto') {\n var labelsResult = makeCategoryLabelsActually(axis, axis.getLabelModel());\n tickCategoryInterval = labelsResult.labelCategoryInterval;\n ticks = zrUtil.map(labelsResult.labels, function (labelItem) {\n return labelItem.tickValue;\n });\n } else {\n tickCategoryInterval = optionTickInterval;\n ticks = makeLabelsByNumericCategoryInterval(axis, tickCategoryInterval, true);\n } // Cache to avoid calling interval function repeatly.\n\n\n return listCacheSet(ticksCache, optionTickInterval, {\n ticks: ticks,\n tickCategoryInterval: tickCategoryInterval\n });\n}\n\nfunction makeRealNumberLabels(axis) {\n var ticks = axis.scale.getTicks();\n var labelFormatter = makeLabelFormatter(axis);\n return {\n labels: zrUtil.map(ticks, function (tickValue, idx) {\n return {\n formattedLabel: labelFormatter(tickValue, idx),\n rawLabel: axis.scale.getLabel(tickValue),\n tickValue: tickValue\n };\n })\n };\n} // Large category data calculation is performence sensitive, and ticks and label\n// probably be fetched by multiple times. So we cache the result.\n// axis is created each time during a ec process, so we do not need to clear cache.\n\n\nfunction getListCache(axis, prop) {\n // Because key can be funciton, and cache size always be small, we use array cache.\n return inner(axis)[prop] || (inner(axis)[prop] = []);\n}\n\nfunction listCacheGet(cache, key) {\n for (var i = 0; i < cache.length; i++) {\n if (cache[i].key === key) {\n return cache[i].value;\n }\n }\n}\n\nfunction listCacheSet(cache, key, value) {\n cache.push({\n key: key,\n value: value\n });\n return value;\n}\n\nfunction makeAutoCategoryInterval(axis) {\n var result = inner(axis).autoInterval;\n return result != null ? result : inner(axis).autoInterval = axis.calculateCategoryInterval();\n}\n/**\n * Calculate interval for category axis ticks and labels.\n * To get precise result, at least one of `getRotate` and `isHorizontal`\n * should be implemented in axis.\n */\n\n\nfunction calculateCategoryInterval(axis) {\n var params = fetchAutoCategoryIntervalCalculationParams(axis);\n var labelFormatter = makeLabelFormatter(axis);\n var rotation = (params.axisRotate - params.labelRotate) / 180 * Math.PI;\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent(); // Providing this method is for optimization:\n // avoid generating a long array by `getTicks`\n // in large category data case.\n\n var tickCount = ordinalScale.count();\n\n if (ordinalExtent[1] - ordinalExtent[0] < 1) {\n return 0;\n }\n\n var step = 1; // Simple optimization. Empirical value: tick count should less than 40.\n\n if (tickCount > 40) {\n step = Math.max(1, Math.floor(tickCount / 40));\n }\n\n var tickValue = ordinalExtent[0];\n var unitSpan = axis.dataToCoord(tickValue + 1) - axis.dataToCoord(tickValue);\n var unitW = Math.abs(unitSpan * Math.cos(rotation));\n var unitH = Math.abs(unitSpan * Math.sin(rotation));\n var maxW = 0;\n var maxH = 0; // Caution: Performance sensitive for large category data.\n // Consider dataZoom, we should make appropriate step to avoid O(n) loop.\n\n for (; tickValue <= ordinalExtent[1]; tickValue += step) {\n var width = 0;\n var height = 0; // Not precise, do not consider align and vertical align\n // and each distance from axis line yet.\n\n var rect = textContain.getBoundingRect(labelFormatter(tickValue), params.font, 'center', 'top'); // Magic number\n\n width = rect.width * 1.3;\n height = rect.height * 1.3; // Min size, void long loop.\n\n maxW = Math.max(maxW, width, 7);\n maxH = Math.max(maxH, height, 7);\n }\n\n var dw = maxW / unitW;\n var dh = maxH / unitH; // 0/0 is NaN, 1/0 is Infinity.\n\n isNaN(dw) && (dw = Infinity);\n isNaN(dh) && (dh = Infinity);\n var interval = Math.max(0, Math.floor(Math.min(dw, dh)));\n var cache = inner(axis.model);\n var axisExtent = axis.getExtent();\n var lastAutoInterval = cache.lastAutoInterval;\n var lastTickCount = cache.lastTickCount; // Use cache to keep interval stable while moving zoom window,\n // otherwise the calculated interval might jitter when the zoom\n // window size is close to the interval-changing size.\n // For example, if all of the axis labels are `a, b, c, d, e, f, g`.\n // The jitter will cause that sometimes the displayed labels are\n // `a, d, g` (interval: 2) sometimes `a, c, e`(interval: 1).\n\n if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1 // Always choose the bigger one, otherwise the critical\n // point is not the same when zooming in or zooming out.\n && lastAutoInterval > interval // If the axis change is caused by chart resize, the cache should not\n // be used. Otherwise some hiden labels might not be shown again.\n && cache.axisExtend0 === axisExtent[0] && cache.axisExtend1 === axisExtent[1]) {\n interval = lastAutoInterval;\n } // Only update cache if cache not used, otherwise the\n // changing of interval is too insensitive.\n else {\n cache.lastTickCount = tickCount;\n cache.lastAutoInterval = interval;\n cache.axisExtend0 = axisExtent[0];\n cache.axisExtend1 = axisExtent[1];\n }\n\n return interval;\n}\n\nfunction fetchAutoCategoryIntervalCalculationParams(axis) {\n var labelModel = axis.getLabelModel();\n return {\n axisRotate: axis.getRotate ? axis.getRotate() : axis.isHorizontal && !axis.isHorizontal() ? 90 : 0,\n labelRotate: labelModel.get('rotate') || 0,\n font: labelModel.getFont()\n };\n}\n\nfunction makeLabelsByNumericCategoryInterval(axis, categoryInterval, onlyTick) {\n var labelFormatter = makeLabelFormatter(axis);\n var ordinalScale = axis.scale;\n var ordinalExtent = ordinalScale.getExtent();\n var labelModel = axis.getLabelModel();\n var result = []; // TODO: axisType: ordinalTime, pick the tick from each month/day/year/...\n\n var step = Math.max((categoryInterval || 0) + 1, 1);\n var startTick = ordinalExtent[0];\n var tickCount = ordinalScale.count(); // Calculate start tick based on zero if possible to keep label consistent\n // while zooming and moving while interval > 0. Otherwise the selection\n // of displayable ticks and symbols probably keep changing.\n // 3 is empirical value.\n\n if (startTick !== 0 && step > 1 && tickCount / step > 2) {\n startTick = Math.round(Math.ceil(startTick / step) * step);\n } // (1) Only add min max label here but leave overlap checking\n // to render stage, which also ensure the returned list\n // suitable for splitLine and splitArea rendering.\n // (2) Scales except category always contain min max label so\n // do not need to perform this process.\n\n\n var showAllLabel = shouldShowAllLabels(axis);\n var includeMinLabel = labelModel.get('showMinLabel') || showAllLabel;\n var includeMaxLabel = labelModel.get('showMaxLabel') || showAllLabel;\n\n if (includeMinLabel && startTick !== ordinalExtent[0]) {\n addItem(ordinalExtent[0]);\n } // Optimize: avoid generating large array by `ordinalScale.getTicks()`.\n\n\n var tickValue = startTick;\n\n for (; tickValue <= ordinalExtent[1]; tickValue += step) {\n addItem(tickValue);\n }\n\n if (includeMaxLabel && tickValue - step !== ordinalExtent[1]) {\n addItem(ordinalExtent[1]);\n }\n\n function addItem(tVal) {\n result.push(onlyTick ? tVal : {\n formattedLabel: labelFormatter(tVal),\n rawLabel: ordinalScale.getLabel(tVal),\n tickValue: tVal\n });\n }\n\n return result;\n} // When interval is function, the result `false` means ignore the tick.\n// It is time consuming for large category data.\n\n\nfunction makeLabelsByCustomizedCategoryInterval(axis, categoryInterval, onlyTick) {\n var ordinalScale = axis.scale;\n var labelFormatter = makeLabelFormatter(axis);\n var result = [];\n zrUtil.each(ordinalScale.getTicks(), function (tickValue) {\n var rawLabel = ordinalScale.getLabel(tickValue);\n\n if (categoryInterval(tickValue, rawLabel)) {\n result.push(onlyTick ? tickValue : {\n formattedLabel: labelFormatter(tickValue),\n rawLabel: rawLabel,\n tickValue: tickValue\n });\n }\n });\n return result;\n}\n\nexports.createAxisLabels = createAxisLabels;\nexports.createAxisTicks = createAxisTicks;\nexports.calculateCategoryInterval = calculateCategoryInterval;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 env = require(\"zrender/lib/core/env\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 isArray = zrUtil.isArray;\n/**\n * Make the name displayable. But we should\n * make sure it is not duplicated with user\n * specified name, so use '\\0';\n */\n\nvar DUMMY_COMPONENT_NAME_PREFIX = 'series\\0';\n/**\n * If value is not array, then translate it to array.\n * @param {*} value\n * @return {Array} [value] or value\n */\n\nfunction normalizeToArray(value) {\n return value instanceof Array ? value : value == null ? [] : [value];\n}\n/**\n * Sync default option between normal and emphasis like `position` and `show`\n * In case some one will write code like\n * label: {\n * show: false,\n * position: 'outside',\n * fontSize: 18\n * },\n * emphasis: {\n * label: { show: true }\n * }\n * @param {Object} opt\n * @param {string} key\n * @param {Array.} subOpts\n */\n\n\nfunction defaultEmphasis(opt, key, subOpts) {\n // Caution: performance sensitive.\n if (opt) {\n opt[key] = opt[key] || {};\n opt.emphasis = opt.emphasis || {};\n opt.emphasis[key] = opt.emphasis[key] || {}; // Default emphasis option from normal\n\n for (var i = 0, len = subOpts.length; i < len; i++) {\n var subOptName = subOpts[i];\n\n if (!opt.emphasis[key].hasOwnProperty(subOptName) && opt[key].hasOwnProperty(subOptName)) {\n opt.emphasis[key][subOptName] = opt[key][subOptName];\n }\n }\n }\n}\n\nvar TEXT_STYLE_OPTIONS = ['fontStyle', 'fontWeight', 'fontSize', 'fontFamily', 'rich', 'tag', 'color', 'textBorderColor', 'textBorderWidth', 'width', 'height', 'lineHeight', 'align', 'verticalAlign', 'baseline', 'shadowColor', 'shadowBlur', 'shadowOffsetX', 'shadowOffsetY', 'textShadowColor', 'textShadowBlur', 'textShadowOffsetX', 'textShadowOffsetY', 'backgroundColor', 'borderColor', 'borderWidth', 'borderRadius', 'padding']; // modelUtil.LABEL_OPTIONS = modelUtil.TEXT_STYLE_OPTIONS.concat([\n// 'position', 'offset', 'rotate', 'origin', 'show', 'distance', 'formatter',\n// 'fontStyle', 'fontWeight', 'fontSize', 'fontFamily',\n// // FIXME: deprecated, check and remove it.\n// 'textStyle'\n// ]);\n\n/**\n * The method do not ensure performance.\n * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}]\n * This helper method retieves value from data.\n * @param {string|number|Date|Array|Object} dataItem\n * @return {number|string|Date|Array.}\n */\n\nfunction getDataItemValue(dataItem) {\n return isObject(dataItem) && !isArray(dataItem) && !(dataItem instanceof Date) ? dataItem.value : dataItem;\n}\n/**\n * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}]\n * This helper method determine if dataItem has extra option besides value\n * @param {string|number|Date|Array|Object} dataItem\n */\n\n\nfunction isDataItemOption(dataItem) {\n return isObject(dataItem) && !(dataItem instanceof Array); // // markLine data can be array\n // && !(dataItem[0] && isObject(dataItem[0]) && !(dataItem[0] instanceof Array));\n}\n/**\n * Mapping to exists for merge.\n *\n * @public\n * @param {Array.|Array.} exists\n * @param {Object|Array.} newCptOptions\n * @return {Array.} Result, like [{exist: ..., option: ...}, {}],\n * index of which is the same as exists.\n */\n\n\nfunction mappingToExists(exists, newCptOptions) {\n // Mapping by the order by original option (but not order of\n // new option) in merge mode. Because we should ensure\n // some specified index (like xAxisIndex) is consistent with\n // original option, which is easy to understand, espatially in\n // media query. And in most case, merge option is used to\n // update partial option but not be expected to change order.\n newCptOptions = (newCptOptions || []).slice();\n var result = zrUtil.map(exists || [], function (obj, index) {\n return {\n exist: obj\n };\n }); // Mapping by id or name if specified.\n\n each(newCptOptions, function (cptOption, index) {\n if (!isObject(cptOption)) {\n return;\n } // id has highest priority.\n\n\n for (var i = 0; i < result.length; i++) {\n if (!result[i].option // Consider name: two map to one.\n && cptOption.id != null && result[i].exist.id === cptOption.id + '') {\n result[i].option = cptOption;\n newCptOptions[index] = null;\n return;\n }\n }\n\n for (var i = 0; i < result.length; i++) {\n var exist = result[i].exist;\n\n if (!result[i].option // Consider name: two map to one.\n // Can not match when both ids exist but different.\n && (exist.id == null || cptOption.id == null) && cptOption.name != null && !isIdInner(cptOption) && !isIdInner(exist) && exist.name === cptOption.name + '') {\n result[i].option = cptOption;\n newCptOptions[index] = null;\n return;\n }\n }\n }); // Otherwise mapping by index.\n\n each(newCptOptions, function (cptOption, index) {\n if (!isObject(cptOption)) {\n return;\n }\n\n var i = 0;\n\n for (; i < result.length; i++) {\n var exist = result[i].exist;\n\n if (!result[i].option // Existing model that already has id should be able to\n // mapped to (because after mapping performed model may\n // be assigned with a id, whish should not affect next\n // mapping), except those has inner id.\n && !isIdInner(exist) // Caution:\n // Do not overwrite id. But name can be overwritten,\n // because axis use name as 'show label text'.\n // 'exist' always has id and name and we dont\n // need to check it.\n && cptOption.id == null) {\n result[i].option = cptOption;\n break;\n }\n }\n\n if (i >= result.length) {\n result.push({\n option: cptOption\n });\n }\n });\n return result;\n}\n/**\n * Make id and name for mapping result (result of mappingToExists)\n * into `keyInfo` field.\n *\n * @public\n * @param {Array.} Result, like [{exist: ..., option: ...}, {}],\n * which order is the same as exists.\n * @return {Array.} The input.\n */\n\n\nfunction makeIdAndName(mapResult) {\n // We use this id to hash component models and view instances\n // in echarts. id can be specified by user, or auto generated.\n // The id generation rule ensures new view instance are able\n // to mapped to old instance when setOption are called in\n // no-merge mode. So we generate model id by name and plus\n // type in view id.\n // name can be duplicated among components, which is convenient\n // to specify multi components (like series) by one name.\n // Ensure that each id is distinct.\n var idMap = zrUtil.createHashMap();\n each(mapResult, function (item, index) {\n var existCpt = item.exist;\n existCpt && idMap.set(existCpt.id, item);\n });\n each(mapResult, function (item, index) {\n var opt = item.option;\n zrUtil.assert(!opt || opt.id == null || !idMap.get(opt.id) || idMap.get(opt.id) === item, 'id duplicates: ' + (opt && opt.id));\n opt && opt.id != null && idMap.set(opt.id, item);\n !item.keyInfo && (item.keyInfo = {});\n }); // Make name and id.\n\n each(mapResult, function (item, index) {\n var existCpt = item.exist;\n var opt = item.option;\n var keyInfo = item.keyInfo;\n\n if (!isObject(opt)) {\n return;\n } // name can be overwitten. Consider case: axis.name = '20km'.\n // But id generated by name will not be changed, which affect\n // only in that case: setOption with 'not merge mode' and view\n // instance will be recreated, which can be accepted.\n\n\n keyInfo.name = opt.name != null ? opt.name + '' : existCpt ? existCpt.name // Avoid diffferent series has the same name,\n // because name may be used like in color pallet.\n : DUMMY_COMPONENT_NAME_PREFIX + index;\n\n if (existCpt) {\n keyInfo.id = existCpt.id;\n } else if (opt.id != null) {\n keyInfo.id = opt.id + '';\n } else {\n // Consider this situatoin:\n // optionA: [{name: 'a'}, {name: 'a'}, {..}]\n // optionB [{..}, {name: 'a'}, {name: 'a'}]\n // Series with the same name between optionA and optionB\n // should be mapped.\n var idNum = 0;\n\n do {\n keyInfo.id = '\\0' + keyInfo.name + '\\0' + idNum++;\n } while (idMap.get(keyInfo.id));\n }\n\n idMap.set(keyInfo.id, item);\n });\n}\n\nfunction isNameSpecified(componentModel) {\n var name = componentModel.name; // Is specified when `indexOf` get -1 or > 0.\n\n return !!(name && name.indexOf(DUMMY_COMPONENT_NAME_PREFIX));\n}\n/**\n * @public\n * @param {Object} cptOption\n * @return {boolean}\n */\n\n\nfunction isIdInner(cptOption) {\n return isObject(cptOption) && cptOption.id && (cptOption.id + '').indexOf('\\0_ec_\\0') === 0;\n}\n/**\n * A helper for removing duplicate items between batchA and batchB,\n * and in themselves, and categorize by series.\n *\n * @param {Array.} batchA Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...]\n * @param {Array.} batchB Like: [{seriesId: 2, dataIndex: [32, 4, 5]}, ...]\n * @return {Array., Array.>} result: [resultBatchA, resultBatchB]\n */\n\n\nfunction compressBatches(batchA, batchB) {\n var mapA = {};\n var mapB = {};\n makeMap(batchA || [], mapA);\n makeMap(batchB || [], mapB, mapA);\n return [mapToArray(mapA), mapToArray(mapB)];\n\n function makeMap(sourceBatch, map, otherMap) {\n for (var i = 0, len = sourceBatch.length; i < len; i++) {\n var seriesId = sourceBatch[i].seriesId;\n var dataIndices = normalizeToArray(sourceBatch[i].dataIndex);\n var otherDataIndices = otherMap && otherMap[seriesId];\n\n for (var j = 0, lenj = dataIndices.length; j < lenj; j++) {\n var dataIndex = dataIndices[j];\n\n if (otherDataIndices && otherDataIndices[dataIndex]) {\n otherDataIndices[dataIndex] = null;\n } else {\n (map[seriesId] || (map[seriesId] = {}))[dataIndex] = 1;\n }\n }\n }\n }\n\n function mapToArray(map, isData) {\n var result = [];\n\n for (var i in map) {\n if (map.hasOwnProperty(i) && map[i] != null) {\n if (isData) {\n result.push(+i);\n } else {\n var dataIndices = mapToArray(map[i], true);\n dataIndices.length && result.push({\n seriesId: i,\n dataIndex: dataIndices\n });\n }\n }\n }\n\n return result;\n }\n}\n/**\n * @param {module:echarts/data/List} data\n * @param {Object} payload Contains dataIndex (means rawIndex) / dataIndexInside / name\n * each of which can be Array or primary type.\n * @return {number|Array.} dataIndex If not found, return undefined/null.\n */\n\n\nfunction queryDataIndex(data, payload) {\n if (payload.dataIndexInside != null) {\n return payload.dataIndexInside;\n } else if (payload.dataIndex != null) {\n return zrUtil.isArray(payload.dataIndex) ? zrUtil.map(payload.dataIndex, function (value) {\n return data.indexOfRawIndex(value);\n }) : data.indexOfRawIndex(payload.dataIndex);\n } else if (payload.name != null) {\n return zrUtil.isArray(payload.name) ? zrUtil.map(payload.name, function (value) {\n return data.indexOfName(value);\n }) : data.indexOfName(payload.name);\n }\n}\n/**\n * Enable property storage to any host object.\n * Notice: Serialization is not supported.\n *\n * For example:\n * var inner = zrUitl.makeInner();\n *\n * function some1(hostObj) {\n * inner(hostObj).someProperty = 1212;\n * ...\n * }\n * function some2() {\n * var fields = inner(this);\n * fields.someProperty1 = 1212;\n * fields.someProperty2 = 'xx';\n * ...\n * }\n *\n * @return {Function}\n */\n\n\nfunction makeInner() {\n // Consider different scope by es module import.\n var key = '__\\0ec_inner_' + innerUniqueIndex++ + '_' + Math.random().toFixed(5);\n return function (hostObj) {\n return hostObj[key] || (hostObj[key] = {});\n };\n}\n\nvar innerUniqueIndex = 0;\n/**\n * @param {module:echarts/model/Global} ecModel\n * @param {string|Object} finder\n * If string, e.g., 'geo', means {geoIndex: 0}.\n * If Object, could contain some of these properties below:\n * {\n * seriesIndex, seriesId, seriesName,\n * geoIndex, geoId, geoName,\n * bmapIndex, bmapId, bmapName,\n * xAxisIndex, xAxisId, xAxisName,\n * yAxisIndex, yAxisId, yAxisName,\n * gridIndex, gridId, gridName,\n * ... (can be extended)\n * }\n * Each properties can be number|string|Array.|Array.\n * For example, a finder could be\n * {\n * seriesIndex: 3,\n * geoId: ['aa', 'cc'],\n * gridName: ['xx', 'rr']\n * }\n * xxxIndex can be set as 'all' (means all xxx) or 'none' (means not specify)\n * If nothing or null/undefined specified, return nothing.\n * @param {Object} [opt]\n * @param {string} [opt.defaultMainType]\n * @param {Array.} [opt.includeMainTypes]\n * @return {Object} result like:\n * {\n * seriesModels: [seriesModel1, seriesModel2],\n * seriesModel: seriesModel1, // The first model\n * geoModels: [geoModel1, geoModel2],\n * geoModel: geoModel1, // The first model\n * ...\n * }\n */\n\nfunction parseFinder(ecModel, finder, opt) {\n if (zrUtil.isString(finder)) {\n var obj = {};\n obj[finder + 'Index'] = 0;\n finder = obj;\n }\n\n var defaultMainType = opt && opt.defaultMainType;\n\n if (defaultMainType && !has(finder, defaultMainType + 'Index') && !has(finder, defaultMainType + 'Id') && !has(finder, defaultMainType + 'Name')) {\n finder[defaultMainType + 'Index'] = 0;\n }\n\n var result = {};\n each(finder, function (value, key) {\n var value = finder[key]; // Exclude 'dataIndex' and other illgal keys.\n\n if (key === 'dataIndex' || key === 'dataIndexInside') {\n result[key] = value;\n return;\n }\n\n var parsedKey = key.match(/^(\\w+)(Index|Id|Name)$/) || [];\n var mainType = parsedKey[1];\n var queryType = (parsedKey[2] || '').toLowerCase();\n\n if (!mainType || !queryType || value == null || queryType === 'index' && value === 'none' || opt && opt.includeMainTypes && zrUtil.indexOf(opt.includeMainTypes, mainType) < 0) {\n return;\n }\n\n var queryParam = {\n mainType: mainType\n };\n\n if (queryType !== 'index' || value !== 'all') {\n queryParam[queryType] = value;\n }\n\n var models = ecModel.queryComponents(queryParam);\n result[mainType + 'Models'] = models;\n result[mainType + 'Model'] = models[0];\n });\n return result;\n}\n\nfunction has(obj, prop) {\n return obj && obj.hasOwnProperty(prop);\n}\n\nfunction setAttribute(dom, key, value) {\n dom.setAttribute ? dom.setAttribute(key, value) : dom[key] = value;\n}\n\nfunction getAttribute(dom, key) {\n return dom.getAttribute ? dom.getAttribute(key) : dom[key];\n}\n\nfunction getTooltipRenderMode(renderModeOption) {\n if (renderModeOption === 'auto') {\n // Using html when `document` exists, use richText otherwise\n return env.domSupported ? 'html' : 'richText';\n } else {\n return renderModeOption || 'html';\n }\n}\n/**\n * Group a list by key.\n *\n * @param {Array} array\n * @param {Function} getKey\n * param {*} Array item\n * return {string} key\n * @return {Object} Result\n * {Array}: keys,\n * {module:zrender/core/util/HashMap} buckets: {key -> Array}\n */\n\n\nfunction groupData(array, getKey) {\n var buckets = zrUtil.createHashMap();\n var keys = [];\n zrUtil.each(array, function (item) {\n var key = getKey(item);\n (buckets.get(key) || (keys.push(key), buckets.set(key, []))).push(item);\n });\n return {\n keys: keys,\n buckets: buckets\n };\n}\n\nexports.normalizeToArray = normalizeToArray;\nexports.defaultEmphasis = defaultEmphasis;\nexports.TEXT_STYLE_OPTIONS = TEXT_STYLE_OPTIONS;\nexports.getDataItemValue = getDataItemValue;\nexports.isDataItemOption = isDataItemOption;\nexports.mappingToExists = mappingToExists;\nexports.makeIdAndName = makeIdAndName;\nexports.isNameSpecified = isNameSpecified;\nexports.isIdInner = isIdInner;\nexports.compressBatches = compressBatches;\nexports.queryDataIndex = queryDataIndex;\nexports.makeInner = makeInner;\nexports.parseFinder = parseFinder;\nexports.setAttribute = setAttribute;\nexports.getAttribute = getAttribute;\nexports.getTooltipRenderMode = getTooltipRenderMode;\nexports.groupData = groupData;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\nvar clazzUtil = require(\"../util/clazz\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * // Scale class management\n * @module echarts/scale/Scale\n */\n\n/**\n * @param {Object} [setting]\n */\nfunction Scale(setting) {\n this._setting = setting || {};\n /**\n * Extent\n * @type {Array.}\n * @protected\n */\n\n this._extent = [Infinity, -Infinity];\n /**\n * Step is calculated in adjustExtent\n * @type {Array.}\n * @protected\n */\n\n this._interval = 0;\n this.init && this.init.apply(this, arguments);\n}\n/**\n * Parse input val to valid inner number.\n * @param {*} val\n * @return {number}\n */\n\n\nScale.prototype.parse = function (val) {\n // Notice: This would be a trap here, If the implementation\n // of this method depends on extent, and this method is used\n // before extent set (like in dataZoom), it would be wrong.\n // Nevertheless, parse does not depend on extent generally.\n return val;\n};\n\nScale.prototype.getSetting = function (name) {\n return this._setting[name];\n};\n\nScale.prototype.contain = function (val) {\n var extent = this._extent;\n return val >= extent[0] && val <= extent[1];\n};\n/**\n * Normalize value to linear [0, 1], return 0.5 if extent span is 0\n * @param {number} val\n * @return {number}\n */\n\n\nScale.prototype.normalize = function (val) {\n var extent = this._extent;\n\n if (extent[1] === extent[0]) {\n return 0.5;\n }\n\n return (val - extent[0]) / (extent[1] - extent[0]);\n};\n/**\n * Scale normalized value\n * @param {number} val\n * @return {number}\n */\n\n\nScale.prototype.scale = function (val) {\n var extent = this._extent;\n return val * (extent[1] - extent[0]) + extent[0];\n};\n/**\n * Set extent from data\n * @param {Array.} other\n */\n\n\nScale.prototype.unionExtent = function (other) {\n var extent = this._extent;\n other[0] < extent[0] && (extent[0] = other[0]);\n other[1] > extent[1] && (extent[1] = other[1]); // not setExtent because in log axis it may transformed to power\n // this.setExtent(extent[0], extent[1]);\n};\n/**\n * Set extent from data\n * @param {module:echarts/data/List} data\n * @param {string} dim\n */\n\n\nScale.prototype.unionExtentFromData = function (data, dim) {\n this.unionExtent(data.getApproximateExtent(dim));\n};\n/**\n * Get extent\n * @return {Array.}\n */\n\n\nScale.prototype.getExtent = function () {\n return this._extent.slice();\n};\n/**\n * Set extent\n * @param {number} start\n * @param {number} end\n */\n\n\nScale.prototype.setExtent = function (start, end) {\n var thisExtent = this._extent;\n\n if (!isNaN(start)) {\n thisExtent[0] = start;\n }\n\n if (!isNaN(end)) {\n thisExtent[1] = end;\n }\n};\n/**\n * When axis extent depends on data and no data exists,\n * axis ticks should not be drawn, which is named 'blank'.\n */\n\n\nScale.prototype.isBlank = function () {\n return this._isBlank;\n},\n/**\n * When axis extent depends on data and no data exists,\n * axis ticks should not be drawn, which is named 'blank'.\n */\nScale.prototype.setBlank = function (isBlank) {\n this._isBlank = isBlank;\n};\n/**\n * @abstract\n * @param {*} tick\n * @return {string} label of the tick.\n */\n\nScale.prototype.getLabel = null;\nclazzUtil.enableClassExtend(Scale);\nclazzUtil.enableClassManagement(Scale, {\n registerWhenExtend: true\n});\nvar _default = Scale;\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 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\nvar _model = require(\"../../util/model\");\n\nvar makeInner = _model.makeInner;\nvar normalizeToArray = _model.normalizeToArray;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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();\n\nfunction getNearestColorPalette(colors, requestColorNum) {\n var paletteNum = colors.length; // TODO colors must be in order\n\n for (var i = 0; i < paletteNum; i++) {\n if (colors[i].length > requestColorNum) {\n return colors[i];\n }\n }\n\n return colors[paletteNum - 1];\n}\n\nvar _default = {\n clearColorPalette: function () {\n inner(this).colorIdx = 0;\n inner(this).colorNameMap = {};\n },\n\n /**\n * @param {string} name MUST NOT be null/undefined. Otherwise call this function\n * twise with the same parameters will get different result.\n * @param {Object} [scope=this]\n * @param {Object} [requestColorNum]\n * @return {string} color string.\n */\n getColorFromPalette: function (name, scope, requestColorNum) {\n scope = scope || this;\n var scopeFields = inner(scope);\n var colorIdx = scopeFields.colorIdx || 0;\n var colorNameMap = scopeFields.colorNameMap = scopeFields.colorNameMap || {}; // Use `hasOwnProperty` to avoid conflict with Object.prototype.\n\n if (colorNameMap.hasOwnProperty(name)) {\n return colorNameMap[name];\n }\n\n var defaultColorPalette = normalizeToArray(this.get('color', true));\n var layeredColorPalette = this.get('colorLayer', true);\n var colorPalette = requestColorNum == null || !layeredColorPalette ? defaultColorPalette : getNearestColorPalette(layeredColorPalette, requestColorNum); // In case can't find in layered color palette.\n\n colorPalette = colorPalette || defaultColorPalette;\n\n if (!colorPalette || !colorPalette.length) {\n return;\n }\n\n var color = colorPalette[colorIdx];\n\n if (name) {\n colorNameMap[name] = color;\n }\n\n scopeFields.colorIdx = (colorIdx + 1) % colorPalette.length;\n return 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\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;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 Group = require(\"zrender/lib/container/Group\");\n\nvar componentUtil = require(\"../util/component\");\n\nvar clazzUtil = require(\"../util/clazz\");\n\nvar modelUtil = require(\"../util/model\");\n\nvar graphicUtil = require(\"../util/graphic\");\n\nvar _task = require(\"../stream/task\");\n\nvar createTask = _task.createTask;\n\nvar createRenderPlanner = require(\"../chart/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 inner = modelUtil.makeInner();\nvar renderPlanner = createRenderPlanner();\n\nfunction Chart() {\n /**\n * @type {module:zrender/container/Group}\n * @readOnly\n */\n this.group = new Group();\n /**\n * @type {string}\n * @readOnly\n */\n\n this.uid = componentUtil.getUID('viewChart');\n this.renderTask = createTask({\n plan: renderTaskPlan,\n reset: renderTaskReset\n });\n this.renderTask.context = {\n view: this\n };\n}\n\nChart.prototype = {\n type: 'chart',\n\n /**\n * Init the chart.\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n */\n init: function (ecModel, api) {},\n\n /**\n * Render the chart.\n * @param {module:echarts/model/Series} seriesModel\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n * @param {Object} payload\n */\n render: function (seriesModel, ecModel, api, payload) {},\n\n /**\n * Highlight series or specified data item.\n * @param {module:echarts/model/Series} seriesModel\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n * @param {Object} payload\n */\n highlight: function (seriesModel, ecModel, api, payload) {\n toggleHighlight(seriesModel.getData(), payload, 'emphasis');\n },\n\n /**\n * Downplay series or specified data item.\n * @param {module:echarts/model/Series} seriesModel\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n * @param {Object} payload\n */\n downplay: function (seriesModel, ecModel, api, payload) {\n toggleHighlight(seriesModel.getData(), payload, 'normal');\n },\n\n /**\n * Remove self.\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n */\n remove: function (ecModel, api) {\n this.group.removeAll();\n },\n\n /**\n * Dispose self.\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n */\n dispose: function () {},\n\n /**\n * Rendering preparation in progressive mode.\n * @param {module:echarts/model/Series} seriesModel\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n * @param {Object} payload\n */\n incrementalPrepareRender: null,\n\n /**\n * Render in progressive mode.\n * @param {Object} params See taskParams in `stream/task.js`\n * @param {module:echarts/model/Series} seriesModel\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n * @param {Object} payload\n */\n incrementalRender: null,\n\n /**\n * Update transform directly.\n * @param {module:echarts/model/Series} seriesModel\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n * @param {Object} payload\n * @return {Object} {update: true}\n */\n updateTransform: null,\n\n /**\n * The view contains the given point.\n * @interface\n * @param {Array.} point\n * @return {boolean}\n */\n // containPoint: function () {}\n\n /**\n * @param {string} eventType\n * @param {Object} query\n * @param {module:zrender/Element} targetEl\n * @param {Object} packedEvent\n * @return {boolen} Pass only when return `true`.\n */\n filterForExposedEvent: null\n};\nvar chartProto = Chart.prototype;\n\nchartProto.updateView = chartProto.updateLayout = chartProto.updateVisual = function (seriesModel, ecModel, api, payload) {\n this.render(seriesModel, ecModel, api, payload);\n};\n/**\n * Set state of single element\n * @param {module:zrender/Element} el\n * @param {string} state 'normal'|'emphasis'\n * @param {number} highlightDigit\n */\n\n\nfunction elSetState(el, state, highlightDigit) {\n if (el) {\n el.trigger(state, highlightDigit);\n\n if (el.isGroup // Simple optimize.\n && !graphicUtil.isHighDownDispatcher(el)) {\n for (var i = 0, len = el.childCount(); i < len; i++) {\n elSetState(el.childAt(i), state, highlightDigit);\n }\n }\n }\n}\n/**\n * @param {module:echarts/data/List} data\n * @param {Object} payload\n * @param {string} state 'normal'|'emphasis'\n */\n\n\nfunction toggleHighlight(data, payload, state) {\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n var highlightDigit = payload && payload.highlightKey != null ? graphicUtil.getHighlightDigit(payload.highlightKey) : null;\n\n if (dataIndex != null) {\n each(modelUtil.normalizeToArray(dataIndex), function (dataIdx) {\n elSetState(data.getItemGraphicEl(dataIdx), state, highlightDigit);\n });\n } else {\n data.eachItemGraphicEl(function (el) {\n elSetState(el, state, highlightDigit);\n });\n }\n} // Enable Chart.extend.\n\n\nclazzUtil.enableClassExtend(Chart, ['dispose']); // Add capability of registerClass, getClass, hasClass, registerSubTypeDefaulter and so on.\n\nclazzUtil.enableClassManagement(Chart, {\n registerWhenExtend: true\n});\n\nChart.markUpdateMethod = function (payload, methodName) {\n inner(payload).updateMethod = methodName;\n};\n\nfunction renderTaskPlan(context) {\n return renderPlanner(context.model);\n}\n\nfunction renderTaskReset(context) {\n var seriesModel = context.model;\n var ecModel = context.ecModel;\n var api = context.api;\n var payload = context.payload; // ???! remove updateView updateVisual\n\n var progressiveRender = seriesModel.pipelineContext.progressiveRender;\n var view = context.view;\n var updateMethod = payload && inner(payload).updateMethod;\n var methodName = progressiveRender ? 'incrementalPrepareRender' : updateMethod && view[updateMethod] ? updateMethod // `appendData` is also supported when data amount\n // is less than progressive threshold.\n : 'render';\n\n if (methodName !== 'render') {\n view[methodName](seriesModel, ecModel, api, payload);\n }\n\n return progressMethodMap[methodName];\n}\n\nvar progressMethodMap = {\n incrementalPrepareRender: {\n progress: function (params, context) {\n context.view.incrementalRender(params, context.model, context.ecModel, context.api, context.payload);\n }\n },\n render: {\n // Put view.render in `progress` to support appendData. But in this case\n // view.render should not be called in reset, otherwise it will be called\n // twise. Use `forceFirstProgress` to make sure that view.render is called\n // in any cases.\n forceFirstProgress: true,\n progress: function (params, context) {\n context.view.render(context.model, context.ecModel, context.api, context.payload);\n }\n }\n};\nvar _default = Chart;\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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar _model = require(\"../../util/model\");\n\nvar makeInner = _model.makeInner;\n\nvar modelHelper = require(\"./modelHelper\");\n\nvar findPointFromSeries = require(\"./findPointFromSeries\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 curry = zrUtil.curry;\nvar inner = makeInner();\n/**\n * Basic logic: check all axis, if they do not demand show/highlight,\n * then hide/downplay them.\n *\n * @param {Object} coordSysAxesInfo\n * @param {Object} payload\n * @param {string} [payload.currTrigger] 'click' | 'mousemove' | 'leave'\n * @param {Array.} [payload.x] x and y, which are mandatory, specify a point to\n * trigger axisPointer and tooltip.\n * @param {Array.} [payload.y] x and y, which are mandatory, specify a point to\n * trigger axisPointer and tooltip.\n * @param {Object} [payload.seriesIndex] finder, optional, restrict target axes.\n * @param {Object} [payload.dataIndex] finder, restrict target axes.\n * @param {Object} [payload.axesInfo] finder, restrict target axes.\n * [{\n * axisDim: 'x'|'y'|'angle'|...,\n * axisIndex: ...,\n * value: ...\n * }, ...]\n * @param {Function} [payload.dispatchAction]\n * @param {Object} [payload.tooltipOption]\n * @param {Object|Array.|Function} [payload.position] Tooltip position,\n * which can be specified in dispatchAction\n * @param {module:echarts/model/Global} ecModel\n * @param {module:echarts/ExtensionAPI} api\n * @return {Object} content of event obj for echarts.connect.\n */\n\nfunction _default(payload, ecModel, api) {\n var currTrigger = payload.currTrigger;\n var point = [payload.x, payload.y];\n var finder = payload;\n var dispatchAction = payload.dispatchAction || zrUtil.bind(api.dispatchAction, api);\n var coordSysAxesInfo = ecModel.getComponent('axisPointer').coordSysAxesInfo; // Pending\n // See #6121. But we are not able to reproduce it yet.\n\n if (!coordSysAxesInfo) {\n return;\n }\n\n if (illegalPoint(point)) {\n // Used in the default behavior of `connection`: use the sample seriesIndex\n // and dataIndex. And also used in the tooltipView trigger.\n point = findPointFromSeries({\n seriesIndex: finder.seriesIndex,\n // Do not use dataIndexInside from other ec instance.\n // FIXME: auto detect it?\n dataIndex: finder.dataIndex\n }, ecModel).point;\n }\n\n var isIllegalPoint = illegalPoint(point); // Axis and value can be specified when calling dispatchAction({type: 'updateAxisPointer'}).\n // Notice: In this case, it is difficult to get the `point` (which is necessary to show\n // tooltip, so if point is not given, we just use the point found by sample seriesIndex\n // and dataIndex.\n\n var inputAxesInfo = finder.axesInfo;\n var axesInfo = coordSysAxesInfo.axesInfo;\n var shouldHide = currTrigger === 'leave' || illegalPoint(point);\n var outputFinder = {};\n var showValueMap = {};\n var dataByCoordSys = {\n list: [],\n map: {}\n };\n var updaters = {\n showPointer: curry(showPointer, showValueMap),\n showTooltip: curry(showTooltip, dataByCoordSys)\n }; // Process for triggered axes.\n\n each(coordSysAxesInfo.coordSysMap, function (coordSys, coordSysKey) {\n // If a point given, it must be contained by the coordinate system.\n var coordSysContainsPoint = isIllegalPoint || coordSys.containPoint(point);\n each(coordSysAxesInfo.coordSysAxesInfo[coordSysKey], function (axisInfo, key) {\n var axis = axisInfo.axis;\n var inputAxisInfo = findInputAxisInfo(inputAxesInfo, axisInfo); // If no inputAxesInfo, no axis is restricted.\n\n if (!shouldHide && coordSysContainsPoint && (!inputAxesInfo || inputAxisInfo)) {\n var val = inputAxisInfo && inputAxisInfo.value;\n\n if (val == null && !isIllegalPoint) {\n val = axis.pointToData(point);\n }\n\n val != null && processOnAxis(axisInfo, val, updaters, false, outputFinder);\n }\n });\n }); // Process for linked axes.\n\n var linkTriggers = {};\n each(axesInfo, function (tarAxisInfo, tarKey) {\n var linkGroup = tarAxisInfo.linkGroup; // If axis has been triggered in the previous stage, it should not be triggered by link.\n\n if (linkGroup && !showValueMap[tarKey]) {\n each(linkGroup.axesInfo, function (srcAxisInfo, srcKey) {\n var srcValItem = showValueMap[srcKey]; // If srcValItem exist, source axis is triggered, so link to target axis.\n\n if (srcAxisInfo !== tarAxisInfo && srcValItem) {\n var val = srcValItem.value;\n linkGroup.mapper && (val = tarAxisInfo.axis.scale.parse(linkGroup.mapper(val, makeMapperParam(srcAxisInfo), makeMapperParam(tarAxisInfo))));\n linkTriggers[tarAxisInfo.key] = val;\n }\n });\n }\n });\n each(linkTriggers, function (val, tarKey) {\n processOnAxis(axesInfo[tarKey], val, updaters, true, outputFinder);\n });\n updateModelActually(showValueMap, axesInfo, outputFinder);\n dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction);\n dispatchHighDownActually(axesInfo, dispatchAction, api);\n return outputFinder;\n}\n\nfunction processOnAxis(axisInfo, newValue, updaters, dontSnap, outputFinder) {\n var axis = axisInfo.axis;\n\n if (axis.scale.isBlank() || !axis.containData(newValue)) {\n return;\n }\n\n if (!axisInfo.involveSeries) {\n updaters.showPointer(axisInfo, newValue);\n return;\n } // Heavy calculation. So put it after axis.containData checking.\n\n\n var payloadInfo = buildPayloadsBySeries(newValue, axisInfo);\n var payloadBatch = payloadInfo.payloadBatch;\n var snapToValue = payloadInfo.snapToValue; // Fill content of event obj for echarts.connect.\n // By default use the first involved series data as a sample to connect.\n\n if (payloadBatch[0] && outputFinder.seriesIndex == null) {\n zrUtil.extend(outputFinder, payloadBatch[0]);\n } // If no linkSource input, this process is for collecting link\n // target, where snap should not be accepted.\n\n\n if (!dontSnap && axisInfo.snap) {\n if (axis.containData(snapToValue) && snapToValue != null) {\n newValue = snapToValue;\n }\n }\n\n updaters.showPointer(axisInfo, newValue, payloadBatch, outputFinder); // Tooltip should always be snapToValue, otherwise there will be\n // incorrect \"axis value ~ series value\" mapping displayed in tooltip.\n\n updaters.showTooltip(axisInfo, payloadInfo, snapToValue);\n}\n\nfunction buildPayloadsBySeries(value, axisInfo) {\n var axis = axisInfo.axis;\n var dim = axis.dim;\n var snapToValue = value;\n var payloadBatch = [];\n var minDist = Number.MAX_VALUE;\n var minDiff = -1;\n each(axisInfo.seriesModels, function (series, idx) {\n var dataDim = series.getData().mapDimension(dim, true);\n var seriesNestestValue;\n var dataIndices;\n\n if (series.getAxisTooltipData) {\n var result = series.getAxisTooltipData(dataDim, value, axis);\n dataIndices = result.dataIndices;\n seriesNestestValue = result.nestestValue;\n } else {\n dataIndices = series.getData().indicesOfNearest(dataDim[0], value, // Add a threshold to avoid find the wrong dataIndex\n // when data length is not same.\n // false,\n axis.type === 'category' ? 0.5 : null);\n\n if (!dataIndices.length) {\n return;\n }\n\n seriesNestestValue = series.getData().get(dataDim[0], dataIndices[0]);\n }\n\n if (seriesNestestValue == null || !isFinite(seriesNestestValue)) {\n return;\n }\n\n var diff = value - seriesNestestValue;\n var dist = Math.abs(diff); // Consider category case\n\n if (dist <= minDist) {\n if (dist < minDist || diff >= 0 && minDiff < 0) {\n minDist = dist;\n minDiff = diff;\n snapToValue = seriesNestestValue;\n payloadBatch.length = 0;\n }\n\n each(dataIndices, function (dataIndex) {\n payloadBatch.push({\n seriesIndex: series.seriesIndex,\n dataIndexInside: dataIndex,\n dataIndex: series.getData().getRawIndex(dataIndex)\n });\n });\n }\n });\n return {\n payloadBatch: payloadBatch,\n snapToValue: snapToValue\n };\n}\n\nfunction showPointer(showValueMap, axisInfo, value, payloadBatch) {\n showValueMap[axisInfo.key] = {\n value: value,\n payloadBatch: payloadBatch\n };\n}\n\nfunction showTooltip(dataByCoordSys, axisInfo, payloadInfo, value) {\n var payloadBatch = payloadInfo.payloadBatch;\n var axis = axisInfo.axis;\n var axisModel = axis.model;\n var axisPointerModel = axisInfo.axisPointerModel; // If no data, do not create anything in dataByCoordSys,\n // whose length will be used to judge whether dispatch action.\n\n if (!axisInfo.triggerTooltip || !payloadBatch.length) {\n return;\n }\n\n var coordSysModel = axisInfo.coordSys.model;\n var coordSysKey = modelHelper.makeKey(coordSysModel);\n var coordSysItem = dataByCoordSys.map[coordSysKey];\n\n if (!coordSysItem) {\n coordSysItem = dataByCoordSys.map[coordSysKey] = {\n coordSysId: coordSysModel.id,\n coordSysIndex: coordSysModel.componentIndex,\n coordSysType: coordSysModel.type,\n coordSysMainType: coordSysModel.mainType,\n dataByAxis: []\n };\n dataByCoordSys.list.push(coordSysItem);\n }\n\n coordSysItem.dataByAxis.push({\n axisDim: axis.dim,\n axisIndex: axisModel.componentIndex,\n axisType: axisModel.type,\n axisId: axisModel.id,\n value: value,\n // Caustion: viewHelper.getValueLabel is actually on \"view stage\", which\n // depends that all models have been updated. So it should not be performed\n // here. Considering axisPointerModel used here is volatile, which is hard\n // to be retrieve in TooltipView, we prepare parameters here.\n valueLabelOpt: {\n precision: axisPointerModel.get('label.precision'),\n formatter: axisPointerModel.get('label.formatter')\n },\n seriesDataIndices: payloadBatch.slice()\n });\n}\n\nfunction updateModelActually(showValueMap, axesInfo, outputFinder) {\n var outputAxesInfo = outputFinder.axesInfo = []; // Basic logic: If no 'show' required, 'hide' this axisPointer.\n\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n var valItem = showValueMap[key];\n\n if (valItem) {\n !axisInfo.useHandle && (option.status = 'show');\n option.value = valItem.value; // For label formatter param and highlight.\n\n option.seriesDataIndices = (valItem.payloadBatch || []).slice();\n } // When always show (e.g., handle used), remain\n // original value and status.\n else {\n // If hide, value still need to be set, consider\n // click legend to toggle axis blank.\n !axisInfo.useHandle && (option.status = 'hide');\n } // If status is 'hide', should be no info in payload.\n\n\n option.status === 'show' && outputAxesInfo.push({\n axisDim: axisInfo.axis.dim,\n axisIndex: axisInfo.axis.model.componentIndex,\n value: option.value\n });\n });\n}\n\nfunction dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction) {\n // Basic logic: If no showTip required, hideTip will be dispatched.\n if (illegalPoint(point) || !dataByCoordSys.list.length) {\n dispatchAction({\n type: 'hideTip'\n });\n return;\n } // In most case only one axis (or event one series is used). It is\n // convinient to fetch payload.seriesIndex and payload.dataIndex\n // dirtectly. So put the first seriesIndex and dataIndex of the first\n // axis on the payload.\n\n\n var sampleItem = ((dataByCoordSys.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};\n dispatchAction({\n type: 'showTip',\n escapeConnect: true,\n x: point[0],\n y: point[1],\n tooltipOption: payload.tooltipOption,\n position: payload.position,\n dataIndexInside: sampleItem.dataIndexInside,\n dataIndex: sampleItem.dataIndex,\n seriesIndex: sampleItem.seriesIndex,\n dataByCoordSys: dataByCoordSys.list\n });\n}\n\nfunction dispatchHighDownActually(axesInfo, dispatchAction, api) {\n // FIXME\n // highlight status modification shoule be a stage of main process?\n // (Consider confilct (e.g., legend and axisPointer) and setOption)\n var zr = api.getZr();\n var highDownKey = 'axisPointerLastHighlights';\n var lastHighlights = inner(zr)[highDownKey] || {};\n var newHighlights = inner(zr)[highDownKey] = {}; // Update highlight/downplay status according to axisPointer model.\n // Build hash map and remove duplicate incidentally.\n\n each(axesInfo, function (axisInfo, key) {\n var option = axisInfo.axisPointerModel.option;\n option.status === 'show' && each(option.seriesDataIndices, function (batchItem) {\n var key = batchItem.seriesIndex + ' | ' + batchItem.dataIndex;\n newHighlights[key] = batchItem;\n });\n }); // Diff.\n\n var toHighlight = [];\n var toDownplay = [];\n zrUtil.each(lastHighlights, function (batchItem, key) {\n !newHighlights[key] && toDownplay.push(batchItem);\n });\n zrUtil.each(newHighlights, function (batchItem, key) {\n !lastHighlights[key] && toHighlight.push(batchItem);\n });\n toDownplay.length && api.dispatchAction({\n type: 'downplay',\n escapeConnect: true,\n batch: toDownplay\n });\n toHighlight.length && api.dispatchAction({\n type: 'highlight',\n escapeConnect: true,\n batch: toHighlight\n });\n}\n\nfunction findInputAxisInfo(inputAxesInfo, axisInfo) {\n for (var i = 0; i < (inputAxesInfo || []).length; i++) {\n var inputAxisInfo = inputAxesInfo[i];\n\n if (axisInfo.axis.dim === inputAxisInfo.axisDim && axisInfo.axis.model.componentIndex === inputAxisInfo.axisIndex) {\n return inputAxisInfo;\n }\n }\n}\n\nfunction makeMapperParam(axisInfo) {\n var axisModel = axisInfo.axis.model;\n var item = {};\n var dim = item.axisDim = axisInfo.axis.dim;\n item.axisIndex = item[dim + 'AxisIndex'] = axisModel.componentIndex;\n item.axisName = item[dim + 'AxisName'] = axisModel.name;\n item.axisId = item[dim + 'AxisId'] = axisModel.id;\n return item;\n}\n\nfunction illegalPoint(point) {\n return !point || point[0] == null || isNaN(point[0]) || point[1] == null || isNaN(point[1]);\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 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 * 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 Axis2D = 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 */\n\n this.position = position || 'bottom';\n};\n\nAxis2D.prototype = {\n constructor: Axis2D,\n\n /**\n * Index of axis, can be used as key\n */\n index: 0,\n\n /**\n * Implemented in .\n * @return {Array.}\n * If not on zero of other axis, return null/undefined.\n * If no axes, return an empty array.\n */\n getAxesOnZeroOf: null,\n\n /**\n * Axis model\n * @param {module:echarts/coord/cartesian/AxisModel}\n */\n model: null,\n isHorizontal: function () {\n var position = this.position;\n return position === 'top' || position === 'bottom';\n },\n\n /**\n * Each item cooresponds to this.getExtent(), which\n * means globalExtent[0] may greater than globalExtent[1],\n * unless `asc` is input.\n *\n * @param {boolean} [asc]\n * @return {Array.}\n */\n getGlobalExtent: function (asc) {\n var ret = this.getExtent();\n ret[0] = this.toGlobalCoord(ret[0]);\n ret[1] = this.toGlobalCoord(ret[1]);\n asc && ret[0] > ret[1] && ret.reverse();\n return ret;\n },\n getOtherAxis: function () {\n this.grid.getOtherAxis();\n },\n\n /**\n * @override\n */\n pointToData: function (point, clamp) {\n return this.coordToData(this.toLocalCoord(point[this.dim === 'x' ? 0 : 1]), clamp);\n },\n\n /**\n * Transform global coord to local coord,\n * i.e. var localCoord = axis.toLocalCoord(80);\n * designate by module:echarts/coord/cartesian/Grid.\n * @type {Function}\n */\n toLocalCoord: null,\n\n /**\n * Transform global coord to local coord,\n * i.e. var globalCoord = axis.toLocalCoord(40);\n * designate by module:echarts/coord/cartesian/Grid.\n * @type {Function}\n */\n toGlobalCoord: null\n};\nzrUtil.inherits(Axis2D, Axis);\nvar _default = Axis2D;\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 createHashMap = _util.createHashMap;\nvar isString = _util.isString;\nvar isArray = _util.isArray;\nvar each = _util.each;\nvar assert = _util.assert;\n\nvar _parseSVG = require(\"zrender/lib/tool/parseSVG\");\n\nvar parseXML = _parseSVG.parseXML;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 storage = createHashMap(); // For minimize the code size of common echarts package,\n// do not put too much logic in this module.\n\nvar _default = {\n // The format of record: see `echarts.registerMap`.\n // Compatible with previous `echarts.registerMap`.\n registerMap: function (mapName, rawGeoJson, rawSpecialAreas) {\n var records;\n\n if (isArray(rawGeoJson)) {\n records = rawGeoJson;\n } else if (rawGeoJson.svg) {\n records = [{\n type: 'svg',\n source: rawGeoJson.svg,\n specialAreas: rawGeoJson.specialAreas\n }];\n } else {\n // Backward compatibility.\n if (rawGeoJson.geoJson && !rawGeoJson.features) {\n rawSpecialAreas = rawGeoJson.specialAreas;\n rawGeoJson = rawGeoJson.geoJson;\n }\n\n records = [{\n type: 'geoJSON',\n source: rawGeoJson,\n specialAreas: rawSpecialAreas\n }];\n }\n\n each(records, function (record) {\n var type = record.type;\n type === 'geoJson' && (type = record.type = 'geoJSON');\n var parse = parsers[type];\n parse(record);\n });\n return storage.set(mapName, records);\n },\n retrieveMap: function (mapName) {\n return storage.get(mapName);\n }\n};\nvar parsers = {\n geoJSON: function (record) {\n var source = record.source;\n record.geoJSON = !isString(source) ? source : typeof JSON !== 'undefined' && JSON.parse ? JSON.parse(source) : new Function('return (' + source + ');')();\n },\n // Only perform parse to XML object here, which might be time\n // consiming for large SVG.\n // Although convert XML to zrender element is also time consiming,\n // if we do it here, the clone of zrender elements has to be\n // required. So we do it once for each geo instance, util real\n // performance issues call for optimizing it.\n svg: function (record) {\n record.svgXML = parseXML(record.source);\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;\nvar isTypedArray = _util.isTypedArray;\n\nvar _clazz = require(\"../util/clazz\");\n\nvar enableClassCheck = _clazz.enableClassCheck;\n\nvar _sourceType = require(\"./helper/sourceType\");\n\nvar SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL;\nvar SERIES_LAYOUT_BY_COLUMN = _sourceType.SERIES_LAYOUT_BY_COLUMN;\nvar SOURCE_FORMAT_UNKNOWN = _sourceType.SOURCE_FORMAT_UNKNOWN;\nvar SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY;\nvar SOURCE_FORMAT_KEYED_COLUMNS = _sourceType.SOURCE_FORMAT_KEYED_COLUMNS;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * [sourceFormat]\n *\n * + \"original\":\n * This format is only used in series.data, where\n * itemStyle can be specified in data item.\n *\n * + \"arrayRows\":\n * [\n * ['product', 'score', 'amount'],\n * ['Matcha Latte', 89.3, 95.8],\n * ['Milk Tea', 92.1, 89.4],\n * ['Cheese Cocoa', 94.4, 91.2],\n * ['Walnut Brownie', 85.4, 76.9]\n * ]\n *\n * + \"objectRows\":\n * [\n * {product: 'Matcha Latte', score: 89.3, amount: 95.8},\n * {product: 'Milk Tea', score: 92.1, amount: 89.4},\n * {product: 'Cheese Cocoa', score: 94.4, amount: 91.2},\n * {product: 'Walnut Brownie', score: 85.4, amount: 76.9}\n * ]\n *\n * + \"keyedColumns\":\n * {\n * 'product': ['Matcha Latte', 'Milk Tea', 'Cheese Cocoa', 'Walnut Brownie'],\n * 'count': [823, 235, 1042, 988],\n * 'score': [95.8, 81.4, 91.2, 76.9]\n * }\n *\n * + \"typedArray\"\n *\n * + \"unknown\"\n */\n\n/**\n * @constructor\n * @param {Object} fields\n * @param {string} fields.sourceFormat\n * @param {Array|Object} fields.fromDataset\n * @param {Array|Object} [fields.data]\n * @param {string} [seriesLayoutBy='column']\n * @param {Array.} [dimensionsDefine]\n * @param {Objet|HashMap} [encodeDefine]\n * @param {number} [startIndex=0]\n * @param {number} [dimensionsDetectCount]\n */\nfunction Source(fields) {\n /**\n * @type {boolean}\n */\n this.fromDataset = fields.fromDataset;\n /**\n * Not null/undefined.\n * @type {Array|Object}\n */\n\n this.data = fields.data || (fields.sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS ? {} : []);\n /**\n * See also \"detectSourceFormat\".\n * Not null/undefined.\n * @type {string}\n */\n\n this.sourceFormat = fields.sourceFormat || SOURCE_FORMAT_UNKNOWN;\n /**\n * 'row' or 'column'\n * Not null/undefined.\n * @type {string} seriesLayoutBy\n */\n\n this.seriesLayoutBy = fields.seriesLayoutBy || SERIES_LAYOUT_BY_COLUMN;\n /**\n * dimensions definition in option.\n * can be null/undefined.\n * @type {Array.}\n */\n\n this.dimensionsDefine = fields.dimensionsDefine;\n /**\n * encode definition in option.\n * can be null/undefined.\n * @type {Objet|HashMap}\n */\n\n this.encodeDefine = fields.encodeDefine && createHashMap(fields.encodeDefine);\n /**\n * Not null/undefined, uint.\n * @type {number}\n */\n\n this.startIndex = fields.startIndex || 0;\n /**\n * Can be null/undefined (when unknown), uint.\n * @type {number}\n */\n\n this.dimensionsDetectCount = fields.dimensionsDetectCount;\n}\n/**\n * Wrap original series data for some compatibility cases.\n */\n\n\nSource.seriesDataToSource = function (data) {\n return new Source({\n data: data,\n sourceFormat: isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL,\n fromDataset: false\n });\n};\n\nenableClassCheck(Source);\nvar _default = Source;\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 _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 textContain = require(\"zrender/lib/contain/text\");\n\nvar numberUtil = require(\"./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// import Text from 'zrender/src/graphic/Text';\n\n/**\n * add commas after every three numbers\n * @param {string|number} x\n * @return {string}\n */\nfunction addCommas(x) {\n if (isNaN(x)) {\n return '-';\n }\n\n x = (x + '').split('.');\n return x[0].replace(/(\\d{1,3})(?=(?:\\d{3})+(?!\\d))/g, '$1,') + (x.length > 1 ? '.' + x[1] : '');\n}\n/**\n * @param {string} str\n * @param {boolean} [upperCaseFirst=false]\n * @return {string} str\n */\n\n\nfunction toCamelCase(str, upperCaseFirst) {\n str = (str || '').toLowerCase().replace(/-(.)/g, function (match, group1) {\n return group1.toUpperCase();\n });\n\n if (upperCaseFirst && str) {\n str = str.charAt(0).toUpperCase() + str.slice(1);\n }\n\n return str;\n}\n\nvar normalizeCssArray = zrUtil.normalizeCssArray;\nvar replaceReg = /([&<>\"'])/g;\nvar replaceMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n '\\'': '''\n};\n\nfunction encodeHTML(source) {\n return source == null ? '' : (source + '').replace(replaceReg, function (str, c) {\n return replaceMap[c];\n });\n}\n\nvar TPL_VAR_ALIAS = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];\n\nvar wrapVar = function (varName, seriesIdx) {\n return '{' + varName + (seriesIdx == null ? '' : seriesIdx) + '}';\n};\n/**\n * Template formatter\n * @param {string} tpl\n * @param {Array.|Object} paramsList\n * @param {boolean} [encode=false]\n * @return {string}\n */\n\n\nfunction formatTpl(tpl, paramsList, encode) {\n if (!zrUtil.isArray(paramsList)) {\n paramsList = [paramsList];\n }\n\n var seriesLen = paramsList.length;\n\n if (!seriesLen) {\n return '';\n }\n\n var $vars = paramsList[0].$vars || [];\n\n for (var i = 0; i < $vars.length; i++) {\n var alias = TPL_VAR_ALIAS[i];\n tpl = tpl.replace(wrapVar(alias), wrapVar(alias, 0));\n }\n\n for (var seriesIdx = 0; seriesIdx < seriesLen; seriesIdx++) {\n for (var k = 0; k < $vars.length; k++) {\n var val = paramsList[seriesIdx][$vars[k]];\n tpl = tpl.replace(wrapVar(TPL_VAR_ALIAS[k], seriesIdx), encode ? encodeHTML(val) : val);\n }\n }\n\n return tpl;\n}\n/**\n * simple Template formatter\n *\n * @param {string} tpl\n * @param {Object} param\n * @param {boolean} [encode=false]\n * @return {string}\n */\n\n\nfunction formatTplSimple(tpl, param, encode) {\n zrUtil.each(param, function (value, key) {\n tpl = tpl.replace('{' + key + '}', encode ? encodeHTML(value) : value);\n });\n return tpl;\n}\n/**\n * @param {Object|string} [opt] If string, means color.\n * @param {string} [opt.color]\n * @param {string} [opt.extraCssText]\n * @param {string} [opt.type='item'] 'item' or 'subItem'\n * @param {string} [opt.renderMode='html'] render mode of tooltip, 'html' or 'richText'\n * @param {string} [opt.markerId='X'] id name for marker. If only one marker is in a rich text, this can be omitted.\n * @return {string}\n */\n\n\nfunction getTooltipMarker(opt, extraCssText) {\n opt = zrUtil.isString(opt) ? {\n color: opt,\n extraCssText: extraCssText\n } : opt || {};\n var color = opt.color;\n var type = opt.type;\n var extraCssText = opt.extraCssText;\n var renderMode = opt.renderMode || 'html';\n var markerId = opt.markerId || 'X';\n\n if (!color) {\n return '';\n }\n\n if (renderMode === 'html') {\n return type === 'subItem' ? '' : '';\n } else {\n // Space for rich element marker\n return {\n renderMode: renderMode,\n content: '{marker' + markerId + '|} ',\n style: {\n color: color\n }\n };\n }\n}\n\nfunction pad(str, len) {\n str += '';\n return '0000'.substr(0, len - str.length) + str;\n}\n/**\n * ISO Date format\n * @param {string} tpl\n * @param {number} value\n * @param {boolean} [isUTC=false] Default in local time.\n * see `module:echarts/scale/Time`\n * and `module:echarts/util/number#parseDate`.\n * @inner\n */\n\n\nfunction formatTime(tpl, value, isUTC) {\n if (tpl === 'week' || tpl === 'month' || tpl === 'quarter' || tpl === 'half-year' || tpl === 'year') {\n tpl = 'MM-dd\\nyyyy';\n }\n\n var date = numberUtil.parseDate(value);\n var utc = isUTC ? 'UTC' : '';\n var y = date['get' + utc + 'FullYear']();\n var M = date['get' + utc + 'Month']() + 1;\n var d = date['get' + utc + 'Date']();\n var h = date['get' + utc + 'Hours']();\n var m = date['get' + utc + 'Minutes']();\n var s = date['get' + utc + 'Seconds']();\n var S = date['get' + utc + 'Milliseconds']();\n tpl = tpl.replace('MM', pad(M, 2)).replace('M', M).replace('yyyy', y).replace('yy', y % 100).replace('dd', pad(d, 2)).replace('d', d).replace('hh', pad(h, 2)).replace('h', h).replace('mm', pad(m, 2)).replace('m', m).replace('ss', pad(s, 2)).replace('s', s).replace('SSS', pad(S, 3));\n return tpl;\n}\n/**\n * Capital first\n * @param {string} str\n * @return {string}\n */\n\n\nfunction capitalFirst(str) {\n return str ? str.charAt(0).toUpperCase() + str.substr(1) : str;\n}\n\nvar truncateText = textContain.truncateText;\n/**\n * @public\n * @param {Object} opt\n * @param {string} opt.text\n * @param {string} opt.font\n * @param {string} [opt.textAlign='left']\n * @param {string} [opt.textVerticalAlign='top']\n * @param {Array.} [opt.textPadding]\n * @param {number} [opt.textLineHeight]\n * @param {Object} [opt.rich]\n * @param {Object} [opt.truncate]\n * @return {Object} {x, y, width, height, lineHeight}\n */\n\nfunction getTextBoundingRect(opt) {\n return textContain.getBoundingRect(opt.text, opt.font, opt.textAlign, opt.textVerticalAlign, opt.textPadding, opt.textLineHeight, opt.rich, opt.truncate);\n}\n/**\n * @deprecated\n * the `textLineHeight` was added later.\n * For backward compatiblility, put it as the last parameter.\n * But deprecated this interface. Please use `getTextBoundingRect` instead.\n */\n\n\nfunction getTextRect(text, font, textAlign, textVerticalAlign, textPadding, rich, truncate, textLineHeight) {\n return textContain.getBoundingRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate);\n}\n/**\n * open new tab\n * @param {string} link url\n * @param {string} target blank or self\n */\n\n\nfunction windowOpen(link, target) {\n if (target === '_blank' || target === 'blank') {\n var blank = window.open();\n blank.opener = null;\n blank.location = link;\n } else {\n window.open(link, target);\n }\n}\n\nexports.addCommas = addCommas;\nexports.toCamelCase = toCamelCase;\nexports.normalizeCssArray = normalizeCssArray;\nexports.encodeHTML = encodeHTML;\nexports.formatTpl = formatTpl;\nexports.formatTplSimple = formatTplSimple;\nexports.getTooltipMarker = getTooltipMarker;\nexports.formatTime = formatTime;\nexports.capitalFirst = capitalFirst;\nexports.truncateText = truncateText;\nexports.getTextBoundingRect = getTextBoundingRect;\nexports.getTextRect = getTextRect;\nexports.windowOpen = windowOpen;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 _util = require(\"zrender/lib/core/util\");\n\nvar each = _util.each;\nvar isString = _util.isString;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 * Note that it is too complicated to support 3d stack by value\n * (have to create two-dimension inverted index), so in 3d case\n * we just support that stacked by index.\n *\n * @param {module:echarts/model/Series} seriesModel\n * @param {Array.} dimensionInfoList The same as the input of .\n * The input dimensionInfoList will be modified.\n * @param {Object} [opt]\n * @param {boolean} [opt.stackedCoordDimension=''] Specify a coord dimension if needed.\n * @param {boolean} [opt.byIndex=false]\n * @return {Object} calculationInfo\n * {\n * stackedDimension: string\n * stackedByDimension: string\n * isStackedByIndex: boolean\n * stackedOverDimension: string\n * stackResultDimension: string\n * }\n */\nfunction enableDataStack(seriesModel, dimensionInfoList, opt) {\n opt = opt || {};\n var byIndex = opt.byIndex;\n var stackedCoordDimension = opt.stackedCoordDimension; // Compatibal: when `stack` is set as '', do not stack.\n\n var mayStack = !!(seriesModel && seriesModel.get('stack'));\n var stackedByDimInfo;\n var stackedDimInfo;\n var stackResultDimension;\n var stackedOverDimension;\n each(dimensionInfoList, function (dimensionInfo, index) {\n if (isString(dimensionInfo)) {\n dimensionInfoList[index] = dimensionInfo = {\n name: dimensionInfo\n };\n }\n\n if (mayStack && !dimensionInfo.isExtraCoord) {\n // Find the first ordinal dimension as the stackedByDimInfo.\n if (!byIndex && !stackedByDimInfo && dimensionInfo.ordinalMeta) {\n stackedByDimInfo = dimensionInfo;\n } // Find the first stackable dimension as the stackedDimInfo.\n\n\n if (!stackedDimInfo && dimensionInfo.type !== 'ordinal' && dimensionInfo.type !== 'time' && (!stackedCoordDimension || stackedCoordDimension === dimensionInfo.coordDim)) {\n stackedDimInfo = dimensionInfo;\n }\n }\n });\n\n if (stackedDimInfo && !byIndex && !stackedByDimInfo) {\n // Compatible with previous design, value axis (time axis) only stack by index.\n // It may make sense if the user provides elaborately constructed data.\n byIndex = true;\n } // Add stack dimension, they can be both calculated by coordinate system in `unionExtent`.\n // That put stack logic in List is for using conveniently in echarts extensions, but it\n // might not be a good way.\n\n\n if (stackedDimInfo) {\n // Use a weird name that not duplicated with other names.\n stackResultDimension = '__\\0ecstackresult';\n stackedOverDimension = '__\\0ecstackedover'; // Create inverted index to fast query index by value.\n\n if (stackedByDimInfo) {\n stackedByDimInfo.createInvertedIndices = true;\n }\n\n var stackedDimCoordDim = stackedDimInfo.coordDim;\n var stackedDimType = stackedDimInfo.type;\n var stackedDimCoordIndex = 0;\n each(dimensionInfoList, function (dimensionInfo) {\n if (dimensionInfo.coordDim === stackedDimCoordDim) {\n stackedDimCoordIndex++;\n }\n });\n dimensionInfoList.push({\n name: stackResultDimension,\n coordDim: stackedDimCoordDim,\n coordDimIndex: stackedDimCoordIndex,\n type: stackedDimType,\n isExtraCoord: true,\n isCalculationCoord: true\n });\n stackedDimCoordIndex++;\n dimensionInfoList.push({\n name: stackedOverDimension,\n // This dimension contains stack base (generally, 0), so do not set it as\n // `stackedDimCoordDim` to avoid extent calculation, consider log scale.\n coordDim: stackedOverDimension,\n coordDimIndex: stackedDimCoordIndex,\n type: stackedDimType,\n isExtraCoord: true,\n isCalculationCoord: true\n });\n }\n\n return {\n stackedDimension: stackedDimInfo && stackedDimInfo.name,\n stackedByDimension: stackedByDimInfo && stackedByDimInfo.name,\n isStackedByIndex: byIndex,\n stackedOverDimension: stackedOverDimension,\n stackResultDimension: stackResultDimension\n };\n}\n/**\n * @param {module:echarts/data/List} data\n * @param {string} stackedDim\n */\n\n\nfunction isDimensionStacked(data, stackedDim\n/*, stackedByDim*/\n) {\n // Each single series only maps to one pair of axis. So we do not need to\n // check stackByDim, whatever stacked by a dimension or stacked by index.\n return !!stackedDim && stackedDim === data.getCalculationInfo('stackedDimension'); // && (\n // stackedByDim != null\n // ? stackedByDim === data.getCalculationInfo('stackedByDimension')\n // : data.getCalculationInfo('isStackedByIndex')\n // );\n}\n/**\n * @param {module:echarts/data/List} data\n * @param {string} targetDim\n * @param {string} [stackedByDim] If not input this parameter, check whether\n * stacked by index.\n * @return {string} dimension\n */\n\n\nfunction getStackedDimension(data, targetDim) {\n return isDimensionStacked(data, targetDim) ? data.getCalculationInfo('stackResultDimension') : targetDim;\n}\n\nexports.enableDataStack = enableDataStack;\nexports.isDimensionStacked = isDimensionStacked;\nexports.getStackedDimension = getStackedDimension;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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(\"./line/LineSeries\");\n\nrequire(\"./line/LineView\");\n\nvar visualSymbol = require(\"../visual/symbol\");\n\nvar layoutPoints = require(\"../layout/points\");\n\nvar dataSample = require(\"../processor/dataSample\");\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.registerVisual(visualSymbol('line', 'circle', 'line'));\necharts.registerLayout(layoutPoints('line')); // Down sample after filter\n\necharts.registerProcessor(echarts.PRIORITY.PROCESSOR.STATISTIC, dataSample('line'));","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 _helper = require(\"./helper\");\n\nvar prepareDataCoordInfo = _helper.prepareDataCoordInfo;\nvar getStackedOnPoint = _helper.getStackedOnPoint;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 arrayDiff = require('zrender/src/core/arrayDiff');\n// 'zrender/src/core/arrayDiff' has been used before, but it did\n// not do well in performance when roam with fixed dataZoom window.\n// function convertToIntId(newIdList, oldIdList) {\n// // Generate int id instead of string id.\n// // Compare string maybe slow in score function of arrDiff\n// // Assume id in idList are all unique\n// var idIndicesMap = {};\n// var idx = 0;\n// for (var i = 0; i < newIdList.length; i++) {\n// idIndicesMap[newIdList[i]] = idx;\n// newIdList[i] = idx++;\n// }\n// for (var i = 0; i < oldIdList.length; i++) {\n// var oldId = oldIdList[i];\n// // Same with newIdList\n// if (idIndicesMap[oldId]) {\n// oldIdList[i] = idIndicesMap[oldId];\n// }\n// else {\n// oldIdList[i] = idx++;\n// }\n// }\n// }\nfunction diffData(oldData, newData) {\n var diffResult = [];\n newData.diff(oldData).add(function (idx) {\n diffResult.push({\n cmd: '+',\n idx: idx\n });\n }).update(function (newIdx, oldIdx) {\n diffResult.push({\n cmd: '=',\n idx: oldIdx,\n idx1: newIdx\n });\n }).remove(function (idx) {\n diffResult.push({\n cmd: '-',\n idx: idx\n });\n }).execute();\n return diffResult;\n}\n\nfunction _default(oldData, newData, oldStackedOnPoints, newStackedOnPoints, oldCoordSys, newCoordSys, oldValueOrigin, newValueOrigin) {\n var diff = diffData(oldData, newData); // var newIdList = newData.mapArray(newData.getId);\n // var oldIdList = oldData.mapArray(oldData.getId);\n // convertToIntId(newIdList, oldIdList);\n // // FIXME One data ?\n // diff = arrayDiff(oldIdList, newIdList);\n\n var currPoints = [];\n var nextPoints = []; // Points for stacking base line\n\n var currStackedPoints = [];\n var nextStackedPoints = [];\n var status = [];\n var sortedIndices = [];\n var rawIndices = [];\n var newDataOldCoordInfo = prepareDataCoordInfo(oldCoordSys, newData, oldValueOrigin);\n var oldDataNewCoordInfo = prepareDataCoordInfo(newCoordSys, oldData, newValueOrigin);\n\n for (var i = 0; i < diff.length; i++) {\n var diffItem = diff[i];\n var pointAdded = true; // FIXME, animation is not so perfect when dataZoom window moves fast\n // Which is in case remvoing or add more than one data in the tail or head\n\n switch (diffItem.cmd) {\n case '=':\n var currentPt = oldData.getItemLayout(diffItem.idx);\n var nextPt = newData.getItemLayout(diffItem.idx1); // If previous data is NaN, use next point directly\n\n if (isNaN(currentPt[0]) || isNaN(currentPt[1])) {\n currentPt = nextPt.slice();\n }\n\n currPoints.push(currentPt);\n nextPoints.push(nextPt);\n currStackedPoints.push(oldStackedOnPoints[diffItem.idx]);\n nextStackedPoints.push(newStackedOnPoints[diffItem.idx1]);\n rawIndices.push(newData.getRawIndex(diffItem.idx1));\n break;\n\n case '+':\n var idx = diffItem.idx;\n currPoints.push(oldCoordSys.dataToPoint([newData.get(newDataOldCoordInfo.dataDimsForPoint[0], idx), newData.get(newDataOldCoordInfo.dataDimsForPoint[1], idx)]));\n nextPoints.push(newData.getItemLayout(idx).slice());\n currStackedPoints.push(getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, idx));\n nextStackedPoints.push(newStackedOnPoints[idx]);\n rawIndices.push(newData.getRawIndex(idx));\n break;\n\n case '-':\n var idx = diffItem.idx;\n var rawIndex = oldData.getRawIndex(idx); // Data is replaced. In the case of dynamic data queue\n // FIXME FIXME FIXME\n\n if (rawIndex !== idx) {\n currPoints.push(oldData.getItemLayout(idx));\n nextPoints.push(newCoordSys.dataToPoint([oldData.get(oldDataNewCoordInfo.dataDimsForPoint[0], idx), oldData.get(oldDataNewCoordInfo.dataDimsForPoint[1], idx)]));\n currStackedPoints.push(oldStackedOnPoints[idx]);\n nextStackedPoints.push(getStackedOnPoint(oldDataNewCoordInfo, newCoordSys, oldData, idx));\n rawIndices.push(rawIndex);\n } else {\n pointAdded = false;\n }\n\n } // Original indices\n\n\n if (pointAdded) {\n status.push(diffItem);\n sortedIndices.push(sortedIndices.length);\n }\n } // Diff result may be crossed if all items are changed\n // Sort by data index\n\n\n sortedIndices.sort(function (a, b) {\n return rawIndices[a] - rawIndices[b];\n });\n var sortedCurrPoints = [];\n var sortedNextPoints = [];\n var sortedCurrStackedPoints = [];\n var sortedNextStackedPoints = [];\n var sortedStatus = [];\n\n for (var i = 0; i < sortedIndices.length; i++) {\n var idx = sortedIndices[i];\n sortedCurrPoints[i] = currPoints[idx];\n sortedNextPoints[i] = nextPoints[idx];\n sortedCurrStackedPoints[i] = currStackedPoints[idx];\n sortedNextStackedPoints[i] = nextStackedPoints[idx];\n sortedStatus[i] = status[idx];\n }\n\n return {\n current: sortedCurrPoints,\n next: sortedNextPoints,\n stackedOnCurrent: sortedCurrStackedPoints,\n stackedOnNext: sortedNextStackedPoints,\n status: sortedStatus\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 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;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 _bbox = require(\"zrender/lib/core/bbox\");\n\nvar fromPoints = _bbox.fromPoints;\n\nvar SymbolDraw = require(\"../helper/SymbolDraw\");\n\nvar SymbolClz = require(\"../helper/Symbol\");\n\nvar lineAnimationDiff = require(\"./lineAnimationDiff\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar modelUtil = require(\"../../util/model\");\n\nvar _poly = require(\"./poly\");\n\nvar Polyline = _poly.Polyline;\nvar Polygon = _poly.Polygon;\n\nvar ChartView = require(\"../../view/Chart\");\n\nvar _helper = require(\"./helper\");\n\nvar prepareDataCoordInfo = _helper.prepareDataCoordInfo;\nvar getStackedOnPoint = _helper.getStackedOnPoint;\n\nvar _createClipPathFromCoordSys = require(\"../helper/createClipPathFromCoordSys\");\n\nvar createGridClipPath = _createClipPathFromCoordSys.createGridClipPath;\nvar createPolarClipPath = _createClipPathFromCoordSys.createPolarClipPath;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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 step not support polar\nfunction isPointsSame(points1, points2) {\n if (points1.length !== points2.length) {\n return;\n }\n\n for (var i = 0; i < points1.length; i++) {\n var p1 = points1[i];\n var p2 = points2[i];\n\n if (p1[0] !== p2[0] || p1[1] !== p2[1]) {\n return;\n }\n }\n\n return true;\n}\n\nfunction getBoundingDiff(points1, points2) {\n var min1 = [];\n var max1 = [];\n var min2 = [];\n var max2 = [];\n fromPoints(points1, min1, max1);\n fromPoints(points2, min2, max2); // Get a max value from each corner of two boundings.\n\n return Math.max(Math.abs(min1[0] - min2[0]), Math.abs(min1[1] - min2[1]), Math.abs(max1[0] - max2[0]), Math.abs(max1[1] - max2[1]));\n}\n\nfunction getSmooth(smooth) {\n return typeof smooth === 'number' ? smooth : smooth ? 0.5 : 0;\n}\n/**\n * @param {module:echarts/coord/cartesian/Cartesian2D|module:echarts/coord/polar/Polar} coordSys\n * @param {module:echarts/data/List} data\n * @param {Object} dataCoordInfo\n * @param {Array.>} points\n */\n\n\nfunction getStackedOnPoints(coordSys, data, dataCoordInfo) {\n if (!dataCoordInfo.valueDim) {\n return [];\n }\n\n var points = [];\n\n for (var idx = 0, len = data.count(); idx < len; idx++) {\n points.push(getStackedOnPoint(dataCoordInfo, coordSys, data, idx));\n }\n\n return points;\n}\n\nfunction turnPointsIntoStep(points, coordSys, stepTurnAt) {\n var baseAxis = coordSys.getBaseAxis();\n var baseIndex = baseAxis.dim === 'x' || baseAxis.dim === 'radius' ? 0 : 1;\n var stepPoints = [];\n\n for (var i = 0; i < points.length - 1; i++) {\n var nextPt = points[i + 1];\n var pt = points[i];\n stepPoints.push(pt);\n var stepPt = [];\n\n switch (stepTurnAt) {\n case 'end':\n stepPt[baseIndex] = nextPt[baseIndex];\n stepPt[1 - baseIndex] = pt[1 - baseIndex]; // default is start\n\n stepPoints.push(stepPt);\n break;\n\n case 'middle':\n // default is start\n var middle = (pt[baseIndex] + nextPt[baseIndex]) / 2;\n var stepPt2 = [];\n stepPt[baseIndex] = stepPt2[baseIndex] = middle;\n stepPt[1 - baseIndex] = pt[1 - baseIndex];\n stepPt2[1 - baseIndex] = nextPt[1 - baseIndex];\n stepPoints.push(stepPt);\n stepPoints.push(stepPt2);\n break;\n\n default:\n stepPt[baseIndex] = pt[baseIndex];\n stepPt[1 - baseIndex] = nextPt[1 - baseIndex]; // default is start\n\n stepPoints.push(stepPt);\n }\n } // Last points\n\n\n points[i] && stepPoints.push(points[i]);\n return stepPoints;\n}\n\nfunction getVisualGradient(data, coordSys) {\n var visualMetaList = data.getVisual('visualMeta');\n\n if (!visualMetaList || !visualMetaList.length || !data.count()) {\n // When data.count() is 0, gradient range can not be calculated.\n return;\n }\n\n if (coordSys.type !== 'cartesian2d') {\n return;\n }\n\n var coordDim;\n var visualMeta;\n\n for (var i = visualMetaList.length - 1; i >= 0; i--) {\n var dimIndex = visualMetaList[i].dimension;\n var dimName = data.dimensions[dimIndex];\n var dimInfo = data.getDimensionInfo(dimName);\n coordDim = dimInfo && dimInfo.coordDim; // Can only be x or y\n\n if (coordDim === 'x' || coordDim === 'y') {\n visualMeta = visualMetaList[i];\n break;\n }\n }\n\n if (!visualMeta) {\n return;\n } // If the area to be rendered is bigger than area defined by LinearGradient,\n // the canvas spec prescribes that the color of the first stop and the last\n // stop should be used. But if two stops are added at offset 0, in effect\n // browsers use the color of the second stop to render area outside\n // LinearGradient. So we can only infinitesimally extend area defined in\n // LinearGradient to render `outerColors`.\n\n\n var axis = coordSys.getAxis(coordDim); // dataToCoor mapping may not be linear, but must be monotonic.\n\n var colorStops = zrUtil.map(visualMeta.stops, function (stop) {\n return {\n coord: axis.toGlobalCoord(axis.dataToCoord(stop.value)),\n color: stop.color\n };\n });\n var stopLen = colorStops.length;\n var outerColors = visualMeta.outerColors.slice();\n\n if (stopLen && colorStops[0].coord > colorStops[stopLen - 1].coord) {\n colorStops.reverse();\n outerColors.reverse();\n }\n\n var tinyExtent = 10; // Arbitrary value: 10px\n\n var minCoord = colorStops[0].coord - tinyExtent;\n var maxCoord = colorStops[stopLen - 1].coord + tinyExtent;\n var coordSpan = maxCoord - minCoord;\n\n if (coordSpan < 1e-3) {\n return 'transparent';\n }\n\n zrUtil.each(colorStops, function (stop) {\n stop.offset = (stop.coord - minCoord) / coordSpan;\n });\n colorStops.push({\n offset: stopLen ? colorStops[stopLen - 1].offset : 0.5,\n color: outerColors[1] || 'transparent'\n });\n colorStops.unshift({\n // notice colorStops.length have been changed.\n offset: stopLen ? colorStops[0].offset : 0.5,\n color: outerColors[0] || 'transparent'\n }); // zrUtil.each(colorStops, function (colorStop) {\n // // Make sure each offset has rounded px to avoid not sharp edge\n // colorStop.offset = (Math.round(colorStop.offset * (end - start) + start) - start) / (end - start);\n // });\n\n var gradient = new graphic.LinearGradient(0, 0, 0, 0, colorStops, true);\n gradient[coordDim] = minCoord;\n gradient[coordDim + '2'] = maxCoord;\n return gradient;\n}\n\nfunction getIsIgnoreFunc(seriesModel, data, coordSys) {\n var showAllSymbol = seriesModel.get('showAllSymbol');\n var isAuto = showAllSymbol === 'auto';\n\n if (showAllSymbol && !isAuto) {\n return;\n }\n\n var categoryAxis = coordSys.getAxesByScale('ordinal')[0];\n\n if (!categoryAxis) {\n return;\n } // Note that category label interval strategy might bring some weird effect\n // in some scenario: users may wonder why some of the symbols are not\n // displayed. So we show all symbols as possible as we can.\n\n\n if (isAuto // Simplify the logic, do not determine label overlap here.\n && canShowAllSymbolForCategory(categoryAxis, data)) {\n return;\n } // Otherwise follow the label interval strategy on category axis.\n\n\n var categoryDataDim = data.mapDimension(categoryAxis.dim);\n var labelMap = {};\n zrUtil.each(categoryAxis.getViewLabels(), function (labelItem) {\n labelMap[labelItem.tickValue] = 1;\n });\n return function (dataIndex) {\n return !labelMap.hasOwnProperty(data.get(categoryDataDim, dataIndex));\n };\n}\n\nfunction canShowAllSymbolForCategory(categoryAxis, data) {\n // In mose cases, line is monotonous on category axis, and the label size\n // is close with each other. So we check the symbol size and some of the\n // label size alone with the category axis to estimate whether all symbol\n // can be shown without overlap.\n var axisExtent = categoryAxis.getExtent();\n var availSize = Math.abs(axisExtent[1] - axisExtent[0]) / categoryAxis.scale.count();\n isNaN(availSize) && (availSize = 0); // 0/0 is NaN.\n // Sampling some points, max 5.\n\n var dataLen = data.count();\n var step = Math.max(1, Math.round(dataLen / 5));\n\n for (var dataIndex = 0; dataIndex < dataLen; dataIndex += step) {\n if (SymbolClz.getSymbolSize(data, dataIndex // Only for cartesian, where `isHorizontal` exists.\n )[categoryAxis.isHorizontal() ? 1 : 0] // Empirical number\n * 1.5 > availSize) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction createLineClipPath(coordSys, hasAnimation, seriesModel) {\n if (coordSys.type === 'cartesian2d') {\n var isHorizontal = coordSys.getBaseAxis().isHorizontal();\n var clipPath = createGridClipPath(coordSys, hasAnimation, seriesModel); // Expand clip shape to avoid clipping when line value exceeds axis\n\n if (!seriesModel.get('clip', true)) {\n var rectShape = clipPath.shape;\n var expandSize = Math.max(rectShape.width, rectShape.height);\n\n if (isHorizontal) {\n rectShape.y -= expandSize;\n rectShape.height += expandSize * 2;\n } else {\n rectShape.x -= expandSize;\n rectShape.width += expandSize * 2;\n }\n }\n\n return clipPath;\n } else {\n return createPolarClipPath(coordSys, hasAnimation, seriesModel);\n }\n}\n\nvar _default = ChartView.extend({\n type: 'line',\n init: function () {\n var lineGroup = new graphic.Group();\n var symbolDraw = new SymbolDraw();\n this.group.add(symbolDraw.group);\n this._symbolDraw = symbolDraw;\n this._lineGroup = lineGroup;\n },\n render: function (seriesModel, ecModel, api) {\n var coordSys = seriesModel.coordinateSystem;\n var group = this.group;\n var data = seriesModel.getData();\n var lineStyleModel = seriesModel.getModel('lineStyle');\n var areaStyleModel = seriesModel.getModel('areaStyle');\n var points = data.mapArray(data.getItemLayout);\n var isCoordSysPolar = coordSys.type === 'polar';\n var prevCoordSys = this._coordSys;\n var symbolDraw = this._symbolDraw;\n var polyline = this._polyline;\n var polygon = this._polygon;\n var lineGroup = this._lineGroup;\n var hasAnimation = seriesModel.get('animation');\n var isAreaChart = !areaStyleModel.isEmpty();\n var valueOrigin = areaStyleModel.get('origin');\n var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin);\n var stackedOnPoints = getStackedOnPoints(coordSys, data, dataCoordInfo);\n var showSymbol = seriesModel.get('showSymbol');\n var isIgnoreFunc = showSymbol && !isCoordSysPolar && getIsIgnoreFunc(seriesModel, data, coordSys); // Remove temporary symbols\n\n var oldData = this._data;\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n }); // Remove previous created symbols if showSymbol changed to false\n\n if (!showSymbol) {\n symbolDraw.remove();\n }\n\n group.add(lineGroup); // FIXME step not support polar\n\n var step = !isCoordSysPolar && seriesModel.get('step');\n var clipShapeForSymbol;\n\n if (coordSys && coordSys.getArea && seriesModel.get('clip', true)) {\n clipShapeForSymbol = coordSys.getArea(); // Avoid float number rounding error for symbol on the edge of axis extent.\n // See #7913 and `test/dataZoom-clip.html`.\n\n if (clipShapeForSymbol.width != null) {\n clipShapeForSymbol.x -= 0.1;\n clipShapeForSymbol.y -= 0.1;\n clipShapeForSymbol.width += 0.2;\n clipShapeForSymbol.height += 0.2;\n } else if (clipShapeForSymbol.r0) {\n clipShapeForSymbol.r0 -= 0.5;\n clipShapeForSymbol.r1 += 0.5;\n }\n }\n\n this._clipShapeForSymbol = clipShapeForSymbol; // Initialization animation or coordinate system changed\n\n if (!(polyline && prevCoordSys.type === coordSys.type && step === this._step)) {\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol\n });\n\n if (step) {\n // TODO If stacked series is not step\n points = turnPointsIntoStep(points, coordSys, step);\n stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step);\n }\n\n polyline = this._newPolyline(points, coordSys, hasAnimation);\n\n if (isAreaChart) {\n polygon = this._newPolygon(points, stackedOnPoints, coordSys, hasAnimation);\n }\n\n lineGroup.setClipPath(createLineClipPath(coordSys, true, seriesModel));\n } else {\n if (isAreaChart && !polygon) {\n // If areaStyle is added\n polygon = this._newPolygon(points, stackedOnPoints, coordSys, hasAnimation);\n } else if (polygon && !isAreaChart) {\n // If areaStyle is removed\n lineGroup.remove(polygon);\n polygon = this._polygon = null;\n } // Update clipPath\n\n\n lineGroup.setClipPath(createLineClipPath(coordSys, false, seriesModel)); // Always update, or it is wrong in the case turning on legend\n // because points are not changed\n\n showSymbol && symbolDraw.updateData(data, {\n isIgnore: isIgnoreFunc,\n clipShape: clipShapeForSymbol\n }); // Stop symbol animation and sync with line points\n // FIXME performance?\n\n data.eachItemGraphicEl(function (el) {\n el.stopAnimation(true);\n }); // In the case data zoom triggerred refreshing frequently\n // Data may not change if line has a category axis. So it should animate nothing\n\n if (!isPointsSame(this._stackedOnPoints, stackedOnPoints) || !isPointsSame(this._points, points)) {\n if (hasAnimation) {\n this._updateAnimation(data, stackedOnPoints, coordSys, api, step, valueOrigin);\n } else {\n // Not do it in update with animation\n if (step) {\n // TODO If stacked series is not step\n points = turnPointsIntoStep(points, coordSys, step);\n stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step);\n }\n\n polyline.setShape({\n points: points\n });\n polygon && polygon.setShape({\n points: points,\n stackedOnPoints: stackedOnPoints\n });\n }\n }\n }\n\n var visualColor = getVisualGradient(data, coordSys) || data.getVisual('color');\n polyline.useStyle(zrUtil.defaults( // Use color in lineStyle first\n lineStyleModel.getLineStyle(), {\n fill: 'none',\n stroke: visualColor,\n lineJoin: 'bevel'\n }));\n var smooth = seriesModel.get('smooth');\n smooth = getSmooth(seriesModel.get('smooth'));\n polyline.setShape({\n smooth: smooth,\n smoothMonotone: seriesModel.get('smoothMonotone'),\n connectNulls: seriesModel.get('connectNulls')\n });\n\n if (polygon) {\n var stackedOnSeries = data.getCalculationInfo('stackedOnSeries');\n var stackedOnSmooth = 0;\n polygon.useStyle(zrUtil.defaults(areaStyleModel.getAreaStyle(), {\n fill: visualColor,\n opacity: 0.7,\n lineJoin: 'bevel'\n }));\n\n if (stackedOnSeries) {\n stackedOnSmooth = getSmooth(stackedOnSeries.get('smooth'));\n }\n\n polygon.setShape({\n smooth: smooth,\n stackedOnSmooth: stackedOnSmooth,\n smoothMonotone: seriesModel.get('smoothMonotone'),\n connectNulls: seriesModel.get('connectNulls')\n });\n }\n\n this._data = data; // Save the coordinate system for transition animation when data changed\n\n this._coordSys = coordSys;\n this._stackedOnPoints = stackedOnPoints;\n this._points = points;\n this._step = step;\n this._valueOrigin = valueOrigin;\n },\n dispose: function () {},\n highlight: function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n\n if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) {\n var symbol = data.getItemGraphicEl(dataIndex);\n\n if (!symbol) {\n // Create a temporary symbol if it is not exists\n var pt = data.getItemLayout(dataIndex);\n\n if (!pt) {\n // Null data\n return;\n } // fix #11360: should't draw symbol outside clipShapeForSymbol\n\n\n if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(pt[0], pt[1])) {\n return;\n }\n\n symbol = new SymbolClz(data, dataIndex);\n symbol.position = pt;\n symbol.setZ(seriesModel.get('zlevel'), seriesModel.get('z'));\n symbol.ignore = isNaN(pt[0]) || isNaN(pt[1]);\n symbol.__temp = true;\n data.setItemGraphicEl(dataIndex, symbol); // Stop scale animation\n\n symbol.stopSymbolAnimation(true);\n this.group.add(symbol);\n }\n\n symbol.highlight();\n } else {\n // Highlight whole series\n ChartView.prototype.highlight.call(this, seriesModel, ecModel, api, payload);\n }\n },\n downplay: function (seriesModel, ecModel, api, payload) {\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, payload);\n\n if (dataIndex != null && dataIndex >= 0) {\n var symbol = data.getItemGraphicEl(dataIndex);\n\n if (symbol) {\n if (symbol.__temp) {\n data.setItemGraphicEl(dataIndex, null);\n this.group.remove(symbol);\n } else {\n symbol.downplay();\n }\n }\n } else {\n // FIXME\n // can not downplay completely.\n // Downplay whole series\n ChartView.prototype.downplay.call(this, seriesModel, ecModel, api, payload);\n }\n },\n\n /**\n * @param {module:zrender/container/Group} group\n * @param {Array.>} points\n * @private\n */\n _newPolyline: function (points) {\n var polyline = this._polyline; // Remove previous created polyline\n\n if (polyline) {\n this._lineGroup.remove(polyline);\n }\n\n polyline = new Polyline({\n shape: {\n points: points\n },\n silent: true,\n z2: 10\n });\n\n this._lineGroup.add(polyline);\n\n this._polyline = polyline;\n return polyline;\n },\n\n /**\n * @param {module:zrender/container/Group} group\n * @param {Array.>} stackedOnPoints\n * @param {Array.>} points\n * @private\n */\n _newPolygon: function (points, stackedOnPoints) {\n var polygon = this._polygon; // Remove previous created polygon\n\n if (polygon) {\n this._lineGroup.remove(polygon);\n }\n\n polygon = new Polygon({\n shape: {\n points: points,\n stackedOnPoints: stackedOnPoints\n },\n silent: true\n });\n\n this._lineGroup.add(polygon);\n\n this._polygon = polygon;\n return polygon;\n },\n\n /**\n * @private\n */\n // FIXME Two value axis\n _updateAnimation: function (data, stackedOnPoints, coordSys, api, step, valueOrigin) {\n var polyline = this._polyline;\n var polygon = this._polygon;\n var seriesModel = data.hostModel;\n var diff = lineAnimationDiff(this._data, data, this._stackedOnPoints, stackedOnPoints, this._coordSys, coordSys, this._valueOrigin, valueOrigin);\n var current = diff.current;\n var stackedOnCurrent = diff.stackedOnCurrent;\n var next = diff.next;\n var stackedOnNext = diff.stackedOnNext;\n\n if (step) {\n // TODO If stacked series is not step\n current = turnPointsIntoStep(diff.current, coordSys, step);\n stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step);\n next = turnPointsIntoStep(diff.next, coordSys, step);\n stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);\n } // Don't apply animation if diff is large.\n // For better result and avoid memory explosion problems like\n // https://github.com/apache/incubator-echarts/issues/12229\n\n\n if (getBoundingDiff(current, next) > 3000 || polygon && getBoundingDiff(stackedOnCurrent, stackedOnNext) > 3000) {\n polyline.setShape({\n points: next\n });\n\n if (polygon) {\n polygon.setShape({\n points: next,\n stackedOnPoints: stackedOnNext\n });\n }\n\n return;\n } // `diff.current` is subset of `current` (which should be ensured by\n // turnPointsIntoStep), so points in `__points` can be updated when\n // points in `current` are update during animation.\n\n\n polyline.shape.__points = diff.current;\n polyline.shape.points = current;\n graphic.updateProps(polyline, {\n shape: {\n points: next\n }\n }, seriesModel);\n\n if (polygon) {\n polygon.setShape({\n points: current,\n stackedOnPoints: stackedOnCurrent\n });\n graphic.updateProps(polygon, {\n shape: {\n points: next,\n stackedOnPoints: stackedOnNext\n }\n }, seriesModel);\n }\n\n var updatedDataInfo = [];\n var diffStatus = diff.status;\n\n for (var i = 0; i < diffStatus.length; i++) {\n var cmd = diffStatus[i].cmd;\n\n if (cmd === '=') {\n var el = data.getItemGraphicEl(diffStatus[i].idx1);\n\n if (el) {\n updatedDataInfo.push({\n el: el,\n ptIdx: i // Index of points\n\n });\n }\n }\n }\n\n if (polyline.animators && polyline.animators.length) {\n polyline.animators[0].during(function () {\n for (var i = 0; i < updatedDataInfo.length; i++) {\n var el = updatedDataInfo[i].el;\n el.attr('position', polyline.shape.__points[updatedDataInfo[i].ptIdx]);\n }\n });\n }\n },\n remove: function (ecModel) {\n var group = this.group;\n var oldData = this._data;\n\n this._lineGroup.removeAll();\n\n this._symbolDraw.remove(true); // Remove temporary created elements when highlighting\n\n\n oldData && oldData.eachItemGraphicEl(function (el, idx) {\n if (el.__temp) {\n group.remove(el);\n oldData.setItemGraphicEl(idx, null);\n }\n });\n this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._data = 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\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 contrastColor = '#eee';\n\nvar axisCommon = function () {\n return {\n axisLine: {\n lineStyle: {\n color: contrastColor\n }\n },\n axisTick: {\n lineStyle: {\n color: contrastColor\n }\n },\n axisLabel: {\n textStyle: {\n color: contrastColor\n }\n },\n splitLine: {\n lineStyle: {\n type: 'dashed',\n color: '#aaa'\n }\n },\n splitArea: {\n areaStyle: {\n color: contrastColor\n }\n }\n };\n};\n\nvar colorPalette = ['#dd6b66', '#759aa0', '#e69d87', '#8dc1a9', '#ea7e53', '#eedd78', '#73a373', '#73b9bc', '#7289ab', '#91ca8c', '#f49f42'];\nvar theme = {\n color: colorPalette,\n backgroundColor: '#333',\n tooltip: {\n axisPointer: {\n lineStyle: {\n color: contrastColor\n },\n crossStyle: {\n color: contrastColor\n },\n label: {\n color: '#000'\n }\n }\n },\n legend: {\n textStyle: {\n color: contrastColor\n }\n },\n textStyle: {\n color: contrastColor\n },\n title: {\n textStyle: {\n color: contrastColor\n }\n },\n toolbox: {\n iconStyle: {\n normal: {\n borderColor: contrastColor\n }\n }\n },\n dataZoom: {\n textStyle: {\n color: contrastColor\n }\n },\n visualMap: {\n textStyle: {\n color: contrastColor\n }\n },\n timeline: {\n lineStyle: {\n color: contrastColor\n },\n itemStyle: {\n normal: {\n color: colorPalette[1]\n }\n },\n label: {\n normal: {\n textStyle: {\n color: contrastColor\n }\n }\n },\n controlStyle: {\n normal: {\n color: contrastColor,\n borderColor: contrastColor\n }\n }\n },\n timeAxis: axisCommon(),\n logAxis: axisCommon(),\n valueAxis: axisCommon(),\n categoryAxis: axisCommon(),\n line: {\n symbol: 'circle'\n },\n graph: {\n color: colorPalette\n },\n gauge: {\n title: {\n textStyle: {\n color: contrastColor\n }\n }\n },\n candlestick: {\n itemStyle: {\n normal: {\n color: '#FD1050',\n color0: '#0CF49B',\n borderColor: '#FD1050',\n borderColor0: '#0CF49B'\n }\n }\n }\n};\ntheme.categoryAxis.splitLine.show = false;\nvar _default = theme;\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 AxisBuilder = require(\"./AxisBuilder\");\n\nvar AxisView = require(\"./AxisView\");\n\nvar cartesianAxisHelper = require(\"../../coord/cartesian/cartesianAxisHelper\");\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', 'minorSplitLine'];\nvar CartesianAxisView = AxisView.extend({\n type: 'cartesianAxis',\n axisPointerClass: 'CartesianAxisPointer',\n\n /**\n * @override\n */\n render: function (axisModel, ecModel, api, payload) {\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 gridModel = axisModel.getCoordSysModel();\n var layout = cartesianAxisHelper.layout(gridModel, axisModel);\n var axisBuilder = new AxisBuilder(axisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n\n this._axisGroup.add(axisBuilder.getGroup());\n\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get(name + '.show')) {\n this['_' + name](axisModel, gridModel);\n }\n }, this);\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n CartesianAxisView.superCall(this, 'render', axisModel, ecModel, api, payload);\n },\n remove: function () {\n rectCoordAxisHandleRemove(this);\n },\n\n /**\n * @param {module:echarts/coord/cartesian/AxisModel} axisModel\n * @param {module:echarts/coord/cartesian/GridModel} gridModel\n * @private\n */\n _splitLine: function (axisModel, gridModel) {\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 lineColors = lineStyleModel.get('color');\n lineColors = zrUtil.isArray(lineColors) ? lineColors : [lineColors];\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\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 var tickValue = ticksCoords[i].tickValue;\n\n this._axisGroup.add(new graphic.Line({\n anid: tickValue != null ? 'line_' + ticksCoords[i].tickValue : null,\n subPixelOptimize: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: zrUtil.defaults({\n stroke: lineColors[colorIndex]\n }, lineStyle),\n silent: true\n }));\n }\n },\n\n /**\n * @param {module:echarts/coord/cartesian/AxisModel} axisModel\n * @param {module:echarts/coord/cartesian/GridModel} gridModel\n * @private\n */\n _minorSplitLine: function (axisModel, gridModel) {\n var axis = axisModel.axis;\n var minorSplitLineModel = axisModel.getModel('minorSplitLine');\n var lineStyleModel = minorSplitLineModel.getModel('lineStyle');\n var gridRect = gridModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var minorTicksCoords = axis.getMinorTicksCoords();\n\n if (!minorTicksCoords.length) {\n return;\n }\n\n var p1 = [];\n var p2 = [];\n var lineStyle = lineStyleModel.getLineStyle();\n\n for (var i = 0; i < minorTicksCoords.length; i++) {\n for (var k = 0; k < minorTicksCoords[i].length; k++) {\n var tickCoord = axis.toGlobalCoord(minorTicksCoords[i][k].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 this._axisGroup.add(new graphic.Line({\n anid: 'minor_line_' + minorTicksCoords[i][k].tickValue,\n subPixelOptimize: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n style: lineStyle,\n silent: true\n }));\n }\n }\n },\n\n /**\n * @param {module:echarts/coord/cartesian/AxisModel} axisModel\n * @param {module:echarts/coord/cartesian/GridModel} gridModel\n * @private\n */\n _splitArea: function (axisModel, gridModel) {\n rectCoordAxisBuildSplitArea(this, this._axisGroup, axisModel, gridModel);\n }\n});\nCartesianAxisView.extend({\n type: 'xAxis'\n});\nCartesianAxisView.extend({\n type: 'yAxis'\n});","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 bbox = require(\"zrender/lib/core/bbox\");\n\nvar vec2 = require(\"zrender/lib/core/vector\");\n\nvar polygonContain = require(\"zrender/lib/contain/polygon\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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/coord/geo/Region\n */\n\n/**\n * @param {string|Region} name\n * @param {Array} geometries\n * @param {Array.} cp\n */\nfunction Region(name, geometries, cp) {\n /**\n * @type {string}\n * @readOnly\n */\n this.name = name;\n /**\n * @type {Array.}\n * @readOnly\n */\n\n this.geometries = geometries;\n\n if (!cp) {\n var rect = this.getBoundingRect();\n cp = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n } else {\n cp = [cp[0], cp[1]];\n }\n /**\n * @type {Array.}\n */\n\n\n this.center = cp;\n}\n\nRegion.prototype = {\n constructor: Region,\n properties: null,\n\n /**\n * @return {module:zrender/core/BoundingRect}\n */\n getBoundingRect: function () {\n var rect = this._rect;\n\n if (rect) {\n return rect;\n }\n\n var MAX_NUMBER = Number.MAX_VALUE;\n var min = [MAX_NUMBER, MAX_NUMBER];\n var max = [-MAX_NUMBER, -MAX_NUMBER];\n var min2 = [];\n var max2 = [];\n var geometries = this.geometries;\n\n for (var i = 0; i < geometries.length; i++) {\n // Only support polygon\n if (geometries[i].type !== 'polygon') {\n continue;\n } // Doesn't consider hole\n\n\n var exterior = geometries[i].exterior;\n bbox.fromPoints(exterior, min2, max2);\n vec2.min(min, min, min2);\n vec2.max(max, max, max2);\n } // No data\n\n\n if (i === 0) {\n min[0] = min[1] = max[0] = max[1] = 0;\n }\n\n return this._rect = new BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);\n },\n\n /**\n * @param {} coord\n * @return {boolean}\n */\n contain: function (coord) {\n var rect = this.getBoundingRect();\n var geometries = this.geometries;\n\n if (!rect.contain(coord[0], coord[1])) {\n return false;\n }\n\n loopGeo: for (var i = 0, len = geometries.length; i < len; i++) {\n // Only support polygon.\n if (geometries[i].type !== 'polygon') {\n continue;\n }\n\n var exterior = geometries[i].exterior;\n var interiors = geometries[i].interiors;\n\n if (polygonContain.contain(exterior, coord[0], coord[1])) {\n // Not in the region if point is in the hole.\n for (var k = 0; k < (interiors ? interiors.length : 0); k++) {\n if (polygonContain.contain(interiors[k])) {\n continue loopGeo;\n }\n }\n\n return true;\n }\n }\n\n return false;\n },\n transformTo: function (x, y, width, height) {\n var rect = this.getBoundingRect();\n var aspect = rect.width / rect.height;\n\n if (!width) {\n width = aspect * height;\n } else if (!height) {\n height = width / aspect;\n }\n\n var target = new BoundingRect(x, y, width, height);\n var transform = rect.calculateTransform(target);\n var geometries = this.geometries;\n\n for (var i = 0; i < geometries.length; i++) {\n // Only support polygon.\n if (geometries[i].type !== 'polygon') {\n continue;\n }\n\n var exterior = geometries[i].exterior;\n var interiors = geometries[i].interiors;\n\n for (var p = 0; p < exterior.length; p++) {\n vec2.applyTransform(exterior[p], exterior[p], transform);\n }\n\n for (var h = 0; h < (interiors ? interiors.length : 0); h++) {\n for (var p = 0; p < interiors[h].length; p++) {\n vec2.applyTransform(interiors[h][p], interiors[h][p], transform);\n }\n }\n }\n\n rect = this._rect;\n rect.copy(target); // Update center\n\n this.center = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n },\n cloneShallow: function (name) {\n name == null && (name = this.name);\n var newRegion = new Region(name, this.geometries, this.center);\n newRegion._rect = this._rect;\n newRegion.transformTo = null; // Simply avoid to be called.\n\n return newRegion;\n }\n};\nvar _default = Region;\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 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 _util = require(\"zrender/lib/core/util\");\n\nvar assert = _util.assert;\nvar isArray = _util.isArray;\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*/\n\n/**\n * @param {Object} define\n * @return See the return of `createTask`.\n */\nfunction createTask(define) {\n return new Task(define);\n}\n/**\n * @constructor\n * @param {Object} define\n * @param {Function} define.reset Custom reset\n * @param {Function} [define.plan] Returns 'reset' indicate reset immediately.\n * @param {Function} [define.count] count is used to determin data task.\n * @param {Function} [define.onDirty] count is used to determin data task.\n */\n\n\nfunction Task(define) {\n define = define || {};\n this._reset = define.reset;\n this._plan = define.plan;\n this._count = define.count;\n this._onDirty = define.onDirty;\n this._dirty = true; // Context must be specified implicitly, to\n // avoid miss update context when model changed.\n\n this.context;\n}\n\nvar taskProto = Task.prototype;\n/**\n * @param {Object} performArgs\n * @param {number} [performArgs.step] Specified step.\n * @param {number} [performArgs.skip] Skip customer perform call.\n * @param {number} [performArgs.modBy] Sampling window size.\n * @param {number} [performArgs.modDataCount] Sampling count.\n */\n\ntaskProto.perform = function (performArgs) {\n var upTask = this._upstream;\n var skip = performArgs && performArgs.skip; // TODO some refactor.\n // Pull data. Must pull data each time, because context.data\n // may be updated by Series.setData.\n\n if (this._dirty && upTask) {\n var context = this.context;\n context.data = context.outputData = upTask.context.outputData;\n }\n\n if (this.__pipeline) {\n this.__pipeline.currentTask = this;\n }\n\n var planResult;\n\n if (this._plan && !skip) {\n planResult = this._plan(this.context);\n } // Support sharding by mod, which changes the render sequence and makes the rendered graphic\n // elements uniformed distributed when progress, especially when moving or zooming.\n\n\n var lastModBy = normalizeModBy(this._modBy);\n var lastModDataCount = this._modDataCount || 0;\n var modBy = normalizeModBy(performArgs && performArgs.modBy);\n var modDataCount = performArgs && performArgs.modDataCount || 0;\n\n if (lastModBy !== modBy || lastModDataCount !== modDataCount) {\n planResult = 'reset';\n }\n\n function normalizeModBy(val) {\n !(val >= 1) && (val = 1); // jshint ignore:line\n\n return val;\n }\n\n var forceFirstProgress;\n\n if (this._dirty || planResult === 'reset') {\n this._dirty = false;\n forceFirstProgress = reset(this, skip);\n }\n\n this._modBy = modBy;\n this._modDataCount = modDataCount;\n var step = performArgs && performArgs.step;\n\n if (upTask) {\n this._dueEnd = upTask._outputDueEnd;\n } // DataTask or overallTask\n else {\n this._dueEnd = this._count ? this._count(this.context) : Infinity;\n } // Note: Stubs, that its host overall task let it has progress, has progress.\n // If no progress, pass index from upstream to downstream each time plan called.\n\n\n if (this._progress) {\n var start = this._dueIndex;\n var end = Math.min(step != null ? this._dueIndex + step : Infinity, this._dueEnd);\n\n if (!skip && (forceFirstProgress || start < end)) {\n var progress = this._progress;\n\n if (isArray(progress)) {\n for (var i = 0; i < progress.length; i++) {\n doProgress(this, progress[i], start, end, modBy, modDataCount);\n }\n } else {\n doProgress(this, progress, start, end, modBy, modDataCount);\n }\n }\n\n this._dueIndex = end; // If no `outputDueEnd`, assume that output data and\n // input data is the same, so use `dueIndex` as `outputDueEnd`.\n\n var outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : end;\n this._outputDueEnd = outputDueEnd;\n } else {\n // (1) Some overall task has no progress.\n // (2) Stubs, that its host overall task do not let it has progress, has no progress.\n // This should always be performed so it can be passed to downstream.\n this._dueIndex = this._outputDueEnd = this._settedOutputEnd != null ? this._settedOutputEnd : this._dueEnd;\n }\n\n return this.unfinished();\n};\n\nvar iterator = function () {\n var end;\n var current;\n var modBy;\n var modDataCount;\n var winCount;\n var it = {\n reset: function (s, e, sStep, sCount) {\n current = s;\n end = e;\n modBy = sStep;\n modDataCount = sCount;\n winCount = Math.ceil(modDataCount / modBy);\n it.next = modBy > 1 && modDataCount > 0 ? modNext : sequentialNext;\n }\n };\n return it;\n\n function sequentialNext() {\n return current < end ? current++ : null;\n }\n\n function modNext() {\n var dataIndex = current % winCount * modBy + Math.ceil(current / winCount);\n var result = current >= end ? null : dataIndex < modDataCount ? dataIndex // If modDataCount is smaller than data.count() (consider `appendData` case),\n // Use normal linear rendering mode.\n : current;\n current++;\n return result;\n }\n}();\n\ntaskProto.dirty = function () {\n this._dirty = true;\n this._onDirty && this._onDirty(this.context);\n};\n\nfunction doProgress(taskIns, progress, start, end, modBy, modDataCount) {\n iterator.reset(start, end, modBy, modDataCount);\n taskIns._callingProgress = progress;\n\n taskIns._callingProgress({\n start: start,\n end: end,\n count: end - start,\n next: iterator.next\n }, taskIns.context);\n}\n\nfunction reset(taskIns, skip) {\n taskIns._dueIndex = taskIns._outputDueEnd = taskIns._dueEnd = 0;\n taskIns._settedOutputEnd = null;\n var progress;\n var forceFirstProgress;\n\n if (!skip && taskIns._reset) {\n progress = taskIns._reset(taskIns.context);\n\n if (progress && progress.progress) {\n forceFirstProgress = progress.forceFirstProgress;\n progress = progress.progress;\n } // To simplify no progress checking, array must has item.\n\n\n if (isArray(progress) && !progress.length) {\n progress = null;\n }\n }\n\n taskIns._progress = progress;\n taskIns._modBy = taskIns._modDataCount = null;\n var downstream = taskIns._downstream;\n downstream && downstream.dirty();\n return forceFirstProgress;\n}\n/**\n * @return {boolean}\n */\n\n\ntaskProto.unfinished = function () {\n return this._progress && this._dueIndex < this._dueEnd;\n};\n/**\n * @param {Object} downTask The downstream task.\n * @return {Object} The downstream task.\n */\n\n\ntaskProto.pipe = function (downTask) {\n // If already downstream, do not dirty downTask.\n if (this._downstream !== downTask || this._dirty) {\n this._downstream = downTask;\n downTask._upstream = this;\n downTask.dirty();\n }\n};\n\ntaskProto.dispose = function () {\n if (this._disposed) {\n return;\n }\n\n this._upstream && (this._upstream._downstream = null);\n this._downstream && (this._downstream._upstream = null);\n this._dirty = false;\n this._disposed = true;\n};\n\ntaskProto.getUpstream = function () {\n return this._upstream;\n};\n\ntaskProto.getDownstream = function () {\n return this._downstream;\n};\n\ntaskProto.setOutputEnd = function (end) {\n // This only happend in dataTask, dataZoom, map, currently.\n // where dataZoom do not set end each time, but only set\n // when reset. So we should record the setted end, in case\n // that the stub of dataZoom perform again and earse the\n // setted end by upstream.\n this._outputDueEnd = this._settedOutputEnd = end;\n}; ///////////////////////////////////////////////////////////\n// For stream debug (Should be commented out after used!)\n// Usage: printTask(this, 'begin');\n// Usage: printTask(this, null, {someExtraProp});\n// function printTask(task, prefix, extra) {\n// window.ecTaskUID == null && (window.ecTaskUID = 0);\n// task.uidDebug == null && (task.uidDebug = `task_${window.ecTaskUID++}`);\n// task.agent && task.agent.uidDebug == null && (task.agent.uidDebug = `task_${window.ecTaskUID++}`);\n// var props = [];\n// if (task.__pipeline) {\n// var val = `${task.__idxInPipeline}/${task.__pipeline.tail.__idxInPipeline} ${task.agent ? '(stub)' : ''}`;\n// props.push({text: 'idx', value: val});\n// } else {\n// var stubCount = 0;\n// task.agentStubMap.each(() => stubCount++);\n// props.push({text: 'idx', value: `overall (stubs: ${stubCount})`});\n// }\n// props.push({text: 'uid', value: task.uidDebug});\n// if (task.__pipeline) {\n// props.push({text: 'pid', value: task.__pipeline.id});\n// task.agent && props.push(\n// {text: 'stubFor', value: task.agent.uidDebug}\n// );\n// }\n// props.push(\n// {text: 'dirty', value: task._dirty},\n// {text: 'dueIndex', value: task._dueIndex},\n// {text: 'dueEnd', value: task._dueEnd},\n// {text: 'outputDueEnd', value: task._outputDueEnd}\n// );\n// if (extra) {\n// Object.keys(extra).forEach(key => {\n// props.push({text: key, value: extra[key]});\n// });\n// }\n// var args = ['color: blue'];\n// var msg = `%c[${prefix || 'T'}] %c` + props.map(item => (\n// args.push('color: black', 'color: red'),\n// `${item.text}: %c${item.value}`\n// )).join('%c, ');\n// console.log.apply(console, [msg].concat(args));\n// // console.log(this);\n// }\n\n\nexports.createTask = createTask;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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\nrequire(\"../coord/polar/polarCreator\");\n\nrequire(\"./axis/AngleAxisView\");","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 graphic = require(\"../../util/graphic\");\n\nvar SymbolClz = require(\"./Symbol\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar isObject = _util.isObject;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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/SymbolDraw\n */\n\n/**\n * @constructor\n * @alias module:echarts/chart/helper/SymbolDraw\n * @param {module:zrender/graphic/Group} [symbolCtor]\n */\nfunction SymbolDraw(symbolCtor) {\n this.group = new graphic.Group();\n this._symbolCtor = symbolCtor || SymbolClz;\n}\n\nvar symbolDrawProto = SymbolDraw.prototype;\n\nfunction symbolNeedsDraw(data, point, idx, opt) {\n return point && !isNaN(point[0]) && !isNaN(point[1]) && !(opt.isIgnore && opt.isIgnore(idx)) // We do not set clipShape on group, because it will cut part of\n // the symbol element shape. We use the same clip shape here as\n // the line clip.\n && !(opt.clipShape && !opt.clipShape.contain(point[0], point[1])) && data.getItemVisual(idx, 'symbol') !== 'none';\n}\n/**\n * Update symbols draw by new data\n * @param {module:echarts/data/List} data\n * @param {Object} [opt] Or isIgnore\n * @param {Function} [opt.isIgnore]\n * @param {Object} [opt.clipShape]\n */\n\n\nsymbolDrawProto.updateData = function (data, opt) {\n opt = normalizeUpdateOpt(opt);\n var group = this.group;\n var seriesModel = data.hostModel;\n var oldData = this._data;\n var SymbolCtor = this._symbolCtor;\n var seriesScope = makeSeriesScope(data); // 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 (!oldData) {\n group.removeAll();\n }\n\n data.diff(oldData).add(function (newIdx) {\n var point = data.getItemLayout(newIdx);\n\n if (symbolNeedsDraw(data, point, newIdx, opt)) {\n var symbolEl = new SymbolCtor(data, newIdx, seriesScope);\n symbolEl.attr('position', point);\n data.setItemGraphicEl(newIdx, symbolEl);\n group.add(symbolEl);\n }\n }).update(function (newIdx, oldIdx) {\n var symbolEl = oldData.getItemGraphicEl(oldIdx);\n var point = data.getItemLayout(newIdx);\n\n if (!symbolNeedsDraw(data, point, newIdx, opt)) {\n group.remove(symbolEl);\n return;\n }\n\n if (!symbolEl) {\n symbolEl = new SymbolCtor(data, newIdx);\n symbolEl.attr('position', point);\n } else {\n symbolEl.updateData(data, newIdx, seriesScope);\n graphic.updateProps(symbolEl, {\n position: point\n }, seriesModel);\n } // Add back\n\n\n group.add(symbolEl);\n data.setItemGraphicEl(newIdx, symbolEl);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && el.fadeOut(function () {\n group.remove(el);\n });\n }).execute();\n this._data = data;\n};\n\nsymbolDrawProto.isPersistent = function () {\n return true;\n};\n\nsymbolDrawProto.updateLayout = function () {\n var data = this._data;\n\n if (data) {\n // Not use animation\n data.eachItemGraphicEl(function (el, idx) {\n var point = data.getItemLayout(idx);\n el.attr('position', point);\n });\n }\n};\n\nsymbolDrawProto.incrementalPrepareUpdate = function (data) {\n this._seriesScope = makeSeriesScope(data);\n this._data = null;\n this.group.removeAll();\n};\n/**\n * Update symbols draw by new data\n * @param {module:echarts/data/List} data\n * @param {Object} [opt] Or isIgnore\n * @param {Function} [opt.isIgnore]\n * @param {Object} [opt.clipShape]\n */\n\n\nsymbolDrawProto.incrementalUpdate = function (taskParams, data, opt) {\n opt = normalizeUpdateOpt(opt);\n\n function updateIncrementalAndHover(el) {\n if (!el.isGroup) {\n el.incremental = el.useHoverLayer = true;\n }\n }\n\n for (var idx = taskParams.start; idx < taskParams.end; idx++) {\n var point = data.getItemLayout(idx);\n\n if (symbolNeedsDraw(data, point, idx, opt)) {\n var el = new this._symbolCtor(data, idx, this._seriesScope);\n el.traverse(updateIncrementalAndHover);\n el.attr('position', point);\n this.group.add(el);\n data.setItemGraphicEl(idx, el);\n }\n }\n};\n\nfunction normalizeUpdateOpt(opt) {\n if (opt != null && !isObject(opt)) {\n opt = {\n isIgnore: opt\n };\n }\n\n return opt || {};\n}\n\nsymbolDrawProto.remove = function (enableAnimation) {\n var group = this.group;\n var data = this._data; // Incremental model do not have this._data.\n\n if (data && enableAnimation) {\n data.eachItemGraphicEl(function (el) {\n el.fadeOut(function () {\n group.remove(el);\n });\n });\n } else {\n group.removeAll();\n }\n};\n\nfunction makeSeriesScope(data) {\n var seriesModel = data.hostModel;\n return {\n itemStyle: seriesModel.getModel('itemStyle').getItemStyle(['color']),\n hoverItemStyle: seriesModel.getModel('emphasis.itemStyle').getItemStyle(),\n symbolRotate: seriesModel.get('symbolRotate'),\n symbolOffset: seriesModel.get('symbolOffset'),\n hoverAnimation: seriesModel.get('hoverAnimation'),\n labelModel: seriesModel.getModel('label'),\n hoverLabelModel: seriesModel.getModel('emphasis.label'),\n cursorStyle: seriesModel.get('cursor')\n };\n}\n\nvar _default = SymbolDraw;\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 zrUtil = require(\"zrender/lib/core/util\");\n\nvar BoundingRect = require(\"zrender/lib/core/BoundingRect\");\n\nvar _number = require(\"./number\");\n\nvar parsePercent = _number.parsePercent;\n\nvar formatUtil = require(\"./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*/\n// Layout helpers for each component positioning\nvar each = zrUtil.each;\n/**\n * @public\n */\n\nvar LOCATION_PARAMS = ['left', 'right', 'top', 'bottom', 'width', 'height'];\n/**\n * @public\n */\n\nvar HV_NAMES = [['width', 'left', 'right'], ['height', 'top', 'bottom']];\n\nfunction boxLayout(orient, group, gap, maxWidth, maxHeight) {\n var x = 0;\n var y = 0;\n\n if (maxWidth == null) {\n maxWidth = Infinity;\n }\n\n if (maxHeight == null) {\n maxHeight = Infinity;\n }\n\n var currentLineMaxSize = 0;\n group.eachChild(function (child, idx) {\n var position = child.position;\n var rect = child.getBoundingRect();\n var nextChild = group.childAt(idx + 1);\n var nextChildRect = nextChild && nextChild.getBoundingRect();\n var nextX;\n var nextY;\n\n if (orient === 'horizontal') {\n var moveX = rect.width + (nextChildRect ? -nextChildRect.x + rect.x : 0);\n nextX = x + moveX; // Wrap when width exceeds maxWidth or meet a `newline` group\n // FIXME compare before adding gap?\n\n if (nextX > maxWidth || child.newline) {\n x = 0;\n nextX = moveX;\n y += currentLineMaxSize + gap;\n currentLineMaxSize = rect.height;\n } else {\n // FIXME: consider rect.y is not `0`?\n currentLineMaxSize = Math.max(currentLineMaxSize, rect.height);\n }\n } else {\n var moveY = rect.height + (nextChildRect ? -nextChildRect.y + rect.y : 0);\n nextY = y + moveY; // Wrap when width exceeds maxHeight or meet a `newline` group\n\n if (nextY > maxHeight || child.newline) {\n x += currentLineMaxSize + gap;\n y = 0;\n nextY = moveY;\n currentLineMaxSize = rect.width;\n } else {\n currentLineMaxSize = Math.max(currentLineMaxSize, rect.width);\n }\n }\n\n if (child.newline) {\n return;\n }\n\n position[0] = x;\n position[1] = y;\n orient === 'horizontal' ? x = nextX + gap : y = nextY + gap;\n });\n}\n/**\n * VBox or HBox layouting\n * @param {string} orient\n * @param {module:zrender/container/Group} group\n * @param {number} gap\n * @param {number} [width=Infinity]\n * @param {number} [height=Infinity]\n */\n\n\nvar box = boxLayout;\n/**\n * VBox layouting\n * @param {module:zrender/container/Group} group\n * @param {number} gap\n * @param {number} [width=Infinity]\n * @param {number} [height=Infinity]\n */\n\nvar vbox = zrUtil.curry(boxLayout, 'vertical');\n/**\n * HBox layouting\n * @param {module:zrender/container/Group} group\n * @param {number} gap\n * @param {number} [width=Infinity]\n * @param {number} [height=Infinity]\n */\n\nvar hbox = zrUtil.curry(boxLayout, 'horizontal');\n/**\n * If x or x2 is not specified or 'center' 'left' 'right',\n * the width would be as long as possible.\n * If y or y2 is not specified or 'middle' 'top' 'bottom',\n * the height would be as long as possible.\n *\n * @param {Object} positionInfo\n * @param {number|string} [positionInfo.x]\n * @param {number|string} [positionInfo.y]\n * @param {number|string} [positionInfo.x2]\n * @param {number|string} [positionInfo.y2]\n * @param {Object} containerRect {width, height}\n * @param {string|number} margin\n * @return {Object} {width, height}\n */\n\nfunction getAvailableSize(positionInfo, containerRect, margin) {\n var containerWidth = containerRect.width;\n var containerHeight = containerRect.height;\n var x = parsePercent(positionInfo.x, containerWidth);\n var y = parsePercent(positionInfo.y, containerHeight);\n var x2 = parsePercent(positionInfo.x2, containerWidth);\n var y2 = parsePercent(positionInfo.y2, containerHeight);\n (isNaN(x) || isNaN(parseFloat(positionInfo.x))) && (x = 0);\n (isNaN(x2) || isNaN(parseFloat(positionInfo.x2))) && (x2 = containerWidth);\n (isNaN(y) || isNaN(parseFloat(positionInfo.y))) && (y = 0);\n (isNaN(y2) || isNaN(parseFloat(positionInfo.y2))) && (y2 = containerHeight);\n margin = formatUtil.normalizeCssArray(margin || 0);\n return {\n width: Math.max(x2 - x - margin[1] - margin[3], 0),\n height: Math.max(y2 - y - margin[0] - margin[2], 0)\n };\n}\n/**\n * Parse position info.\n *\n * @param {Object} positionInfo\n * @param {number|string} [positionInfo.left]\n * @param {number|string} [positionInfo.top]\n * @param {number|string} [positionInfo.right]\n * @param {number|string} [positionInfo.bottom]\n * @param {number|string} [positionInfo.width]\n * @param {number|string} [positionInfo.height]\n * @param {number|string} [positionInfo.aspect] Aspect is width / height\n * @param {Object} containerRect\n * @param {string|number} [margin]\n *\n * @return {module:zrender/core/BoundingRect}\n */\n\n\nfunction getLayoutRect(positionInfo, containerRect, margin) {\n margin = formatUtil.normalizeCssArray(margin || 0);\n var containerWidth = containerRect.width;\n var containerHeight = containerRect.height;\n var left = parsePercent(positionInfo.left, containerWidth);\n var top = parsePercent(positionInfo.top, containerHeight);\n var right = parsePercent(positionInfo.right, containerWidth);\n var bottom = parsePercent(positionInfo.bottom, containerHeight);\n var width = parsePercent(positionInfo.width, containerWidth);\n var height = parsePercent(positionInfo.height, containerHeight);\n var verticalMargin = margin[2] + margin[0];\n var horizontalMargin = margin[1] + margin[3];\n var aspect = positionInfo.aspect; // If width is not specified, calculate width from left and right\n\n if (isNaN(width)) {\n width = containerWidth - right - horizontalMargin - left;\n }\n\n if (isNaN(height)) {\n height = containerHeight - bottom - verticalMargin - top;\n }\n\n if (aspect != null) {\n // If width and height are not given\n // 1. Graph should not exceeds the container\n // 2. Aspect must be keeped\n // 3. Graph should take the space as more as possible\n // FIXME\n // Margin is not considered, because there is no case that both\n // using margin and aspect so far.\n if (isNaN(width) && isNaN(height)) {\n if (aspect > containerWidth / containerHeight) {\n width = containerWidth * 0.8;\n } else {\n height = containerHeight * 0.8;\n }\n } // Calculate width or height with given aspect\n\n\n if (isNaN(width)) {\n width = aspect * height;\n }\n\n if (isNaN(height)) {\n height = width / aspect;\n }\n } // If left is not specified, calculate left from right and width\n\n\n if (isNaN(left)) {\n left = containerWidth - right - width - horizontalMargin;\n }\n\n if (isNaN(top)) {\n top = containerHeight - bottom - height - verticalMargin;\n } // Align left and top\n\n\n switch (positionInfo.left || positionInfo.right) {\n case 'center':\n left = containerWidth / 2 - width / 2 - margin[3];\n break;\n\n case 'right':\n left = containerWidth - width - horizontalMargin;\n break;\n }\n\n switch (positionInfo.top || positionInfo.bottom) {\n case 'middle':\n case 'center':\n top = containerHeight / 2 - height / 2 - margin[0];\n break;\n\n case 'bottom':\n top = containerHeight - height - verticalMargin;\n break;\n } // If something is wrong and left, top, width, height are calculated as NaN\n\n\n left = left || 0;\n top = top || 0;\n\n if (isNaN(width)) {\n // Width may be NaN if only one value is given except width\n width = containerWidth - horizontalMargin - left - (right || 0);\n }\n\n if (isNaN(height)) {\n // Height may be NaN if only one value is given except height\n height = containerHeight - verticalMargin - top - (bottom || 0);\n }\n\n var rect = new BoundingRect(left + margin[3], top + margin[0], width, height);\n rect.margin = margin;\n return rect;\n}\n/**\n * Position a zr element in viewport\n * Group position is specified by either\n * {left, top}, {right, bottom}\n * If all properties exists, right and bottom will be igonred.\n *\n * Logic:\n * 1. Scale (against origin point in parent coord)\n * 2. Rotate (against origin point in parent coord)\n * 3. Traslate (with el.position by this method)\n * So this method only fixes the last step 'Traslate', which does not affect\n * scaling and rotating.\n *\n * If be called repeatly with the same input el, the same result will be gotten.\n *\n * @param {module:zrender/Element} el Should have `getBoundingRect` method.\n * @param {Object} positionInfo\n * @param {number|string} [positionInfo.left]\n * @param {number|string} [positionInfo.top]\n * @param {number|string} [positionInfo.right]\n * @param {number|string} [positionInfo.bottom]\n * @param {number|string} [positionInfo.width] Only for opt.boundingModel: 'raw'\n * @param {number|string} [positionInfo.height] Only for opt.boundingModel: 'raw'\n * @param {Object} containerRect\n * @param {string|number} margin\n * @param {Object} [opt]\n * @param {Array.} [opt.hv=[1,1]] Only horizontal or only vertical.\n * @param {Array.} [opt.boundingMode='all']\n * Specify how to calculate boundingRect when locating.\n * 'all': Position the boundingRect that is transformed and uioned\n * both itself and its descendants.\n * This mode simplies confine the elements in the bounding\n * of their container (e.g., using 'right: 0').\n * 'raw': Position the boundingRect that is not transformed and only itself.\n * This mode is useful when you want a element can overflow its\n * container. (Consider a rotated circle needs to be located in a corner.)\n * In this mode positionInfo.width/height can only be number.\n */\n\n\nfunction positionElement(el, positionInfo, containerRect, margin, opt) {\n var h = !opt || !opt.hv || opt.hv[0];\n var v = !opt || !opt.hv || opt.hv[1];\n var boundingMode = opt && opt.boundingMode || 'all';\n\n if (!h && !v) {\n return;\n }\n\n var rect;\n\n if (boundingMode === 'raw') {\n rect = el.type === 'group' ? new BoundingRect(0, 0, +positionInfo.width || 0, +positionInfo.height || 0) : el.getBoundingRect();\n } else {\n rect = el.getBoundingRect();\n\n if (el.needLocalTransform()) {\n var transform = el.getLocalTransform(); // Notice: raw rect may be inner object of el,\n // which should not be modified.\n\n rect = rect.clone();\n rect.applyTransform(transform);\n }\n } // The real width and height can not be specified but calculated by the given el.\n\n\n positionInfo = getLayoutRect(zrUtil.defaults({\n width: rect.width,\n height: rect.height\n }, positionInfo), containerRect, margin); // Because 'tranlate' is the last step in transform\n // (see zrender/core/Transformable#getLocalTransform),\n // we can just only modify el.position to get final result.\n\n var elPos = el.position;\n var dx = h ? positionInfo.x - rect.x : 0;\n var dy = v ? positionInfo.y - rect.y : 0;\n el.attr('position', boundingMode === 'raw' ? [dx, dy] : [elPos[0] + dx, elPos[1] + dy]);\n}\n/**\n * @param {Object} option Contains some of the properties in HV_NAMES.\n * @param {number} hvIdx 0: horizontal; 1: vertical.\n */\n\n\nfunction sizeCalculable(option, hvIdx) {\n return option[HV_NAMES[hvIdx][0]] != null || option[HV_NAMES[hvIdx][1]] != null && option[HV_NAMES[hvIdx][2]] != null;\n}\n/**\n * Consider Case:\n * When defulat option has {left: 0, width: 100}, and we set {right: 0}\n * through setOption or media query, using normal zrUtil.merge will cause\n * {right: 0} does not take effect.\n *\n * @example\n * ComponentModel.extend({\n * init: function () {\n * ...\n * var inputPositionParams = layout.getLayoutParams(option);\n * this.mergeOption(inputPositionParams);\n * },\n * mergeOption: function (newOption) {\n * newOption && zrUtil.merge(thisOption, newOption, true);\n * layout.mergeLayoutParam(thisOption, newOption);\n * }\n * });\n *\n * @param {Object} targetOption\n * @param {Object} newOption\n * @param {Object|string} [opt]\n * @param {boolean|Array.} [opt.ignoreSize=false] Used for the components\n * that width (or height) should not be calculated by left and right (or top and bottom).\n */\n\n\nfunction mergeLayoutParam(targetOption, newOption, opt) {\n !zrUtil.isObject(opt) && (opt = {});\n var ignoreSize = opt.ignoreSize;\n !zrUtil.isArray(ignoreSize) && (ignoreSize = [ignoreSize, ignoreSize]);\n var hResult = merge(HV_NAMES[0], 0);\n var vResult = merge(HV_NAMES[1], 1);\n copy(HV_NAMES[0], targetOption, hResult);\n copy(HV_NAMES[1], targetOption, vResult);\n\n function merge(names, hvIdx) {\n var newParams = {};\n var newValueCount = 0;\n var merged = {};\n var mergedValueCount = 0;\n var enoughParamNumber = 2;\n each(names, function (name) {\n merged[name] = targetOption[name];\n });\n each(names, function (name) {\n // Consider case: newOption.width is null, which is\n // set by user for removing width setting.\n hasProp(newOption, name) && (newParams[name] = merged[name] = newOption[name]);\n hasValue(newParams, name) && newValueCount++;\n hasValue(merged, name) && mergedValueCount++;\n });\n\n if (ignoreSize[hvIdx]) {\n // Only one of left/right is premitted to exist.\n if (hasValue(newOption, names[1])) {\n merged[names[2]] = null;\n } else if (hasValue(newOption, names[2])) {\n merged[names[1]] = null;\n }\n\n return merged;\n } // Case: newOption: {width: ..., right: ...},\n // or targetOption: {right: ...} and newOption: {width: ...},\n // There is no conflict when merged only has params count\n // little than enoughParamNumber.\n\n\n if (mergedValueCount === enoughParamNumber || !newValueCount) {\n return merged;\n } // Case: newOption: {width: ..., right: ...},\n // Than we can make sure user only want those two, and ignore\n // all origin params in targetOption.\n else if (newValueCount >= enoughParamNumber) {\n return newParams;\n } else {\n // Chose another param from targetOption by priority.\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n\n if (!hasProp(newParams, name) && hasProp(targetOption, name)) {\n newParams[name] = targetOption[name];\n break;\n }\n }\n\n return newParams;\n }\n }\n\n function hasProp(obj, name) {\n return obj.hasOwnProperty(name);\n }\n\n function hasValue(obj, name) {\n return obj[name] != null && obj[name] !== 'auto';\n }\n\n function copy(names, target, source) {\n each(names, function (name) {\n target[name] = source[name];\n });\n }\n}\n/**\n * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object.\n * @param {Object} source\n * @return {Object} Result contains those props.\n */\n\n\nfunction getLayoutParams(source) {\n return copyLayoutParams({}, source);\n}\n/**\n * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object.\n * @param {Object} source\n * @return {Object} Result contains those props.\n */\n\n\nfunction copyLayoutParams(target, source) {\n source && target && each(LOCATION_PARAMS, function (name) {\n source.hasOwnProperty(name) && (target[name] = source[name]);\n });\n return target;\n}\n\nexports.LOCATION_PARAMS = LOCATION_PARAMS;\nexports.HV_NAMES = HV_NAMES;\nexports.box = box;\nexports.vbox = vbox;\nexports.hbox = hbox;\nexports.getAvailableSize = getAvailableSize;\nexports.getLayoutRect = getLayoutRect;\nexports.positionElement = positionElement;\nexports.sizeCalculable = sizeCalculable;\nexports.mergeLayoutParam = mergeLayoutParam;\nexports.getLayoutParams = getLayoutParams;\nexports.copyLayoutParams = copyLayoutParams;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 _util = require(\"zrender/lib/core/util\");\n\nvar retrieve = _util.retrieve;\nvar defaults = _util.defaults;\nvar extend = _util.extend;\nvar each = _util.each;\n\nvar formatUtil = require(\"../../util/format\");\n\nvar graphic = require(\"../../util/graphic\");\n\nvar Model = require(\"../../model/Model\");\n\nvar _number = require(\"../../util/number\");\n\nvar isRadianAroundZero = _number.isRadianAroundZero;\nvar remRadian = _number.remRadian;\n\nvar _symbol = require(\"../../util/symbol\");\n\nvar createSymbol = _symbol.createSymbol;\n\nvar matrixUtil = require(\"zrender/lib/core/matrix\");\n\nvar _vector = require(\"zrender/lib/core/vector\");\n\nvar v2ApplyTransform = _vector.applyTransform;\n\nvar _axisHelper = require(\"../../coord/axisHelper\");\n\nvar shouldShowAllLabels = _axisHelper.shouldShowAllLabels;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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;\n/**\n * A final axis is translated and rotated from a \"standard axis\".\n * So opt.position and opt.rotation is required.\n *\n * A standard axis is and axis from [0, 0] to [0, axisExtent[1]],\n * for example: (0, 0) ------------> (0, 50)\n *\n * nameDirection or tickDirection or labelDirection is 1 means tick\n * or label is below the standard axis, whereas is -1 means above\n * the standard axis. labelOffset means offset between label and axis,\n * which is useful when 'onZero', where axisLabel is in the grid and\n * label in outside grid.\n *\n * Tips: like always,\n * positive rotation represents anticlockwise, and negative rotation\n * represents clockwise.\n * The direction of position coordinate is the same as the direction\n * of screen coordinate.\n *\n * Do not need to consider axis 'inverse', which is auto processed by\n * axis extent.\n *\n * @param {module:zrender/container/Group} group\n * @param {Object} axisModel\n * @param {Object} opt Standard axis parameters.\n * @param {Array.} opt.position [x, y]\n * @param {number} opt.rotation by radian\n * @param {number} [opt.nameDirection=1] 1 or -1 Used when nameLocation is 'middle' or 'center'.\n * @param {number} [opt.tickDirection=1] 1 or -1\n * @param {number} [opt.labelDirection=1] 1 or -1\n * @param {number} [opt.labelOffset=0] Usefull when onZero.\n * @param {string} [opt.axisLabelShow] default get from axisModel.\n * @param {string} [opt.axisName] default get from axisModel.\n * @param {number} [opt.axisNameAvailableWidth]\n * @param {number} [opt.labelRotate] by degree, default get from axisModel.\n * @param {number} [opt.strokeContainThreshold] Default label interval when label\n * @param {number} [opt.nameTruncateMaxWidth]\n */\n\nvar AxisBuilder = function (axisModel, opt) {\n /**\n * @readOnly\n */\n this.opt = opt;\n /**\n * @readOnly\n */\n\n this.axisModel = axisModel; // Default value\n\n defaults(opt, {\n labelOffset: 0,\n nameDirection: 1,\n tickDirection: 1,\n labelDirection: 1,\n silent: true\n });\n /**\n * @readOnly\n */\n\n this.group = new graphic.Group(); // FIXME Not use a seperate text group?\n\n var dumbGroup = new graphic.Group({\n position: opt.position.slice(),\n rotation: opt.rotation\n }); // this.group.add(dumbGroup);\n // this._dumbGroup = dumbGroup;\n\n dumbGroup.updateTransform();\n this._transform = dumbGroup.transform;\n this._dumbGroup = dumbGroup;\n};\n\nAxisBuilder.prototype = {\n constructor: AxisBuilder,\n hasBuilder: function (name) {\n return !!builders[name];\n },\n add: function (name) {\n builders[name].call(this);\n },\n getGroup: function () {\n return this.group;\n }\n};\nvar builders = {\n /**\n * @private\n */\n axisLine: function () {\n var opt = this.opt;\n var axisModel = this.axisModel;\n\n if (!axisModel.get('axisLine.show')) {\n return;\n }\n\n var extent = this.axisModel.axis.getExtent();\n var matrix = this._transform;\n var pt1 = [extent[0], 0];\n var pt2 = [extent[1], 0];\n\n if (matrix) {\n v2ApplyTransform(pt1, pt1, matrix);\n v2ApplyTransform(pt2, pt2, matrix);\n }\n\n var lineStyle = extend({\n lineCap: 'round'\n }, axisModel.getModel('axisLine.lineStyle').getLineStyle());\n this.group.add(new graphic.Line({\n // Id for animation\n anid: 'line',\n subPixelOptimize: true,\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n },\n style: lineStyle,\n strokeContainThreshold: opt.strokeContainThreshold || 5,\n silent: true,\n z2: 1\n }));\n var arrows = axisModel.get('axisLine.symbol');\n var arrowSize = axisModel.get('axisLine.symbolSize');\n var arrowOffset = axisModel.get('axisLine.symbolOffset') || 0;\n\n if (typeof arrowOffset === 'number') {\n arrowOffset = [arrowOffset, arrowOffset];\n }\n\n if (arrows != null) {\n if (typeof arrows === 'string') {\n // Use the same arrow for start and end point\n arrows = [arrows, arrows];\n }\n\n if (typeof arrowSize === 'string' || typeof arrowSize === 'number') {\n // Use the same size for width and height\n arrowSize = [arrowSize, arrowSize];\n }\n\n var symbolWidth = arrowSize[0];\n var symbolHeight = arrowSize[1];\n each([{\n rotate: opt.rotation + Math.PI / 2,\n offset: arrowOffset[0],\n r: 0\n }, {\n rotate: opt.rotation - Math.PI / 2,\n offset: arrowOffset[1],\n r: Math.sqrt((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))\n }], function (point, index) {\n if (arrows[index] !== 'none' && arrows[index] != null) {\n var symbol = createSymbol(arrows[index], -symbolWidth / 2, -symbolHeight / 2, symbolWidth, symbolHeight, lineStyle.stroke, true); // Calculate arrow position with offset\n\n var r = point.r + point.offset;\n var pos = [pt1[0] + r * Math.cos(opt.rotation), pt1[1] - r * Math.sin(opt.rotation)];\n symbol.attr({\n rotation: point.rotate,\n position: pos,\n silent: true,\n z2: 11\n });\n this.group.add(symbol);\n }\n }, this);\n }\n },\n\n /**\n * @private\n */\n axisTickLabel: function () {\n var axisModel = this.axisModel;\n var opt = this.opt;\n var ticksEls = buildAxisMajorTicks(this, axisModel, opt);\n var labelEls = buildAxisLabel(this, axisModel, opt);\n fixMinMaxLabelShow(axisModel, labelEls, ticksEls);\n buildAxisMinorTicks(this, axisModel, opt);\n },\n\n /**\n * @private\n */\n axisName: function () {\n var opt = this.opt;\n var axisModel = this.axisModel;\n var name = retrieve(opt.axisName, axisModel.get('name'));\n\n if (!name) {\n return;\n }\n\n var nameLocation = axisModel.get('nameLocation');\n var nameDirection = opt.nameDirection;\n var textStyleModel = axisModel.getModel('nameTextStyle');\n var gap = axisModel.get('nameGap') || 0;\n var extent = this.axisModel.axis.getExtent();\n var gapSignal = extent[0] > extent[1] ? -1 : 1;\n var pos = [nameLocation === 'start' ? extent[0] - gapSignal * gap : nameLocation === 'end' ? extent[1] + gapSignal * gap : (extent[0] + extent[1]) / 2, // 'middle'\n // Reuse labelOffset.\n isNameLocationCenter(nameLocation) ? opt.labelOffset + nameDirection * gap : 0];\n var labelLayout;\n var nameRotation = axisModel.get('nameRotate');\n\n if (nameRotation != null) {\n nameRotation = nameRotation * PI / 180; // To radian.\n }\n\n var axisNameAvailableWidth;\n\n if (isNameLocationCenter(nameLocation)) {\n labelLayout = innerTextLayout(opt.rotation, nameRotation != null ? nameRotation : opt.rotation, // Adapt to axis.\n nameDirection);\n } else {\n labelLayout = endTextLayout(opt, nameLocation, nameRotation || 0, extent);\n axisNameAvailableWidth = opt.axisNameAvailableWidth;\n\n if (axisNameAvailableWidth != null) {\n axisNameAvailableWidth = Math.abs(axisNameAvailableWidth / Math.sin(labelLayout.rotation));\n !isFinite(axisNameAvailableWidth) && (axisNameAvailableWidth = null);\n }\n }\n\n var textFont = textStyleModel.getFont();\n var truncateOpt = axisModel.get('nameTruncate', true) || {};\n var ellipsis = truncateOpt.ellipsis;\n var maxWidth = retrieve(opt.nameTruncateMaxWidth, truncateOpt.maxWidth, axisNameAvailableWidth); // FIXME\n // truncate rich text? (consider performance)\n\n var truncatedText = ellipsis != null && maxWidth != null ? formatUtil.truncateText(name, maxWidth, textFont, ellipsis, {\n minChar: 2,\n placeholder: truncateOpt.placeholder\n }) : name;\n var tooltipOpt = axisModel.get('tooltip', true);\n var mainType = axisModel.mainType;\n var formatterParams = {\n componentType: mainType,\n name: name,\n $vars: ['name']\n };\n formatterParams[mainType + 'Index'] = axisModel.componentIndex;\n var textEl = new graphic.Text({\n // Id for animation\n anid: 'name',\n __fullText: name,\n __truncatedText: truncatedText,\n position: pos,\n rotation: labelLayout.rotation,\n silent: isLabelSilent(axisModel),\n z2: 1,\n tooltip: tooltipOpt && tooltipOpt.show ? extend({\n content: name,\n formatter: function () {\n return name;\n },\n formatterParams: formatterParams\n }, tooltipOpt) : null\n });\n graphic.setTextStyle(textEl.style, textStyleModel, {\n text: truncatedText,\n textFont: textFont,\n textFill: textStyleModel.getTextColor() || axisModel.get('axisLine.lineStyle.color'),\n textAlign: textStyleModel.get('align') || labelLayout.textAlign,\n textVerticalAlign: textStyleModel.get('verticalAlign') || labelLayout.textVerticalAlign\n });\n\n if (axisModel.get('triggerEvent')) {\n textEl.eventData = makeAxisEventDataBase(axisModel);\n textEl.eventData.targetType = 'axisName';\n textEl.eventData.name = name;\n } // FIXME\n\n\n this._dumbGroup.add(textEl);\n\n textEl.updateTransform();\n this.group.add(textEl);\n textEl.decomposeTransform();\n }\n};\n\nvar makeAxisEventDataBase = AxisBuilder.makeAxisEventDataBase = function (axisModel) {\n var eventData = {\n componentType: axisModel.mainType,\n componentIndex: axisModel.componentIndex\n };\n eventData[axisModel.mainType + 'Index'] = axisModel.componentIndex;\n return eventData;\n};\n/**\n * @public\n * @static\n * @param {Object} opt\n * @param {number} axisRotation in radian\n * @param {number} textRotation in radian\n * @param {number} direction\n * @return {Object} {\n * rotation, // according to axis\n * textAlign,\n * textVerticalAlign\n * }\n */\n\n\nvar innerTextLayout = AxisBuilder.innerTextLayout = function (axisRotation, textRotation, direction) {\n var rotationDiff = remRadian(textRotation - axisRotation);\n var textAlign;\n var textVerticalAlign;\n\n if (isRadianAroundZero(rotationDiff)) {\n // Label is parallel with axis line.\n textVerticalAlign = direction > 0 ? 'top' : 'bottom';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI)) {\n // Label is inverse parallel with axis line.\n textVerticalAlign = direction > 0 ? 'bottom' : 'top';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n\n if (rotationDiff > 0 && rotationDiff < PI) {\n textAlign = direction > 0 ? 'right' : 'left';\n } else {\n textAlign = direction > 0 ? 'left' : 'right';\n }\n }\n\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n};\n\nfunction endTextLayout(opt, textPosition, textRotate, extent) {\n var rotationDiff = remRadian(textRotate - opt.rotation);\n var textAlign;\n var textVerticalAlign;\n var inverse = extent[0] > extent[1];\n var onLeft = textPosition === 'start' && !inverse || textPosition !== 'start' && inverse;\n\n if (isRadianAroundZero(rotationDiff - PI / 2)) {\n textVerticalAlign = onLeft ? 'bottom' : 'top';\n textAlign = 'center';\n } else if (isRadianAroundZero(rotationDiff - PI * 1.5)) {\n textVerticalAlign = onLeft ? 'top' : 'bottom';\n textAlign = 'center';\n } else {\n textVerticalAlign = 'middle';\n\n if (rotationDiff < PI * 1.5 && rotationDiff > PI / 2) {\n textAlign = onLeft ? 'left' : 'right';\n } else {\n textAlign = onLeft ? 'right' : 'left';\n }\n }\n\n return {\n rotation: rotationDiff,\n textAlign: textAlign,\n textVerticalAlign: textVerticalAlign\n };\n}\n\nvar isLabelSilent = AxisBuilder.isLabelSilent = function (axisModel) {\n var tooltipOpt = axisModel.get('tooltip');\n return axisModel.get('silent') // Consider mouse cursor, add these restrictions.\n || !(axisModel.get('triggerEvent') || tooltipOpt && tooltipOpt.show);\n};\n\nfunction fixMinMaxLabelShow(axisModel, labelEls, tickEls) {\n if (shouldShowAllLabels(axisModel.axis)) {\n return;\n } // If min or max are user set, we need to check\n // If the tick on min(max) are overlap on their neighbour tick\n // If they are overlapped, we need to hide the min(max) tick label\n\n\n var showMinLabel = axisModel.get('axisLabel.showMinLabel');\n var showMaxLabel = axisModel.get('axisLabel.showMaxLabel'); // FIXME\n // Have not consider onBand yet, where tick els is more than label els.\n\n labelEls = labelEls || [];\n tickEls = tickEls || [];\n var firstLabel = labelEls[0];\n var nextLabel = labelEls[1];\n var lastLabel = labelEls[labelEls.length - 1];\n var prevLabel = labelEls[labelEls.length - 2];\n var firstTick = tickEls[0];\n var nextTick = tickEls[1];\n var lastTick = tickEls[tickEls.length - 1];\n var prevTick = tickEls[tickEls.length - 2];\n\n if (showMinLabel === false) {\n ignoreEl(firstLabel);\n ignoreEl(firstTick);\n } else if (isTwoLabelOverlapped(firstLabel, nextLabel)) {\n if (showMinLabel) {\n ignoreEl(nextLabel);\n ignoreEl(nextTick);\n } else {\n ignoreEl(firstLabel);\n ignoreEl(firstTick);\n }\n }\n\n if (showMaxLabel === false) {\n ignoreEl(lastLabel);\n ignoreEl(lastTick);\n } else if (isTwoLabelOverlapped(prevLabel, lastLabel)) {\n if (showMaxLabel) {\n ignoreEl(prevLabel);\n ignoreEl(prevTick);\n } else {\n ignoreEl(lastLabel);\n ignoreEl(lastTick);\n }\n }\n}\n\nfunction ignoreEl(el) {\n el && (el.ignore = true);\n}\n\nfunction isTwoLabelOverlapped(current, next, labelLayout) {\n // current and next has the same rotation.\n var firstRect = current && current.getBoundingRect().clone();\n var nextRect = next && next.getBoundingRect().clone();\n\n if (!firstRect || !nextRect) {\n return;\n } // When checking intersect of two rotated labels, we use mRotationBack\n // to avoid that boundingRect is enlarge when using `boundingRect.applyTransform`.\n\n\n var mRotationBack = matrixUtil.identity([]);\n matrixUtil.rotate(mRotationBack, mRotationBack, -current.rotation);\n firstRect.applyTransform(matrixUtil.mul([], mRotationBack, current.getLocalTransform()));\n nextRect.applyTransform(matrixUtil.mul([], mRotationBack, next.getLocalTransform()));\n return firstRect.intersect(nextRect);\n}\n\nfunction isNameLocationCenter(nameLocation) {\n return nameLocation === 'middle' || nameLocation === 'center';\n}\n\nfunction createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, aniid) {\n var tickEls = [];\n var pt1 = [];\n var pt2 = [];\n\n for (var i = 0; i < ticksCoords.length; i++) {\n var tickCoord = ticksCoords[i].coord;\n pt1[0] = tickCoord;\n pt1[1] = 0;\n pt2[0] = tickCoord;\n pt2[1] = tickEndCoord;\n\n if (tickTransform) {\n v2ApplyTransform(pt1, pt1, tickTransform);\n v2ApplyTransform(pt2, pt2, tickTransform);\n } // Tick line, Not use group transform to have better line draw\n\n\n var tickEl = new graphic.Line({\n // Id for animation\n anid: aniid + '_' + ticksCoords[i].tickValue,\n subPixelOptimize: true,\n shape: {\n x1: pt1[0],\n y1: pt1[1],\n x2: pt2[0],\n y2: pt2[1]\n },\n style: tickLineStyle,\n z2: 2,\n silent: true\n });\n tickEls.push(tickEl);\n }\n\n return tickEls;\n}\n\nfunction buildAxisMajorTicks(axisBuilder, axisModel, opt) {\n var axis = axisModel.axis;\n var tickModel = axisModel.getModel('axisTick');\n\n if (!tickModel.get('show') || axis.scale.isBlank()) {\n return;\n }\n\n var lineStyleModel = tickModel.getModel('lineStyle');\n var tickEndCoord = opt.tickDirection * tickModel.get('length');\n var ticksCoords = axis.getTicksCoords();\n var ticksEls = createTicks(ticksCoords, axisBuilder._transform, tickEndCoord, defaults(lineStyleModel.getLineStyle(), {\n stroke: axisModel.get('axisLine.lineStyle.color')\n }), 'ticks');\n\n for (var i = 0; i < ticksEls.length; i++) {\n axisBuilder.group.add(ticksEls[i]);\n }\n\n return ticksEls;\n}\n\nfunction buildAxisMinorTicks(axisBuilder, axisModel, opt) {\n var axis = axisModel.axis;\n var minorTickModel = axisModel.getModel('minorTick');\n\n if (!minorTickModel.get('show') || axis.scale.isBlank()) {\n return;\n }\n\n var minorTicksCoords = axis.getMinorTicksCoords();\n\n if (!minorTicksCoords.length) {\n return;\n }\n\n var lineStyleModel = minorTickModel.getModel('lineStyle');\n var tickEndCoord = opt.tickDirection * minorTickModel.get('length');\n var minorTickLineStyle = defaults(lineStyleModel.getLineStyle(), defaults(axisModel.getModel('axisTick').getLineStyle(), {\n stroke: axisModel.get('axisLine.lineStyle.color')\n }));\n\n for (var i = 0; i < minorTicksCoords.length; i++) {\n var minorTicksEls = createTicks(minorTicksCoords[i], axisBuilder._transform, tickEndCoord, minorTickLineStyle, 'minorticks_' + i);\n\n for (var k = 0; k < minorTicksEls.length; k++) {\n axisBuilder.group.add(minorTicksEls[k]);\n }\n }\n}\n\nfunction buildAxisLabel(axisBuilder, axisModel, opt) {\n var axis = axisModel.axis;\n var show = retrieve(opt.axisLabelShow, axisModel.get('axisLabel.show'));\n\n if (!show || axis.scale.isBlank()) {\n return;\n }\n\n var labelModel = axisModel.getModel('axisLabel');\n var labelMargin = labelModel.get('margin');\n var labels = axis.getViewLabels(); // Special label rotate.\n\n var labelRotation = (retrieve(opt.labelRotate, labelModel.get('rotate')) || 0) * PI / 180;\n var labelLayout = innerTextLayout(opt.rotation, labelRotation, opt.labelDirection);\n var rawCategoryData = axisModel.getCategories && axisModel.getCategories(true);\n var labelEls = [];\n var silent = isLabelSilent(axisModel);\n var triggerEvent = axisModel.get('triggerEvent');\n each(labels, function (labelItem, index) {\n var tickValue = labelItem.tickValue;\n var formattedLabel = labelItem.formattedLabel;\n var rawLabel = labelItem.rawLabel;\n var itemLabelModel = labelModel;\n\n if (rawCategoryData && rawCategoryData[tickValue] && rawCategoryData[tickValue].textStyle) {\n itemLabelModel = new Model(rawCategoryData[tickValue].textStyle, labelModel, axisModel.ecModel);\n }\n\n var textColor = itemLabelModel.getTextColor() || axisModel.get('axisLine.lineStyle.color');\n var tickCoord = axis.dataToCoord(tickValue);\n var pos = [tickCoord, opt.labelOffset + opt.labelDirection * labelMargin];\n var textEl = new graphic.Text({\n // Id for animation\n anid: 'label_' + tickValue,\n position: pos,\n rotation: labelLayout.rotation,\n silent: silent,\n z2: 10\n });\n graphic.setTextStyle(textEl.style, itemLabelModel, {\n text: formattedLabel,\n textAlign: itemLabelModel.getShallow('align', true) || labelLayout.textAlign,\n textVerticalAlign: itemLabelModel.getShallow('verticalAlign', true) || itemLabelModel.getShallow('baseline', true) || labelLayout.textVerticalAlign,\n textFill: typeof textColor === 'function' ? textColor( // (1) In category axis with data zoom, tick is not the original\n // index of axis.data. So tick should not be exposed to user\n // in category axis.\n // (2) Compatible with previous version, which always use formatted label as\n // input. But in interval scale the formatted label is like '223,445', which\n // maked user repalce ','. So we modify it to return original val but remain\n // it as 'string' to avoid error in replacing.\n axis.type === 'category' ? rawLabel : axis.type === 'value' ? tickValue + '' : tickValue, index) : textColor\n }); // Pack data for mouse event\n\n if (triggerEvent) {\n textEl.eventData = makeAxisEventDataBase(axisModel);\n textEl.eventData.targetType = 'axisLabel';\n textEl.eventData.value = rawLabel;\n } // FIXME\n\n\n axisBuilder._dumbGroup.add(textEl);\n\n textEl.updateTransform();\n labelEls.push(textEl);\n axisBuilder.group.add(textEl);\n textEl.decomposeTransform();\n });\n return labelEls;\n}\n\nvar _default = AxisBuilder;\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;\nvar isArray = _util.isArray;\nvar isObject = _util.isObject;\n\nvar compatStyle = require(\"./helper/compatStyle\");\n\nvar _model = require(\"../util/model\");\n\nvar normalizeToArray = _model.normalizeToArray;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n// Compatitable with 2.0\nfunction get(opt, path) {\n path = path.split(',');\n var obj = opt;\n\n for (var i = 0; i < path.length; i++) {\n obj = obj && obj[path[i]];\n\n if (obj == null) {\n break;\n }\n }\n\n return obj;\n}\n\nfunction set(opt, path, val, overwrite) {\n path = path.split(',');\n var obj = opt;\n var key;\n\n for (var i = 0; i < path.length - 1; i++) {\n key = path[i];\n\n if (obj[key] == null) {\n obj[key] = {};\n }\n\n obj = obj[key];\n }\n\n if (overwrite || obj[path[i]] == null) {\n obj[path[i]] = val;\n }\n}\n\nfunction compatLayoutProperties(option) {\n each(LAYOUT_PROPERTIES, function (prop) {\n if (prop[0] in option && !(prop[1] in option)) {\n option[prop[1]] = option[prop[0]];\n }\n });\n}\n\nvar LAYOUT_PROPERTIES = [['x', 'left'], ['y', 'top'], ['x2', 'right'], ['y2', 'bottom']];\nvar COMPATITABLE_COMPONENTS = ['grid', 'geo', 'parallel', 'legend', 'toolbox', 'title', 'visualMap', 'dataZoom', 'timeline'];\n\nfunction _default(option, isTheme) {\n compatStyle(option, isTheme); // Make sure series array for model initialization.\n\n option.series = normalizeToArray(option.series);\n each(option.series, function (seriesOpt) {\n if (!isObject(seriesOpt)) {\n return;\n }\n\n var seriesType = seriesOpt.type;\n\n if (seriesType === 'line') {\n if (seriesOpt.clipOverflow != null) {\n seriesOpt.clip = seriesOpt.clipOverflow;\n }\n } else if (seriesType === 'pie' || seriesType === 'gauge') {\n if (seriesOpt.clockWise != null) {\n seriesOpt.clockwise = seriesOpt.clockWise;\n }\n } else if (seriesType === 'gauge') {\n var pointerColor = get(seriesOpt, 'pointer.color');\n pointerColor != null && set(seriesOpt, 'itemStyle.color', pointerColor);\n }\n\n compatLayoutProperties(seriesOpt);\n }); // dataRange has changed to visualMap\n\n if (option.dataRange) {\n option.visualMap = option.dataRange;\n }\n\n each(COMPATITABLE_COMPONENTS, function (componentName) {\n var options = option[componentName];\n\n if (options) {\n if (!isArray(options)) {\n options = [options];\n }\n\n each(options, function (option) {\n compatLayoutProperties(option);\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 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 RadiusAxis = require(\"./RadiusAxis\");\n\nvar AngleAxis = require(\"./AngleAxis\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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/coord/polar/Polar\n */\n\n/**\n * @alias {module:echarts/coord/polar/Polar}\n * @constructor\n * @param {string} name\n */\nvar Polar = function (name) {\n /**\n * @type {string}\n */\n this.name = name || '';\n /**\n * x of polar center\n * @type {number}\n */\n\n this.cx = 0;\n /**\n * y of polar center\n * @type {number}\n */\n\n this.cy = 0;\n /**\n * @type {module:echarts/coord/polar/RadiusAxis}\n * @private\n */\n\n this._radiusAxis = new RadiusAxis();\n /**\n * @type {module:echarts/coord/polar/AngleAxis}\n * @private\n */\n\n this._angleAxis = new AngleAxis();\n this._radiusAxis.polar = this._angleAxis.polar = this;\n};\n\nPolar.prototype = {\n type: 'polar',\n axisPointerEnabled: true,\n constructor: Polar,\n\n /**\n * @param {Array.}\n * @readOnly\n */\n dimensions: ['radius', 'angle'],\n\n /**\n * @type {module:echarts/coord/PolarModel}\n */\n model: null,\n\n /**\n * If contain coord\n * @param {Array.} point\n * @return {boolean}\n */\n containPoint: function (point) {\n var coord = this.pointToCoord(point);\n return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]);\n },\n\n /**\n * If contain data\n * @param {Array.} data\n * @return {boolean}\n */\n containData: function (data) {\n return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]);\n },\n\n /**\n * @param {string} dim\n * @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n */\n getAxis: function (dim) {\n return this['_' + dim + 'Axis'];\n },\n\n /**\n * @return {Array.}\n */\n getAxes: function () {\n return [this._radiusAxis, this._angleAxis];\n },\n\n /**\n * Get axes by type of scale\n * @param {string} scaleType\n * @return {module:echarts/coord/polar/AngleAxis|module:echarts/coord/polar/RadiusAxis}\n */\n getAxesByScale: function (scaleType) {\n var axes = [];\n var angleAxis = this._angleAxis;\n var radiusAxis = this._radiusAxis;\n angleAxis.scale.type === scaleType && axes.push(angleAxis);\n radiusAxis.scale.type === scaleType && axes.push(radiusAxis);\n return axes;\n },\n\n /**\n * @return {module:echarts/coord/polar/AngleAxis}\n */\n getAngleAxis: function () {\n return this._angleAxis;\n },\n\n /**\n * @return {module:echarts/coord/polar/RadiusAxis}\n */\n getRadiusAxis: function () {\n return this._radiusAxis;\n },\n\n /**\n * @param {module:echarts/coord/polar/Axis}\n * @return {module:echarts/coord/polar/Axis}\n */\n getOtherAxis: function (axis) {\n var angleAxis = this._angleAxis;\n return axis === angleAxis ? this._radiusAxis : angleAxis;\n },\n\n /**\n * Base axis will be used on stacking.\n *\n * @return {module:echarts/coord/polar/Axis}\n */\n getBaseAxis: function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis();\n },\n\n /**\n * @param {string} [dim] 'radius' or 'angle' or 'auto' or null/undefined\n * @return {Object} {baseAxes: [], otherAxes: []}\n */\n getTooltipAxes: function (dim) {\n var baseAxis = dim != null && dim !== 'auto' ? this.getAxis(dim) : this.getBaseAxis();\n return {\n baseAxes: [baseAxis],\n otherAxes: [this.getOtherAxis(baseAxis)]\n };\n },\n\n /**\n * Convert a single data item to (x, y) point.\n * Parameter data is an array which the first element is radius and the second is angle\n * @param {Array.} data\n * @param {boolean} [clamp=false]\n * @return {Array.}\n */\n dataToPoint: function (data, clamp) {\n return this.coordToPoint([this._radiusAxis.dataToRadius(data[0], clamp), this._angleAxis.dataToAngle(data[1], clamp)]);\n },\n\n /**\n * Convert a (x, y) point to data\n * @param {Array.} point\n * @param {boolean} [clamp=false]\n * @return {Array.}\n */\n pointToData: function (point, clamp) {\n var coord = this.pointToCoord(point);\n return [this._radiusAxis.radiusToData(coord[0], clamp), this._angleAxis.angleToData(coord[1], clamp)];\n },\n\n /**\n * Convert a (x, y) point to (radius, angle) coord\n * @param {Array.} point\n * @return {Array.}\n */\n pointToCoord: function (point) {\n var dx = point[0] - this.cx;\n var dy = point[1] - this.cy;\n var angleAxis = this.getAngleAxis();\n var extent = angleAxis.getExtent();\n var minAngle = Math.min(extent[0], extent[1]);\n var maxAngle = Math.max(extent[0], extent[1]); // Fix fixed extent in polarCreator\n // FIXME\n\n angleAxis.inverse ? minAngle = maxAngle - 360 : maxAngle = minAngle + 360;\n var radius = Math.sqrt(dx * dx + dy * dy);\n dx /= radius;\n dy /= radius;\n var radian = Math.atan2(-dy, dx) / Math.PI * 180; // move to angleExtent\n\n var dir = radian < minAngle ? 1 : -1;\n\n while (radian < minAngle || radian > maxAngle) {\n radian += dir * 360;\n }\n\n return [radius, radian];\n },\n\n /**\n * Convert a (radius, angle) coord to (x, y) point\n * @param {Array.} coord\n * @return {Array.}\n */\n coordToPoint: function (coord) {\n var radius = coord[0];\n var radian = coord[1] / 180 * Math.PI;\n var x = Math.cos(radian) * radius + this.cx; // Inverse the y\n\n var y = -Math.sin(radian) * radius + this.cy;\n return [x, y];\n },\n\n /**\n * Get ring area of cartesian.\n * Area will have a contain function to determine if a point is in the coordinate system.\n * @return {Ring}\n */\n getArea: function () {\n var angleAxis = this.getAngleAxis();\n var radiusAxis = this.getRadiusAxis();\n var radiusExtent = radiusAxis.getExtent().slice();\n radiusExtent[0] > radiusExtent[1] && radiusExtent.reverse();\n var angleExtent = angleAxis.getExtent();\n var RADIAN = Math.PI / 180;\n return {\n cx: this.cx,\n cy: this.cy,\n r0: radiusExtent[0],\n r: radiusExtent[1],\n startAngle: -angleExtent[0] * RADIAN,\n endAngle: -angleExtent[1] * RADIAN,\n clockwise: angleAxis.inverse,\n contain: function (x, y) {\n // It's a ring shape.\n // Start angle and end angle don't matter\n var dx = x - this.cx;\n var dy = y - this.cy;\n var d2 = dx * dx + dy * dy;\n var r = this.r;\n var r0 = this.r0;\n return d2 <= r * r && d2 >= r0 * r0;\n }\n };\n }\n};\nvar _default = Polar;\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 Gradient = require(\"zrender/lib/graphic/Gradient\");\n\nvar _util = require(\"zrender/lib/core/util\");\n\nvar isFunction = _util.isFunction;\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 = {\n createOnAllSeries: true,\n performRawSeries: true,\n reset: function (seriesModel, ecModel) {\n var data = seriesModel.getData();\n var colorAccessPath = (seriesModel.visualColorAccessPath || 'itemStyle.color').split('.'); // Set in itemStyle\n\n var color = seriesModel.get(colorAccessPath);\n var colorCallback = isFunction(color) && !(color instanceof Gradient) ? color : null; // Default color\n\n if (!color || colorCallback) {\n color = seriesModel.getColorFromPalette( // TODO series count changed.\n seriesModel.name, null, ecModel.getSeriesCount());\n }\n\n data.setVisual('color', color);\n var borderColorAccessPath = (seriesModel.visualBorderColorAccessPath || 'itemStyle.borderColor').split('.');\n var borderColor = seriesModel.get(borderColorAccessPath);\n data.setVisual('borderColor', borderColor); // Only visible series has each data be visual encoded\n\n if (!ecModel.isSeriesFiltered(seriesModel)) {\n if (colorCallback) {\n data.each(function (idx) {\n data.setItemVisual(idx, 'color', colorCallback(seriesModel.getDataParams(idx)));\n });\n } // itemStyle in each data item\n\n\n var dataEach = function (data, idx) {\n var itemModel = data.getItemModel(idx);\n var color = itemModel.get(colorAccessPath, true);\n var borderColor = itemModel.get(borderColorAccessPath, true);\n\n if (color != null) {\n data.setItemVisual(idx, 'color', color);\n }\n\n if (borderColor != null) {\n data.setItemVisual(idx, 'borderColor', borderColor);\n }\n };\n\n return {\n dataEach: data.hasItemOption ? dataEach : 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\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 samplers = {\n average: function (frame) {\n var sum = 0;\n var count = 0;\n\n for (var i = 0; i < frame.length; i++) {\n if (!isNaN(frame[i])) {\n sum += frame[i];\n count++;\n }\n } // Return NaN if count is 0\n\n\n return count === 0 ? NaN : sum / count;\n },\n sum: function (frame) {\n var sum = 0;\n\n for (var i = 0; i < frame.length; i++) {\n // Ignore NaN\n sum += frame[i] || 0;\n }\n\n return sum;\n },\n max: function (frame) {\n var max = -Infinity;\n\n for (var i = 0; i < frame.length; i++) {\n frame[i] > max && (max = frame[i]);\n } // NaN will cause illegal axis extent.\n\n\n return isFinite(max) ? max : NaN;\n },\n min: function (frame) {\n var min = Infinity;\n\n for (var i = 0; i < frame.length; i++) {\n frame[i] < min && (min = frame[i]);\n } // NaN will cause illegal axis extent.\n\n\n return isFinite(min) ? min : NaN;\n },\n // TODO\n // Median\n nearest: function (frame) {\n return frame[0];\n }\n};\n\nvar indexSampler = function (frame, value) {\n return Math.round(frame.length / 2);\n};\n\nfunction _default(seriesType) {\n return {\n seriesType: seriesType,\n modifyOutputEnd: true,\n reset: function (seriesModel, ecModel, api) {\n var data = seriesModel.getData();\n var sampling = seriesModel.get('sampling');\n var coordSys = seriesModel.coordinateSystem; // Only cartesian2d support down sampling\n\n if (coordSys.type === 'cartesian2d' && sampling) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var extent = baseAxis.getExtent(); // Coordinste system has been resized\n\n var size = Math.abs(extent[1] - extent[0]);\n var rate = Math.round(data.count() / size);\n\n if (rate > 1) {\n var sampler;\n\n if (typeof sampling === 'string') {\n sampler = samplers[sampling];\n } else if (typeof sampling === 'function') {\n sampler = sampling;\n }\n\n if (sampler) {\n // Only support sample the first dim mapped from value axis.\n seriesModel.setData(data.downSample(data.mapDimension(valueAxis.dim), 1 / rate, sampler, indexSampler));\n }\n }\n }\n }\n };\n}\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 textContain = require(\"zrender/lib/contain/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*/\nvar PATH_COLOR = ['textStyle', 'color'];\nvar _default = {\n /**\n * Get color property or get color from option.textStyle.color\n * @param {boolean} [isEmphasis]\n * @return {string}\n */\n getTextColor: function (isEmphasis) {\n var ecModel = this.ecModel;\n return this.getShallow('color') || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null);\n },\n\n /**\n * Create font string from fontStyle, fontWeight, fontSize, fontFamily\n * @return {string}\n */\n getFont: function () {\n return graphicUtil.getFont({\n fontStyle: this.getShallow('fontStyle'),\n fontWeight: this.getShallow('fontWeight'),\n fontSize: this.getShallow('fontSize'),\n fontFamily: this.getShallow('fontFamily')\n }, this.ecModel);\n },\n getTextRect: function (text) {\n return textContain.getBoundingRect(text, this.getFont(), this.getShallow('align'), this.getShallow('verticalAlign') || this.getShallow('baseline'), this.getShallow('padding'), this.getShallow('lineHeight'), this.getShallow('rich'), this.getShallow('truncateText'));\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 _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;","\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* 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 textContain = require(\"zrender/lib/contain/text\");\n\nvar formatUtil = require(\"../../util/format\");\n\nvar matrix = require(\"zrender/lib/core/matrix\");\n\nvar axisHelper = require(\"../../coord/axisHelper\");\n\nvar AxisBuilder = require(\"../axis/AxisBuilder\");\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\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/Model} axisPointerModel\n */\nfunction buildElStyle(axisPointerModel) {\n var axisPointerType = axisPointerModel.get('type');\n var styleModel = axisPointerModel.getModel(axisPointerType + 'Style');\n var style;\n\n if (axisPointerType === 'line') {\n style = styleModel.getLineStyle();\n style.fill = null;\n } else if (axisPointerType === 'shadow') {\n style = styleModel.getAreaStyle();\n style.stroke = null;\n }\n\n return style;\n}\n/**\n * @param {Function} labelPos {align, verticalAlign, position}\n */\n\n\nfunction buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) {\n var value = axisPointerModel.get('value');\n var text = getValueLabel(value, axisModel.axis, axisModel.ecModel, axisPointerModel.get('seriesDataIndices'), {\n precision: axisPointerModel.get('label.precision'),\n formatter: axisPointerModel.get('label.formatter')\n });\n var labelModel = axisPointerModel.getModel('label');\n var paddings = formatUtil.normalizeCssArray(labelModel.get('padding') || 0);\n var font = labelModel.getFont();\n var textRect = textContain.getBoundingRect(text, font);\n var position = labelPos.position;\n var width = textRect.width + paddings[1] + paddings[3];\n var height = textRect.height + paddings[0] + paddings[2]; // Adjust by align.\n\n var align = labelPos.align;\n align === 'right' && (position[0] -= width);\n align === 'center' && (position[0] -= width / 2);\n var verticalAlign = labelPos.verticalAlign;\n verticalAlign === 'bottom' && (position[1] -= height);\n verticalAlign === 'middle' && (position[1] -= height / 2); // Not overflow ec container\n\n confineInContainer(position, width, height, api);\n var bgColor = labelModel.get('backgroundColor');\n\n if (!bgColor || bgColor === 'auto') {\n bgColor = axisModel.get('axisLine.lineStyle.color');\n }\n\n elOption.label = {\n shape: {\n x: 0,\n y: 0,\n width: width,\n height: height,\n r: labelModel.get('borderRadius')\n },\n position: position.slice(),\n // TODO: rich\n style: {\n text: text,\n textFont: font,\n textFill: labelModel.getTextColor(),\n textPosition: 'inside',\n textPadding: paddings,\n fill: bgColor,\n stroke: labelModel.get('borderColor') || 'transparent',\n lineWidth: labelModel.get('borderWidth') || 0,\n shadowBlur: labelModel.get('shadowBlur'),\n shadowColor: labelModel.get('shadowColor'),\n shadowOffsetX: labelModel.get('shadowOffsetX'),\n shadowOffsetY: labelModel.get('shadowOffsetY')\n },\n // Lable should be over axisPointer.\n z2: 10\n };\n} // Do not overflow ec container\n\n\nfunction confineInContainer(position, width, height, api) {\n var viewWidth = api.getWidth();\n var viewHeight = api.getHeight();\n position[0] = Math.min(position[0] + width, viewWidth) - width;\n position[1] = Math.min(position[1] + height, viewHeight) - height;\n position[0] = Math.max(position[0], 0);\n position[1] = Math.max(position[1], 0);\n}\n/**\n * @param {number} value\n * @param {module:echarts/coord/Axis} axis\n * @param {module:echarts/model/Global} ecModel\n * @param {Object} opt\n * @param {Array.} seriesDataIndices\n * @param {number|string} opt.precision 'auto' or a number\n * @param {string|Function} opt.formatter label formatter\n */\n\n\nfunction getValueLabel(value, axis, ecModel, seriesDataIndices, opt) {\n value = axis.scale.parse(value);\n var text = axis.scale.getLabel( // If `precision` is set, width can be fixed (like '12.00500'), which\n // helps to debounce when when moving label.\n value, {\n precision: opt.precision\n });\n var formatter = opt.formatter;\n\n if (formatter) {\n var params = {\n value: axisHelper.getAxisRawValue(axis, value),\n axisDimension: axis.dim,\n axisIndex: axis.index,\n seriesData: []\n };\n zrUtil.each(seriesDataIndices, function (idxItem) {\n var series = ecModel.getSeriesByIndex(idxItem.seriesIndex);\n var dataIndex = idxItem.dataIndexInside;\n var dataParams = series && series.getDataParams(dataIndex);\n dataParams && params.seriesData.push(dataParams);\n });\n\n if (zrUtil.isString(formatter)) {\n text = formatter.replace('{value}', text);\n } else if (zrUtil.isFunction(formatter)) {\n text = formatter(params);\n }\n }\n\n return text;\n}\n/**\n * @param {module:echarts/coord/Axis} axis\n * @param {number} value\n * @param {Object} layoutInfo {\n * rotation, position, labelOffset, labelDirection, labelMargin\n * }\n */\n\n\nfunction getTransformedPosition(axis, value, layoutInfo) {\n var transform = matrix.create();\n matrix.rotate(transform, transform, layoutInfo.rotation);\n matrix.translate(transform, transform, layoutInfo.position);\n return graphic.applyTransform([axis.dataToCoord(value), (layoutInfo.labelOffset || 0) + (layoutInfo.labelDirection || 1) * (layoutInfo.labelMargin || 0)], transform);\n}\n\nfunction buildCartesianSingleLabelElOption(value, elOption, layoutInfo, axisModel, axisPointerModel, api) {\n var textLayout = AxisBuilder.innerTextLayout(layoutInfo.rotation, 0, layoutInfo.labelDirection);\n layoutInfo.labelMargin = axisPointerModel.get('label.margin');\n buildLabelElOption(elOption, axisModel, axisPointerModel, api, {\n position: getTransformedPosition(axisModel.axis, value, layoutInfo),\n align: textLayout.textAlign,\n verticalAlign: textLayout.textVerticalAlign\n });\n}\n/**\n * @param {Array.} p1\n * @param {Array.} p2\n * @param {number} [xDimIndex=0] or 1\n */\n\n\nfunction makeLineShape(p1, p2, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x1: p1[xDimIndex],\n y1: p1[1 - xDimIndex],\n x2: p2[xDimIndex],\n y2: p2[1 - xDimIndex]\n };\n}\n/**\n * @param {Array.} xy\n * @param {Array.} wh\n * @param {number} [xDimIndex=0] or 1\n */\n\n\nfunction makeRectShape(xy, wh, xDimIndex) {\n xDimIndex = xDimIndex || 0;\n return {\n x: xy[xDimIndex],\n y: xy[1 - xDimIndex],\n width: wh[xDimIndex],\n height: wh[1 - xDimIndex]\n };\n}\n\nfunction makeSectorShape(cx, cy, r0, r, startAngle, endAngle) {\n return {\n cx: cx,\n cy: cy,\n r0: r0,\n r: r,\n startAngle: startAngle,\n endAngle: endAngle,\n clockwise: true\n };\n}\n\nexports.buildElStyle = buildElStyle;\nexports.buildLabelElOption = buildLabelElOption;\nexports.getValueLabel = getValueLabel;\nexports.getTransformedPosition = getTransformedPosition;\nexports.buildCartesianSingleLabelElOption = buildCartesianSingleLabelElOption;\nexports.makeLineShape = makeLineShape;\nexports.makeRectShape = makeRectShape;\nexports.makeSectorShape = makeSectorShape;"],"sourceRoot":""}